Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Fix env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Einar Egilsson committed Nov 4, 2020
1 parent 9063dd1 commit 916771e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function main() {
let buildNumber = fs.readFileSync(path);
console.log(`Build number already generated in earlier jobs, using build number ${buildNumber}...`);
//Setting the output and a environment variable to new build number...
exec(`BUILD_NUMBER=${buildNumber} >> $GITHUB_ENV`);
fs.writeFileSync(process.env.GITHUB_ENV, `BUILD_NUMBER=${buildNumber}`);
console.log(`::set-output name=build_number::${buildNumber}`);
return;
}
Expand Down Expand Up @@ -130,8 +130,8 @@ function main() {

//Setting the output and a environment variable to new build number...
//fs.writeFileSync('$GITHUB_ENV', `BUILD_NUMBER=${nextBuildNumber}`);
exec(`BUILD_NUMBER=${nextBuildNumber} >> $GITHUB_ENV`);

fs.writeFileSync(process.env.GITHUB_ENV, `BUILD_NUMBER=${nextBuildNumber}`);
console.log(`::set-output name=build_number::${nextBuildNumber}`);
//Save to file so it can be used for next jobs...
fs.writeFileSync('BUILD_NUMBER', nextBuildNumber.toString());
Expand Down

0 comments on commit 916771e

Please sign in to comment.