-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic dev/staging/prod mode based on environment variables (#50)
### Summary This diff setups up the infrastructure to automatically build different variants of course plan suitable for dev/staging/production. The CI build job is changed to use staging build, so we want accidently break stuff in prod database while play-testing. Behaviors for three different variants are listed below: - dev: non-mimized code, dev database - staging: minimized code, dev database - prod: minimized code, prod database ### Test Plan I tested all three modes locally. To facilitate testing, I globally installed `serve` that can directly statically serve a directory locally. In the new dev environment, I have not been granted alpha whitelist yet. Indeed both dev version (`by npm run serve`) and the staging version (`npm run build:staging && serve dist`) alerted that I do not have access. The prod version (`npm run build && serve dist`) directly autoloads into the page for me, since I'm previously granted alph access to the prod version. ### Notes Relevant docs: https://cli.vuejs.org/guide/mode-and-env.html#environment-variables
- Loading branch information
1 parent
1c61d51
commit bb930ef
Showing
7 changed files
with
69 additions
and
38 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,2 @@ | ||
NODE_ENV=development | ||
VUE_APP_FIREBASE_MODE=dev |
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,2 @@ | ||
NODE_ENV=production | ||
VUE_APP_FIREBASE_MODE=prod |
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,2 @@ | ||
NODE_ENV=production | ||
VUE_APP_FIREBASE_MODE=dev |
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
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