on master help sign in
qol: PR feedback

- add additional scripts for building and releasing with ropsten - add visual indicator to version number if on Ropsten

commitdcdb30018115ba083b78397161fa91e4a73483d6 authortomholford <tomholford@users.noreply.github.com> dateThu 22 Jul 2021, 20:59 (5 years ago) parent5cadc4b
2 files changed+8−2
package.json+3−1 src/views/Login.tsx+5−1
package.json+3−1
@@ -96,18 +96,20 @@
9696 "scripts": {
9797 "start": "react-scripts start",
9898 "build": "react-scripts build",
99+ "build:ropsten": "REACT_APP_ROPSTEN=true react-scripts build",
99100 "test": "react-scripts test --env=jsdom",
100101 "eject": "react-scripts eject",
101102 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
102103 "zip": "zip -ur bridge-$npm_package_version.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$npm_package_version.zip ./* && cd ..",
103104 "release": "npm install && npm run build && npm run checksum && npm run zip",
105+ "release:ropsten": "npm install && npm run build:ropsten && npm run checksum && npm run zip",
104106 "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 &",
105107 "pilot:setup": "npm run pilot:ganache && truffle deploy",
106108 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
107109 "pilot-invites": "WITH_TEST_STATE=INVITES npm run pilot",
108110 "pilot-release": "WITH_TEST_STATE=STAR_RELEASE npm run pilot",
109111 "pilot-residents": "WITH_TEST_STATE=RESIDENTS npm run pilot",
110− "pilot-ropsten": "REACT_APP_ROPSTEN=true npm run pilot",
112+ "pilot-ropsten": "REACT_APP_ROPSTEN=true HTTPS=true npm-run-all start --continue-on-error",
111113 "pilot:cleanup": "pkill -f ganache-cli",
112114 "lint:check": "eslint 'src/**/*.js'",
113115 "lint:fix": "eslint --fix 'src/**/*.js'",
src/views/Login.tsx+5−1
@@ -2,6 +2,7 @@ import React, { useCallback, useState } from 'react';
22import { Grid, Text, Button, Flex, LinkButton } from 'indigo-react';
33
44import { version } from '../../package.json';
5+import { isRopsten } from 'lib/flags';
56
67import { useHistory } from 'store/history';
78
@@ -124,7 +125,10 @@ export default function Login() {
124125 className="us-none pointer">
125126 <span className="underline">Offline</span> ↗
126127 </Flex.Item>
127− <Flex.Item className="gray4">v{version}</Flex.Item>
128+ <Flex.Item className="gray4">
129+ v{version}
130+ {isRopsten ? 'r' : ''}
131+ </Flex.Item>
128132 </Flex>
129133 </Footer>
130134 </View>