Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
fix backward compatibility with one index builds, fixes #22
Browse files Browse the repository at this point in the history
  • Loading branch information
LeZuse committed Mar 24, 2016
1 parent e603777 commit 27a9fee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ esac
COMMIT=`git rev-parse --short HEAD`
BRANCH=`git rev-parse --abbrev-ref HEAD`
REV="$COMMIT"
BUILD_COUNT=`ls -a build.*.log 2>/dev/null | cat | wc -l | awk {'print $1'}`
BUILD_COUNT=`ls -a build*log 2>/dev/null | cat | wc -l | awk {'print $1'}`

if [ $BRANCH == "dev" -o $BRANCH == "master" ]; then
echo "Deploying with commit hash $REV\n"
Expand All @@ -53,12 +53,13 @@ fi

if [[ $BUILD_COUNT -ne 0 ]]; then
echo "Detected $BUILD_COUNT build app versions:"
for build in build.*.log; do
for build in build*log; do
echo "\t`cat "$build" | grep Hash: | cut -d' ' -f2`: `echo $build | cut -d'.' -f2`"
done
echo
else
echo "ERROR: No builds found. Set up Webpack build log into build.[app_buildsion].log\n"
echo "ERROR: No builds found. Set up Webpack stats log into build.[app_buildsion].log"
echo "See https://webpack.github.io/docs/node.js-api.html#stats-tostring\n"
exit 1
fi

Expand Down

0 comments on commit 27a9fee

Please sign in to comment.