-
Notifications
You must be signed in to change notification settings - Fork 47
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 #456 from LukasKalbertodt/release-script
Add script to create release artifacts
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# Remove old 'build' folder | ||
if [ -d build ]; then | ||
read -p "Will delete 'build/' folder. Is that OK? [y/N] " -r | ||
|
||
if [[ ! $REPLY =~ ^[Yy]$ ]] | ||
then | ||
exit 1 | ||
else | ||
rm -rf build | ||
fi | ||
fi | ||
|
||
|
||
# Build version for root path installation | ||
export PUBLIC_URL=/ | ||
npm run build | ||
rm build/static/js/*.map | ||
|
||
FILENAME="oc-studio-$(date --utc +%F)-root.tar.gz" | ||
cd build | ||
tar -czf ../$FILENAME * | ||
cd .. | ||
|
||
|
||
# Build version for root path installation | ||
rm -rf build/ | ||
export PUBLIC_URL=/studio | ||
npm run build | ||
rm build/static/js/*.map | ||
|
||
FILENAME="oc-studio-$(date --utc +%F)-integrated.tar.gz" | ||
cd build | ||
tar -czf ../$FILENAME * | ||
cd .. | ||
|
||
|
||
# Delete our temporary folder at the end | ||
rm -rf build/ |