using home dir

This commit is contained in:
Naveenraj M
2020-03-30 03:03:04 +05:30
parent a2442d8ca7
commit 8cb622689c
2 changed files with 6 additions and 6 deletions

View File

@ -28,11 +28,11 @@ function run() {
yield exec.exec('rpmdev-setuptree'); yield exec.exec('rpmdev-setuptree');
// 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/${specFile}`, '/github/home/rpmbuild/SPECS/'); yield io.cp(`/github/workspace/${specFile}`, '/github/home/rpmbuild/SPECS/');
yield exec.exec(`cp -R /github/workspace/ ${repo}`); yield exec.exec(`cp -R /github/workspace/ /github/home/${repo}`);
yield exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`); yield exec.exec(`cd /github/home && tar -czvf ${repo}.tar.gz ${repo}`);
// Get repo files from /github/workspace/ // Get repo files from /github/workspace/
yield exec.exec('ls -la '); yield exec.exec('ls -la ');
yield exec.exec(`cp ${repo}.tar.gz /github/home/rpmbuild/SOURCES/`); yield exec.exec(`cp /github/home/${repo}.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');

View File

@ -25,13 +25,13 @@ async function run() {
// Copy spec file from path specFile to /root/rpmbuild/SPECS/ // Copy spec file from path specFile to /root/rpmbuild/SPECS/
await io.cp(`/github/workspace/${specFile}`, '/github/home/rpmbuild/SPECS/'); await io.cp(`/github/workspace/${specFile}`, '/github/home/rpmbuild/SPECS/');
await exec.exec(`cp -R /github/workspace/ ${repo}`); await exec.exec(`cp -R /github/workspace/ /github/home/${repo}`);
await exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`); await exec.exec(`cd /github/home && tar -czvf ${repo}.tar.gz ${repo}`);
// Get repo files from /github/workspace/ // Get repo files from /github/workspace/
await exec.exec('ls -la '); await exec.exec('ls -la ');
await exec.exec(`cp ${repo}.tar.gz /github/home/rpmbuild/SOURCES/`); await exec.exec(`cp /github/home/${repo}.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