mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 20:23:50 +00:00
using topdir
This commit is contained in:
@ -31,19 +31,20 @@ function run() {
|
|||||||
// Get tar.gz file of release
|
// Get tar.gz file of release
|
||||||
yield download_tar(owner, repo, ref).then(function (filePath) {
|
yield download_tar(owner, repo, ref).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`, '/root/rpmbuild/SOURCES/');
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(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/
|
||||||
yield exec.exec('ls -la ');
|
yield exec.exec('ls -la ');
|
||||||
|
yield io.cp(`${repo}-1.0.tar.gz`, '/root/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');
|
||||||
// Execute rpmbuild
|
// Execute rpmbuild
|
||||||
try {
|
try {
|
||||||
yield exec.exec(`rpmbuild -ba /github/workspace/cello.spec`);
|
yield exec.exec(`rpmbuild --define '_topdir /root/rpmbuild' -ba /github/workspace/cello.spec`);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.setFailed(`action failed with error: ${err}`);
|
core.setFailed(`action failed with error: ${err}`);
|
||||||
|
@ -32,7 +32,7 @@ async function run() {
|
|||||||
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`, '/root/rpmbuild/SOURCES/');
|
||||||
}).catch(function(error){
|
}).catch(function(error){
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
@ -41,6 +41,7 @@ async function run() {
|
|||||||
|
|
||||||
// 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`, '/root/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
|
||||||
@ -49,7 +50,7 @@ async function run() {
|
|||||||
// Execute rpmbuild
|
// Execute rpmbuild
|
||||||
try {
|
try {
|
||||||
await exec.exec(
|
await exec.exec(
|
||||||
`rpmbuild -ba /github/workspace/cello.spec`
|
`rpmbuild --define '_topdir /root/rpmbuild' -ba /github/workspace/cello.spec`
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.setFailed(`action failed with error: ${err}`);
|
core.setFailed(`action failed with error: ${err}`);
|
||||||
|
Reference in New Issue
Block a user