-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #245
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict' | ||
|
||
const forEach = require('lodash/forEach') | ||
const env = process.env | ||
|
||
const _export = { | ||
// The GitHub repo slug | ||
repoSlug: env.GK_LOCK_GENERIC_CI_REPO_SLUG, | ||
// The name of the current branch | ||
branchName: env.GK_LOCK_GENERIC_CI_BRANCH_NAME, | ||
// Is this the first push of the build | ||
firstPush: env.GK_LOCK_GENERIC_CI_FIRST_PUSH, | ||
// Is this a regular build | ||
correctBuild: env.GK_LOCK_GENERIC_CI_CORRECT_BUILD, | ||
// Should the lockfile be uploaded from this build | ||
uploadBuild: env.GK_LOCK_GENERIC_CI_UPLOAD_BUILD | ||
} | ||
|
||
let hasMissingVars = false | ||
forEach(_export, (value, key) => { | ||
if (!value) { | ||
console.error(`${key} missing`) | ||
hasMissingVars = true | ||
} | ||
}) | ||
|
||
if (!hasMissingVars) { | ||
for (const k of ['firstPush', 'correctBuild', 'uploadBuild']) { | ||
_export[k] = _export[k] === 'true' | ||
} | ||
|
||
module.exports = _export | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters