diff --git a/lib/main.js b/lib/main.js index 244723b..d660e61 100644 --- a/lib/main.js +++ b/lib/main.js @@ -30,17 +30,22 @@ function run() { // Copy spec file from path specFile to /root/rpmbuild/SPECS/ yield io.cp('/github/workspace/cello.spec', '/github/home/rpmbuild/SPECS/'); // Get tar.gz file of release - yield download_tar(owner, repo, ref).then(function (filePath) { - console.log(`Tar Path for copy : ${filePath}`); - io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); - }).catch(function (error) { - console.log(error); - }); + // await download_tar( + // owner, + // repo, + // ref + // ).then( function(filePath){ + // console.log(`Tar Path for copy : ${filePath}`); + // io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); + // }).catch(function(error){ + // console.log(error); + // }); + yield exec.exec('curl -L --output cello-1.0.0.tar.gz https://github.com/naveenrajm7/cello/archive/v1.0.0.tar.gz'); //console.log(`Tar Path for copy : ${tarBallPath}`); yield exec.exec('echo "$HOME"'); // Get repo files from /github/workspace/ yield exec.exec('ls -la '); - yield io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); + yield io.cp(`${repo}-1.0.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); // Copy tar.gz file to /root/rpmbuild/SOURCES // make sure the name of tar.gz is same as given in Source of spec file //await io.cp(tarBallPath, '/root/rpmbuild/SOURCES'); diff --git a/src/main.ts b/src/main.ts index 95062fc..8d4c695 100644 --- a/src/main.ts +++ b/src/main.ts @@ -28,23 +28,24 @@ async function run() { await io.cp('/github/workspace/cello.spec', '/github/home/rpmbuild/SPECS/'); // Get tar.gz file of release - await download_tar( - owner, - repo, - ref - ).then( function(filePath){ - console.log(`Tar Path for copy : ${filePath}`); - io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); - }).catch(function(error){ - console.log(error); - }); + // await download_tar( + // owner, + // repo, + // ref + // ).then( function(filePath){ + // console.log(`Tar Path for copy : ${filePath}`); + // io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); + // }).catch(function(error){ + // console.log(error); + // }); + await exec.exec('curl -L --output cello-1.0.0.tar.gz https://github.com/naveenrajm7/cello/archive/v1.0.0.tar.gz') //console.log(`Tar Path for copy : ${tarBallPath}`); await exec.exec('echo "$HOME"'); // Get repo files from /github/workspace/ await exec.exec('ls -la '); - await io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); + await io.cp(`${repo}-1.0.0.tar.gz`, '/github/home/rpmbuild/SOURCES/'); // Copy tar.gz file to /root/rpmbuild/SOURCES // make sure the name of tar.gz is same as given in Source of spec file