-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from berdal84/react
React
- Loading branch information
Showing
157 changed files
with
52,448 additions
and
23,329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
|
||
ERRC=0; | ||
|
||
error(){ | ||
echo "ERROR: " $1; | ||
ERRC=${ERRC+1}; | ||
} | ||
|
||
echo "Packing files ..." | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
cd ${SCRIPT_DIR}; | ||
|
||
|
||
BASE_DIR=dist | ||
NG_DIR=${BASE_DIR}/jeudemots | ||
REACT_DIR=${BASE_DIR}/jeudemots-react | ||
BACKEND_DIR=${BASE_DIR}/jeudemots-api | ||
|
||
rm -rf ${BASE_DIR} | ||
|
||
# Backend | ||
mkdir -p ${BACKEND_DIR} | ||
cp -vr projects/backend/build/* ${BACKEND_DIR} && echo "Backend OK" || (echo "Unable to copy Backend files!" && exit ) | ||
|
||
# FrontEnd Angular | ||
|
||
mkdir -p ${NG_DIR} | ||
|
||
if( cp -vr projects/frontend-ng/build/* ${NG_DIR} ) | ||
then | ||
echo "Front (Angular) OK"; | ||
else | ||
error "Unable to copy Angular files!" ; | ||
fi | ||
|
||
# FrontEnd React | ||
|
||
mkdir -p ${REACT_DIR} | ||
|
||
if( cp -vr projects/frontend-react/build/* ${REACT_DIR} ) | ||
then | ||
echo "Front (React) OK"; | ||
else | ||
error "Unable to copy React files!"; | ||
fi | ||
|
||
# Check errors and exit | ||
if [[ "${ERRC}" -eq "0" ]]; | ||
then | ||
echo "Packing OK - output: ${SCRIPT_DIR}/${BASE_DIR}" | ||
exit | ||
fi | ||
|
||
echo "Packing ERROR! (check logs above)" | ||
exit 1 | ||
|
Oops, something went wrong.