Skip to content

Commit

Permalink
Allow overriding cloud env in start:cloud script (#19857)
Browse files Browse the repository at this point in the history
Uses basic bash variable substitution syntax to define `frontend-dev` as
a default value for `$AB_ENV` instead of hardcoded; tested and working
in bash, zsh, and fish shells.

To specify different environments:
```sh
  # `$AB_ENV` is the default value, `"frontend-dev"`
  npm run start:cloud

  # `$AB_ENV` is the user-supplied value, `"dev-2"`; expects a corresponding `.env.dev-2` file to exist
  AB_ENV=dev-2 npm run start:cloud
```
  • Loading branch information
ambirdsall authored Nov 29, 2022
1 parent b121ade commit aeb6801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airbyte-webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prestart": "npm run generate-client",
"start": "craco start",
"prestart:cloud": "npm run generate-client",
"start:cloud": "AB_ENV=frontend-dev node -r ./scripts/environment.js ./node_modules/.bin/craco start",
"start:cloud": "AB_ENV=${AB_ENV-frontend-dev} node -r ./scripts/environment.js ./node_modules/.bin/craco start",
"prebuild": "npm run generate-client",
"build": "BUILD_PATH='./build/app' craco build",
"pretest": "npm run generate-client",
Expand Down

0 comments on commit aeb6801

Please sign in to comment.