on master help sign in
qol: refactor bridge version env vars
7cb7f44tomholford
package.json+2−2
@@ -100,9 +100,9 @@
100 "test": "react-scripts test --env=jsdom",
100 "test": "react-scripts test --env=jsdom",
101 "eject": "react-scripts eject",
101 "eject": "react-scripts eject",
102 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
102 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
103− "zip": "BRIDGE_VERSION=${BRIDGE_VERSION:-$npm_package_version}; zip -ur bridge-$BRIDGE_VERSION.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$BRIDGE_VERSION.zip ./* && cd .. && unset bridgeVersion",
103+ "zip": "BRIDGE_VERSION=${REACT_APP_BRIDGE_VERSION:-$npm_package_version}; zip -ur bridge-$BRIDGE_VERSION.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$BRIDGE_VERSION.zip ./* && cd ..",
104 "release": "npm install && npm run build && npm run checksum && npm run zip",
104 "release": "npm install && npm run build && npm run checksum && npm run zip",
105− "release:ropsten": "npm install && npm run build:ropsten && npm run checksum && BRIDGE_VERSION=$npm_package_version\"r\" npm run zip",
105+ "release:ropsten": "export REACT_APP_BRIDGE_VERSION=$npm_package_version\"r\"; npm install && npm run build:ropsten && npm run checksum && npm run zip",
106 "pilot:ganache": "ganache-cli --blockTime 1 --networkId 5 --host '0.0.0.0' -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &",
106 "pilot:ganache": "ganache-cli --blockTime 1 --networkId 5 --host '0.0.0.0' -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &",
107 "pilot:setup": "npm run pilot:ganache && truffle deploy",
107 "pilot:setup": "npm run pilot:ganache && truffle deploy",
108 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
108 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
src/lib/flags.js+2−1
@@ -3,4 +3,5 @@ import { version } from '../../package.json';
3// are we running bridge in a development build
3// are we running bridge in a development build
4export const isDevelopment = process.env.NODE_ENV === 'development';
4export const isDevelopment = process.env.NODE_ENV === 'development';
5export const isRopsten = process.env.REACT_APP_ROPSTEN === 'true';
5export const isRopsten = process.env.REACT_APP_ROPSTEN === 'true';
6−export const versionLabel = `${version}${isRopsten ? 'r' : ''}`;
6+export const versionLabel =
7+ process.env.REACT_APP_BRIDGE_VERSION || `${version}${isRopsten ? 'r' : ''}`;