cherry pick new travis yml merge commit (#620)
This commit is contained in:
parent
72268f7232
commit
549febe801
18
.travis.yml
18
.travis.yml
|
@ -27,22 +27,8 @@ before_install:
|
|||
# Install truffle
|
||||
- yarn global add truffle
|
||||
script:
|
||||
- yarn build
|
||||
- bash ./config/travis/build.sh
|
||||
after_success:
|
||||
- |
|
||||
|
||||
if [ ${TRAVIS_BRANCH} = "master" ]; then
|
||||
export NODE_ENV=production;
|
||||
else
|
||||
export NODE_ENV=development;
|
||||
fi
|
||||
- |
|
||||
|
||||
if [[ -n "$TRAVIS_TAG" ]]; then
|
||||
export PRODUCTION_DEPLOYMENT=true;
|
||||
export REACT_APP_ENV='production';
|
||||
fi
|
||||
- yarn build
|
||||
# Pull Request - Deploy it to a review environment
|
||||
# Travis doesn't do deploy step with pull requests builds
|
||||
- ./config/travis/deploy_pull_request.sh
|
||||
|
@ -68,7 +54,7 @@ deploy:
|
|||
secret_access_key: $AWS_SECRET_ACCESS_KEY
|
||||
skip_cleanup: true
|
||||
local_dir: build_webpack
|
||||
upload-dir: current
|
||||
upload-dir: current/app
|
||||
on:
|
||||
branch: master
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
export NODE_ENV=production;
|
||||
|
||||
if [[ -n "$TRAVIS_TAG" ]]; then export REACT_APP_ENV='production'; fi
|
||||
|
||||
yarn lint:check
|
||||
yarn prettier:check
|
||||
yarn build
|
|
@ -15,11 +15,11 @@ function deploy_pull_request {
|
|||
REVIEW_FEATURE_FOLDER="$REPO_NAME_ALPHANUMERIC/$PULL_REQUEST_NAME"
|
||||
|
||||
# Deploy safe-team project
|
||||
aws s3 sync build_webpack s3://${REVIEW_BUCKET_NAME}/${REVIEW_FEATURE_FOLDER} --delete
|
||||
aws s3 sync build_webpack s3://${REVIEW_BUCKET_NAME}/${REVIEW_FEATURE_FOLDER}/app --delete
|
||||
}
|
||||
|
||||
function publish_pull_request_urls_in_github {
|
||||
REVIEW_FEATURE_URL="https://$PULL_REQUEST_NAME--$REPO_NAME_ALPHANUMERIC.$REVIEW_ENVIRONMENT_DOMAIN"
|
||||
REVIEW_FEATURE_URL="https://$PULL_REQUEST_NAME--$REPO_NAME_ALPHANUMERIC.$REVIEW_ENVIRONMENT_DOMAIN/app"
|
||||
|
||||
# Using the Issues api instead of the PR api
|
||||
# Done so because every PR is an issue, and the issues api allows to post general comments,
|
||||
|
|
|
@ -18,5 +18,5 @@ then
|
|||
REVIEW_RELEASE_FOLDER="$REPO_NAME_ALPHANUMERIC/$TRAVIS_TAG_ALPHANUMERIC"
|
||||
|
||||
# Deploy safe-team release project
|
||||
aws s3 sync build_webpack s3://${REVIEW_BUCKET_NAME}/${REVIEW_RELEASE_FOLDER} --delete
|
||||
aws s3 sync build_webpack s3://${REVIEW_BUCKET_NAME}/${REVIEW_RELEASE_FOLDER}/app --delete
|
||||
fi
|
||||
|
|
|
@ -54,7 +54,7 @@ function ensureSlash(path, needsSlash) {
|
|||
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
|
||||
const homepagePath = require(paths.appPackageJson).homepage
|
||||
// var homepagePathname = homepagePath ? url.parse(homepagePath).pathname : '/';
|
||||
const homepagePathname = process.env.PRODUCTION_DEPLOYMENT ? "/app/" : "/"
|
||||
const homepagePathname = "/app/"
|
||||
// Webpack uses `publicPath` to determine where the app is being served from.
|
||||
// It requires a trailing slash, or the file assets will get an incorrect path.
|
||||
const publicPath = ensureSlash(homepagePathname, true)
|
||||
|
|
|
@ -166,7 +166,7 @@ const Layout = (props: Props) => {
|
|||
Apps
|
||||
</>
|
||||
)
|
||||
|
||||
|
||||
const labelSettings = (
|
||||
<>
|
||||
<SettingsIcon />
|
||||
|
|
|
@ -143,7 +143,13 @@ class Settings extends React.Component<Props, State> {
|
|||
onClick={this.handleChange(1)}
|
||||
>
|
||||
<SafeDetailsIcon />
|
||||
<Badge badgeContent=" " variant="dot" invisible={!this.state.needUpdate || !granted} color="error" style={{paddingRight: '10px'}}>
|
||||
<Badge
|
||||
badgeContent=" "
|
||||
variant="dot"
|
||||
invisible={!this.state.needUpdate || !granted}
|
||||
color="error"
|
||||
style={{ paddingRight: '10px' }}
|
||||
>
|
||||
Safe details
|
||||
</Badge>
|
||||
</Row>
|
||||
|
|
|
@ -34,7 +34,7 @@ import currentSession, {
|
|||
type State as CurrentSessionState,
|
||||
} from '~/logic/currentSession/store/reducer/currentSession'
|
||||
|
||||
export const history = createBrowserHistory()
|
||||
export const history = createBrowserHistory({ basename: '/app/' })
|
||||
|
||||
// eslint-disable-next-line
|
||||
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
|
||||
|
|
Loading…
Reference in New Issue