Skip to content

Commit

Permalink
add -r flag for pushing "release" builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed May 12, 2014
1 parent 83c3f59 commit bea5383
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions bin/update-builds.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash -e

while getopts ":r" opt; do
case $opt in
r)
RELEASE=1
;;
esac
done

dir=`pwd -P`
TMP="$dir/builds-temp"
mkdir -p $TMP
Expand All @@ -21,23 +29,39 @@ node $dir/node_modules/bigstraw/index.js -s $dir/../repo-configs/polymer.json

pushd components/platform-dev
npm install
grunt minify audit
if [ $RELEASE -eq 1 ]; then
grunt release
else
grunt minify audit
fi
cp build/build.log build/platform.js build/platform.js.map ../platform/
popd

pushd components/platform
git commit . -m 'update build'
if [ $RELEASE -eq 1 ]; then
git commit . -m 'update build for release'
else
git commit . -m 'update build'
fi
git push origin master
popd

pushd components/polymer-dev
npm install
grunt minify audit
if [ $RELEASE -eq 1 ]; then
grunt release
else
grunt minify audit
fi
cp build/build.log build/polymer.js build/polymer.js.map ../polymer/
popd

pushd components/polymer
git commit . -m 'update build'
if [ $RELEASE -eq 1 ]; then
git commit . -m 'update build for release'
else
git commit . -m 'update build'
fi
git push origin master
popd

Expand Down

0 comments on commit bea5383

Please sign in to comment.