Skip to content

Commit

Permalink
Merge pull request #456 from LukasKalbertodt/release-script
Browse files Browse the repository at this point in the history
Add script to create release artifacts
  • Loading branch information
LukasKalbertodt authored Mar 6, 2020
2 parents 31078f7 + b10a393 commit f2825c2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions create-release.sh
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/

0 comments on commit f2825c2

Please sign in to comment.