mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 04:13:50 +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/
|
||||
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');
|
||||
|
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/');
|
||||
|
||||
// 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
|
||||
|
Reference in New Issue
Block a user