fix(change makefile for stagings): change makefile for stagings a,b,c,d,e

keep-around/62139adf47ed3ad8bb26f688540bfa282386c1f9
Andrei Dekterev 4 years ago
parent 5579b78267
commit 62139adf47
  1. 45
      Makefile
  2. 2
      src/config/env.tsx
  3. 4
      src/features/AuthStore/helpers.tsx
  4. 1
      src/react-app-env.d.ts

@ -14,6 +14,41 @@ build: clean
REACT_APP_ENV=staging \
REACT_APP_CLIENT=instat \
npm run build
build-a: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=staging \
REACT_APP_CLIENT=instat \
REACT_APP_STAGE=a-staging \
npm run build
build-b: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=staging \
REACT_APP_CLIENT=instat \
REACT_APP_STAGE=b-staging \
npm run build
build-c: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=staging \
REACT_APP_CLIENT=instat \
REACT_APP_STAGE=c-staging \
npm run build
build-d: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=staging \
REACT_APP_CLIENT=instat \
REACT_APP_STAGE=d-staging \
npm run build
build-e: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=staging \
REACT_APP_CLIENT=instat \
REACT_APP_STAGE=e-staging \
npm run build
auth-build:
rm -rf build_auth
@ -81,19 +116,19 @@ deploy-all: prod preprod facr-prod
stage: build
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/wwwroot/
a-stage: build
a-stage: build-a
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/a-wwwroot/
b-stage: build
b-stage: build-b
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/b-wwwroot/
c-stage: build
c-stage: build-c
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/c-wwwroot/
d-stage: build
d-stage: build-d
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/d-wwwroot/
e-stage: build
e-stage: build-e
rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/e-wwwroot/
test:

@ -12,4 +12,6 @@ export const ENV = process.env.REACT_APP_ENV || 'staging'
export const isProduction = ENV === 'production' || ENV === 'preproduction'
export const stageENV = process.env.REACT_APP_STAGE || 'staging'
export const STRIPE_PUBLIC_KEY = process.env.REACT_APP_STRIPE_PK || 'pk_test_fkEjSoWfJXuCwMgwHRpbOGPt'

@ -4,7 +4,7 @@ import { WebStorageStateStore } from 'oidc-client'
import { client } from 'config/clients'
import { AUTH_SERVICE } from 'config/routes'
import { ClientIds } from 'config/clients/types'
import { ENV } from 'config/env'
import { ENV, stageENV } from 'config/env'
import type { Languages } from 'config/languages'
@ -24,7 +24,7 @@ const redirectUrl = () => {
return `${window.origin}/redirect`
}
if (ENV === 'staging') {
return `https://${ENV}.${client.name}.tv/redirect`
return `https://${stageENV}.instat.tv/redirect`
}
return `https://${client.name}.tv/redirect`
}

@ -5,6 +5,7 @@ declare namespace NodeJS {
export interface ProcessEnv {
REACT_APP_CLIENT: 'instat' | 'facr',
REACT_APP_ENV: 'production' | 'preproduction' | 'staging',
REACT_APP_STAGE: 'staging' | 'a-staging' | 'b-staging' | 'c-staging' | 'd-staging',
REACT_APP_TYPE: 'auth-service' | 'ott',
}
}

Loading…
Cancel
Save