Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Adjust release as ZIP script to latest version.
Browse files Browse the repository at this point in the history
  • Loading branch information
hajoeichler committed Feb 20, 2014
1 parent 487e8d0 commit 41b30e8
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions release-as-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,41 @@

set -e

rm -rf lib

BRANCH_NAME='latest'

set +e
git branch -D ${BRANCH_NAME}
set -e

rm -rf lib
rm -rf node_modules

npm version patch
git branch ${BRANCH_NAME}
git checkout ${BRANCH_NAME}
git merge master

npm install
grunt build
rm -rf node_modules
npm install --production
git add -f lib/
libs=$(cat package.json | jq -r '.dependencies' | grep ':' | cut -d: -f1 | tr -d " " | tr -d '"')
for lib in $libs; do
git add -f node_modules/$lib
done
git add -f node_modules/
git commit -m "Update generated code and runtime dependencies."
git push origin ${BRANCH_NAME}
git push --force origin ${BRANCH_NAME}

git checkout master

VERSION=$(cat package.json | jq --raw-output .version)
git push origin "v${VERSION}"
npm version patch
git push origin master
npm install

if [ -e tmp ]; then
rm -rf tmp
fi
mkdir tmp
cd tmp
curl -L https://github.com/sphereio/sphere-product-mapper/archive/latest.zip -o latest.zip
unzip latest.zip
cd sphere-product-mapper-latest/
node lib/run

0 comments on commit 41b30e8

Please sign in to comment.