From fc80ae85dc772e1a41adfa2e951d8d26e07cff55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 5 Aug 2019 09:51:31 -0400 Subject: [PATCH] Revert "Updates build process to use env for setting endpoints" This reverts commit a92592c223a5f09abeb3cc444ecc528d28a1d9f1. --- build.sh | 7 +------ package.json | 5 +++-- .../clients/endpoints/metadata-client-endpoints.js | 12 ------------ 3 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 src/common/clients/endpoints/metadata-client-endpoints.js diff --git a/build.sh b/build.sh index 1ef9b1a..e9ca717 100644 --- a/build.sh +++ b/build.sh @@ -4,12 +4,7 @@ echo "creating new full-build" mkdir full-build cp -r back-end/* full-build/ echo "building new frontend" -if [ $1 = "--dev" ] -then - npm run build-dev -else - npm run build -fi +npm run build echo "copying new frontend" rm -rf full-build/frontend/* cp -r build/* full-build/frontend/ diff --git a/package.json b/package.json index 563b413..f0cf36b 100644 --- a/package.json +++ b/package.json @@ -41,10 +41,11 @@ }, "scripts": { "start": "react-scripts start", - "build-dev": "REACT_APP_STAGE=dev react-scripts build", - "build": "REACT_APP_STAGE=prod react-scripts build", + "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", + "predeploy": "npm run build", + "deploy": "gh-pages -d build", "slither": "slither . --exclude naming-convention --filter-paths token" }, "husky": { diff --git a/src/common/clients/endpoints/metadata-client-endpoints.js b/src/common/clients/endpoints/metadata-client-endpoints.js deleted file mode 100644 index 53a36a7..0000000 --- a/src/common/clients/endpoints/metadata-client-endpoints.js +++ /dev/null @@ -1,12 +0,0 @@ -const ENV = process.env.REACT_APP_STAGE -const DOMAIN = ENV === 'prod' ? 'https://prod.dap.ps' : 'https://dev.dap.ps' - -const metadataClientEndpoints = { - UPLOAD: DOMAIN + '/metadata', - UPDATE: DOMAIN + '/metadata/update', - APPROVE: DOMAIN + '/metadata/approve/email', - RETRIEVE_METADATA: DOMAIN + '/metadata', - RETRIEVE_ALL_METADATA: DOMAIN + '/metadata/all', -} - -export default metadataClientEndpoints