Skip to content

Commit

Permalink
Update stage calculation (#1093)
Browse files Browse the repository at this point in the history
Closes #1092
  • Loading branch information
microbit-matt-hillsdon authored Jan 19, 2023
1 parent 1816166 commit 103a8e0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions bin/print-ci-env-stage.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
#!/usr/bin/env node
const ref = process.env.GITHUB_REF;
const eventName = process.env.GITHUB_EVENT_NAME;

let stage = "";
let stage;
if (ref === "refs/heads/main") {
if (eventName === "release") {
stage = "PRODUCTION";
} else {
stage = "STAGING";
}
stage = "STAGING";
} else if (ref.startsWith("refs/tags/v")) {
stage = "PRODUCTION";
} else {
stage = "REVIEW";
}
Expand Down

0 comments on commit 103a8e0

Please sign in to comment.