mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 12:13:51 +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/
|
// Copy spec file from path specFile to /root/rpmbuild/SPECS/
|
||||||
yield io.cp('/github/workspace/cello.spec', '/root/rpmbuild/SPECS/');
|
yield io.cp('/github/workspace/cello.spec', '/root/rpmbuild/SPECS/');
|
||||||
// Get tar.gz file of release
|
// Get tar.gz file of release
|
||||||
const tarBallPath = yield download_tar(owner, repo, ref);
|
yield download_tar(owner, repo, ref).then(function (filePath) {
|
||||||
console.log(`Tar Path for copy : ${tarBallPath}`);
|
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/
|
// Get repo files from /github/workspace/
|
||||||
yield exec.exec('ls -la ');
|
yield exec.exec('ls -la ');
|
||||||
// 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
|
||||||
yield io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
//await io.cp(tarBallPath, '/root/rpmbuild/SOURCES');
|
||||||
// Execute rpmbuild
|
// Execute rpmbuild
|
||||||
try {
|
try {
|
||||||
yield exec.exec(`rpmbuild -ba ${specFile}`);
|
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/');
|
await io.cp('/github/workspace/cello.spec', '/root/rpmbuild/SPECS/');
|
||||||
|
|
||||||
// Get tar.gz file of release
|
// 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/
|
// Get repo files from /github/workspace/
|
||||||
await exec.exec('ls -la ');
|
await exec.exec('ls -la ');
|
||||||
|
|
||||||
// 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');
|
||||||
|
|
||||||
// Execute rpmbuild
|
// Execute rpmbuild
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user