awesome-cordova-plugins/scripts/bower.sh

29 lines
683 B
Bash
Raw Normal View History

2016-08-03 00:03:23 +08:00
#!/bin/bash
set -e
# readJsonProp(jsonFile, property)
# - restriction: property needs to be on an own line!
function readJsonProp {
echo $(sed -En 's/.*"'$2'"[ ]*:[ ]*"(.*)".*/\1/p' $1)
}
VERSION=$(readJsonProp "package.json" "version")
echo "BOWERING IONIC-NATIVE VERSION $VERSION. FOR GREAT JUSTICE..."
DIR="scripts/ionic-native-bower"
rm -rf $DIR
mkdir $DIR
cp dist/ionic.native.js dist/ionic.native.min.js $DIR
cd $DIR
git init
git remote add origin git@github.com:driftyco/ionic-native-bower.git
2016-08-03 00:23:39 +08:00
cp ../bower.json .
2016-08-03 00:03:23 +08:00
git add .
git commit -m "Bower release"
git tag -f -m v$VERSION v$VERSION
git push -f --tags origin master
echo "BOWERING COMPLETED SOMEWHAT SUCCESSFULLY"