mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 12:13:51 +00:00
using curl to get archive
This commit is contained in:
19
lib/main.js
19
lib/main.js
@ -30,17 +30,22 @@ function run() {
|
|||||||
// Copy spec file from path specFile to /root/rpmbuild/SPECS/
|
// Copy spec file from path specFile to /root/rpmbuild/SPECS/
|
||||||
yield io.cp('/github/workspace/cello.spec', '/github/home/rpmbuild/SPECS/');
|
yield io.cp('/github/workspace/cello.spec', '/github/home/rpmbuild/SPECS/');
|
||||||
// Get tar.gz file of release
|
// Get tar.gz file of release
|
||||||
yield download_tar(owner, repo, ref).then(function (filePath) {
|
// await download_tar(
|
||||||
console.log(`Tar Path for copy : ${filePath}`);
|
// owner,
|
||||||
io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/');
|
// repo,
|
||||||
}).catch(function (error) {
|
// ref
|
||||||
console.log(error);
|
// ).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}`);
|
//console.log(`Tar Path for copy : ${tarBallPath}`);
|
||||||
yield exec.exec('echo "$HOME"');
|
yield exec.exec('echo "$HOME"');
|
||||||
// Get repo files from /github/workspace/
|
// Get repo files from /github/workspace/
|
||||||
yield exec.exec('ls -la ');
|
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
|
// Copy tar.gz file to /root/rpmbuild/SOURCES
|
||||||
// make sure the name of tar.gz is same as given in Source of spec file
|
// make sure the name of tar.gz is same as given in Source of spec file
|
||||||
//await io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
//await io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
||||||
|
23
src/main.ts
23
src/main.ts
@ -28,23 +28,24 @@ async function run() {
|
|||||||
await io.cp('/github/workspace/cello.spec', '/github/home/rpmbuild/SPECS/');
|
await io.cp('/github/workspace/cello.spec', '/github/home/rpmbuild/SPECS/');
|
||||||
|
|
||||||
// Get tar.gz file of release
|
// Get tar.gz file of release
|
||||||
await download_tar(
|
// await download_tar(
|
||||||
owner,
|
// owner,
|
||||||
repo,
|
// repo,
|
||||||
ref
|
// ref
|
||||||
).then( function(filePath){
|
// ).then( function(filePath){
|
||||||
console.log(`Tar Path for copy : ${filePath}`);
|
// console.log(`Tar Path for copy : ${filePath}`);
|
||||||
io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/');
|
// io.cp(`${repo}-1.0.tar.gz`, '/github/home/rpmbuild/SOURCES/');
|
||||||
}).catch(function(error){
|
// }).catch(function(error){
|
||||||
console.log(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}`);
|
//console.log(`Tar Path for copy : ${tarBallPath}`);
|
||||||
await exec.exec('echo "$HOME"');
|
await exec.exec('echo "$HOME"');
|
||||||
|
|
||||||
// Get repo files from /github/workspace/
|
// Get repo files from /github/workspace/
|
||||||
await exec.exec('ls -la ');
|
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
|
// Copy tar.gz file to /root/rpmbuild/SOURCES
|
||||||
// make sure the name of tar.gz is same as given in Source of spec file
|
// make sure the name of tar.gz is same as given in Source of spec file
|
||||||
|
Reference in New Issue
Block a user