-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Print right environment to .env on build
- Loading branch information
1 parent
2c3145d
commit a3b1f80
Showing
6 changed files
with
51 additions
and
21 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ "$1" = "undefined" ]] | ||
then | ||
echo "Posting production to .env" # DEBUG | ||
echo "NODE_ENV=production" > .env | ||
else | ||
echo "Posting staging to .env" # DEBUG | ||
echo "NODE_ENV=staging" > .env | ||
fi |
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,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -a | ||
source .env | ||
set +a | ||
|
||
curl -sL https://sentry.io/get-cli/ | bash | ||
|
||
export SENTRY_RELEASE=$1 | ||
|
||
echo "Content of SENTRY_RELEASE: $SENTRY_RELEASE" # DEBUG | ||
echo "Content of NODE_ENV: $NODE_ENV" # DEBUG | ||
|
||
sentry-cli releases new -p $SENTRY_PROJECT $SENTRY_RELEASE | ||
sentry-cli releases set-commits $SENTRY_RELEASE --auto | ||
sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps dist | ||
sentry-cli releases finalize $SENTRY_RELEASE | ||
sentry-cli releases deploys $SENTRY_RELEASE new -e $NODE_ENV |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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