From 356913d556b31bf0a12d2347de25bfbf71bd8b5e Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Mon, 5 Sep 2022 14:44:42 +0400 Subject: [PATCH] fix(insports merge): change configs for insports --- .drone.yml | 2 +- Makefile | 12 ++++++------ src/config/matomo.tsx | 21 ++++++++------------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/.drone.yml b/.drone.yml index ea07e749..f47ecfaf 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,7 +33,7 @@ steps: commands: - apk add --no-cache aws-cli bash git openssh-client make rsync - npm install --legacy-peer-deps - - npm run build + - npm prod - aws s3 sync build s3://instat-frontend-test-a --delete - aws cloudfront create-invalidation --distribution-id E1WZHVCHZ48SG6 --paths "/*" - make auth-build diff --git a/Makefile b/Makefile index db3abb22..8aa9d92d 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ build-d: clean REACT_APP_CLIENT=insports \ REACT_APP_STAGE=d-staging \ npm run build - + build-e: clean REACT_APP_TYPE=ott \ REACT_APP_ENV=staging \ @@ -70,14 +70,14 @@ build-g: clean REACT_APP_CLIENT=insports \ REACT_APP_STAGE=g-staging \ npm run build - + build-h: clean REACT_APP_TYPE=ott \ REACT_APP_ENV=staging \ REACT_APP_CLIENT=insports \ REACT_APP_STAGE=h-staging \ npm run build - + build-i: clean REACT_APP_TYPE=ott \ REACT_APP_ENV=staging \ @@ -128,9 +128,9 @@ prod: clean REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW7v2lF8GGogrm7XaaICZ9CN876sITIBBauZgB2ommUTUOiY868jzpbhQjZcoBOjIRX5Vs54Aq00y4C3USyB \ npm run build - rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/wwwroot/ - rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/wwwroot/ - rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@137.74.33.74:/usr/local/www/ott/wwwroot/ +# rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/wwwroot/ +# rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/wwwroot/ +# rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@137.74.33.74:/usr/local/www/ott/wwwroot/ preprod: clean REACT_APP_TYPE=ott \ diff --git a/src/config/matomo.tsx b/src/config/matomo.tsx index ee8f2ca8..013c214f 100644 --- a/src/config/matomo.tsx +++ b/src/config/matomo.tsx @@ -9,19 +9,14 @@ const getMatomoInstance = () => { urlBase: 'link.to.domain', } - // switch (process.env.REACT_APP_CLIENT) { - // case 'instat': - // matomoInstance = { - // ...matomoInstance, - // siteId: 1, - // urlBase: PAGES.matomoInstatBaseUrl, - // } - // break - // } - matomoInstance = { - ...matomoInstance, - siteId: 1, - urlBase: PAGES.matomoInstatBaseUrl, + switch (process.env.REACT_APP_CLIENT) { + case 'insports': + matomoInstance = { + ...matomoInstance, + siteId: 1, + urlBase: PAGES.matomoInstatBaseUrl, + } + break } return createInstance(matomoInstance)