mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 04:13:50 +00:00
then copy tar
This commit is contained in:
10
lib/main.js
10
lib/main.js
@ -29,13 +29,17 @@ function run() {
|
||||
// Copy spec file from path specFile to /root/rpmbuild/SPECS/
|
||||
yield io.cp('/github/workspace/cello.spec', '/root/rpmbuild/SPECS/');
|
||||
// Get tar.gz file of release
|
||||
const tarBallPath = yield download_tar(owner, repo, ref);
|
||||
console.log(`Tar Path for copy : ${tarBallPath}`);
|
||||
yield download_tar(owner, repo, ref).then(function (filePath) {
|
||||
io.cp(filePath, '/root/rpmbuild/SOURCES');
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
//console.log(`Tar Path for copy : ${tarBallPath}`);
|
||||
// Get repo files from /github/workspace/
|
||||
yield exec.exec('ls -la ');
|
||||
// Copy tar.gz file to /root/rpmbuild/SOURCES
|
||||
// make sure the name of tar.gz is same as given in Source of spec file
|
||||
yield io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
||||
//await io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
||||
// Execute rpmbuild
|
||||
try {
|
||||
yield exec.exec(`rpmbuild -ba ${specFile}`);
|
||||
|
14
src/main.ts
14
src/main.ts
@ -26,16 +26,24 @@ async function run() {
|
||||
await io.cp('/github/workspace/cello.spec', '/root/rpmbuild/SPECS/');
|
||||
|
||||
// Get tar.gz file of release
|
||||
const tarBallPath = await download_tar(owner, repo, ref);
|
||||
await download_tar(
|
||||
owner,
|
||||
repo,
|
||||
ref
|
||||
).then( function(filePath){
|
||||
io.cp(filePath, '/root/rpmbuild/SOURCES');
|
||||
}).catch(function(error){
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
console.log(`Tar Path for copy : ${tarBallPath}`);
|
||||
//console.log(`Tar Path for copy : ${tarBallPath}`);
|
||||
|
||||
// Get repo files from /github/workspace/
|
||||
await exec.exec('ls -la ');
|
||||
|
||||
// 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');
|
||||
//await io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
||||
|
||||
// Execute rpmbuild
|
||||
try {
|
||||
|
Reference in New Issue
Block a user