Revert "Updates build process to use env for setting endpoints"

This reverts commit a92592c223.
This commit is contained in:
Jakub Sokołowski 2019-08-05 09:51:31 -04:00
parent b23b6ab4db
commit fc80ae85dc
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 4 additions and 20 deletions

View File

@ -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/

View File

@ -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": {

View File

@ -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