From 27a9fee19a540d22406dddee7c488bdea0eb7c76 Mon Sep 17 00:00:00 2001 From: Tomas Ruzicka Date: Thu, 24 Mar 2016 14:21:35 +0100 Subject: [PATCH] fix backward compatibility with one index builds, fixes #22 --- bin/deploy.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/deploy.sh b/bin/deploy.sh index d04e87a..328b773 100755 --- a/bin/deploy.sh +++ b/bin/deploy.sh @@ -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" @@ -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