Update publish scripts

This commit is contained in:
Andrew Miner
2015-05-13 11:12:48 -07:00
parent a545628e04
commit 4abc879600
6 changed files with 65 additions and 60 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
MODULE=$(basename $PWD)
QUIET="NO"
while [[ "$1" != "" ]]; do
case "$1" in
"-q") QUIET="YES";;
esac
shift
done
CHANGES=$(git log --oneline production..master | while read LINE; do echo " $LINE"; done)
if [[ "$CHANGES" != "" ]]; then
printf "\nUndeployed changes for $MODULE:\n$CHANGES\n\n"
elif [[ "$QUIET" == "NO" ]]; then
printf "No undeployed changes for $MODULE\n\n"
fi
VERSION=$(cat package.json | grep "version" | sed 's/.*"version": "\(.*\)",$/\1/')
CHANGES=$(git log --oneline "v$VERSION"..master | while read LINE; do echo " $LINE"; done)
if [[ "$CHANGES" != "" ]]; then
printf "\nUnpublished NPM module changes for $MODULE:\n$CHANGES\n\n"
else
printf "No unpublished NPM module changes for $MODULE\n\n"
fi