diff --git a/.gitignore b/.gitignore index faa71d205..d2d968513 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ .idea dist/ +scripts/ionic-native-bower diff --git a/bower.json b/bower.json index 9e75af448..0ad72511e 100644 --- a/bower.json +++ b/bower.json @@ -13,7 +13,7 @@ "hybrid", "mobile" ], - "homepage": "https://github.com/driftyco/ionic-native", + "homepage": "https://github.com/driftyco/ionic-native-bower", "ignore": [ "**/.*", "node_modules", diff --git a/scripts/bower.sh b/scripts/bower.sh new file mode 100644 index 000000000..77e725410 --- /dev/null +++ b/scripts/bower.sh @@ -0,0 +1,27 @@ +#!/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 +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"