mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-12 12:13:51 +00:00
async file write
This commit is contained in:
@ -25,7 +25,12 @@ function download_archive(owner, repo, ref) {
|
|||||||
archive_format,
|
archive_format,
|
||||||
ref
|
ref
|
||||||
}).then(({ data }) => {
|
}).then(({ data }) => {
|
||||||
fs.writeFileSync(tarFile, Buffer.from(data));
|
fs.writeFile(tarFile, Buffer.from(data), function (err) {
|
||||||
|
if (err) {
|
||||||
|
return console.log(err);
|
||||||
|
}
|
||||||
|
console.log("The Tar file was saved!");
|
||||||
|
});
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
@ -28,6 +28,8 @@ function run() {
|
|||||||
console.log(`Hello ${specFile} from inside a container`);
|
console.log(`Hello ${specFile} from inside a container`);
|
||||||
// Get repo files from /github/workspace/
|
// Get repo files from /github/workspace/
|
||||||
yield exec.exec('ls -la /github/workspace');
|
yield exec.exec('ls -la /github/workspace');
|
||||||
|
// Get repo files from /github/workspace/
|
||||||
|
yield exec.exec('ls -la ');
|
||||||
// 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
|
||||||
|
@ -21,7 +21,12 @@ async function download_archive(owner, repo, ref ) {
|
|||||||
archive_format,
|
archive_format,
|
||||||
ref
|
ref
|
||||||
}).then(( { data }) => {
|
}).then(( { data }) => {
|
||||||
fs.writeFileSync(tarFile, Buffer.from(data));
|
fs.writeFile(tarFile, Buffer.from(data), function(err){
|
||||||
|
if(err) {
|
||||||
|
return console.log(err);
|
||||||
|
}
|
||||||
|
console.log("The Tar file was saved!");
|
||||||
|
});
|
||||||
}).catch( function(error){
|
}).catch( function(error){
|
||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,8 @@ async function run() {
|
|||||||
// Get repo files from /github/workspace/
|
// Get repo files from /github/workspace/
|
||||||
await exec.exec('ls -la /github/workspace');
|
await exec.exec('ls -la /github/workspace');
|
||||||
|
|
||||||
|
// Get repo files from /github/workspace/
|
||||||
|
await exec.exec('ls -la ');
|
||||||
|
|
||||||
// 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/cello.spec', '/root/rpmbuild/SPECS/');
|
await io.cp('/github/workspace/cello.spec', '/root/rpmbuild/SPECS/');
|
||||||
|
Reference in New Issue
Block a user