-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.sh
17 lines (12 loc) · 947 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
#regenerate .pot file
sh ./genpot.sh
#minify and combine css
cat ./stripe-payments/public/views/templates/default/pure.css ./stripe-payments/public/views/templates/default/pp-style.css | cleancss -o ./stripe-payments/public/views/templates/default/pp-combined.min.css --s0
cat ./stripe-payments/public/views/templates/default/pp-inline-head.css | cleancss -o ./stripe-payments/public/views/templates/default/pp-inline-head.min.css --s0
#minify and combine js
cat ./stripe-payments/public/assets/js/add-ons/tax-variations.js ./stripe-payments/public/assets/js/md5.min.js ./stripe-payments/public/assets/js/pp-handler.js | uglifyjs - -c -m -o ./stripe-payments/public/assets/js/pp-handler.min.js
stable=$(grep "Stable tag:" ./stripe-payments/readme.txt)
version=$(echo $stable | sed 's/Stable tag://' | xargs)
rm -f ./stripe-payments_$version.zip
zip -r -q -J -X ./stripe-payments_$version.zip ./stripe-payments/ -x *_debug_log.txt