Unverified Commit ecc54c1e authored by Jeremy Morrell's avatar Jeremy Morrell Committed by GitHub

Add rest of non-test bash to shellcheck (#610)

* Add rest of non-test bash to shellcheck
parent fc26df7e
#!/usr/bin/env bash
export PATH="$HOME/.heroku/node/bin:$HOME/.heroku/yarn/bin:$PATH:$HOME/bin:$HOME/node_modules/.bin" export PATH="$HOME/.heroku/node/bin:$HOME/.heroku/yarn/bin:$PATH:$HOME/bin:$HOME/node_modules/.bin"
export NODE_HOME="$HOME/.heroku/node" export NODE_HOME="$HOME/.heroku/node"
export NODE_ENV=${NODE_ENV:-test} export NODE_ENV=${NODE_ENV:-test}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[ "$CI" != "true" ] && echo "Not running on CI!" && exit 1 [ "$CI" != "true" ] && echo "Not running on CI!" && exit 1
git config --global user.email ${HEROKU_API_USER:-"buildpack@example.com"} git config --global user.email "${HEROKU_API_USER:-"buildpack@example.com"}"
git config --global user.name 'BuildpackTester' git config --global user.name 'BuildpackTester'
cat <<EOF >> ~/.ssh/config cat <<EOF >> ~/.ssh/config
......
...@@ -26,14 +26,16 @@ if [ -z "$HEROKU_API_KEY" ]; then ...@@ -26,14 +26,16 @@ if [ -z "$HEROKU_API_KEY" ]; then
fi fi
if [ -n "$CIRCLE_BRANCH" ]; then if [ -n "$CIRCLE_BRANCH" ]; then
export HATCHET_BUILDPACK_BRANCH="$CIRCLE_BRANCH" HATCHET_BUILDPACK_BRANCH="$CIRCLE_BRANCH"
elif [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then elif [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
export IS_RUNNING_ON_TRAVIS=true export IS_RUNNING_ON_TRAVIS=true
export HATCHET_BUILDPACK_BRANCH="$TRAVIS_PULL_REQUEST_BRANCH" HATCHET_BUILDPACK_BRANCH="$TRAVIS_PULL_REQUEST_BRANCH"
else else
export HATCHET_BUILDPACK_BRANCH=$(git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#\1#' | sed 's#tags\/##') HATCHET_BUILDPACK_BRANCH=$(git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)#\1#' | sed 's#tags\/##')
fi fi
export HATCHET_BUILDPACK_BRANCH
gem install bundler gem install bundler
bundle install bundle install
......
...@@ -7,7 +7,7 @@ BP_NAME=${1:-"heroku/nodejs"} ...@@ -7,7 +7,7 @@ BP_NAME=${1:-"heroku/nodejs"}
curVersion=$(heroku buildpacks:versions "$BP_NAME" | awk 'FNR == 3 { print $1 }') curVersion=$(heroku buildpacks:versions "$BP_NAME" | awk 'FNR == 3 { print $1 }')
newVersion="v$((curVersion + 1))" newVersion="v$((curVersion + 1))"
read -p "Deploy as version: $newVersion [y/n]? " choice read -r -p "Deploy as version: $newVersion [y/n]? " choice
case "$choice" in case "$choice" in
y|Y ) echo "";; y|Y ) echo "";;
n|N ) exit 0;; n|N ) exit 0;;
......
...@@ -3,8 +3,8 @@ test: heroku-18 heroku-16 cedar-14 ...@@ -3,8 +3,8 @@ test: heroku-18 heroku-16 cedar-14
shellcheck: shellcheck:
@shellcheck -x bin/compile bin/detect bin/release bin/test bin/test-compile @shellcheck -x bin/compile bin/detect bin/release bin/test bin/test-compile
@shellcheck -x lib/** @shellcheck -x lib/**
@echo TODO shellcheck -x ci-profile/**/*.sh @shellcheck -x ci-profile/**
@echo TODO shellcheck -x etc/**/*.sh @shellcheck -x etc/**
heroku-18: heroku-18:
@echo "Running tests in docker (heroku-18)..." @echo "Running tests in docker (heroku-18)..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment