-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·27 lines (23 loc) · 984 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
if [ "$#" -ne 1 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
printf "Downloads, builds, and bundles a tagged version of stampit.\n"
printf "Usage: build.sh TAG\n\n"
printf "TAG is an existing tag in the https://github.com/stampit-org/stampit repository (e.g. 'v3.1.2').\n\n"
exit 1
fi
printf "Downloading and building stampit#%s...\n" $1
rm -rf build
git clone --branch $1 --single-branch --depth 1 https://github.com/stampit-org/stampit.git build
cd build
npm install
npm run build
cd ..
cp build/dist/stampit.umd.js ./stampit.js
cp build/dist/stampit.umd.min.js ./stampit.min.js
cp build/dist/stampit.umd.js.map ./stampit.js.map
printf "\nReview and test the bundle, then commit, tag, and push it:\n\n"
printf " git add .\n"
printf " git commit -m MSG\n"
printf " git tag -a %s -m MSG\n" $1
printf " git push --follow-tags\n\n"
printf "MSG should match the tag message in the https://github.com/stampit-org/stampit repository.\n\n"