Skip to content

Commit

Permalink
Fall back to commit hash in update tests
Browse files Browse the repository at this point in the history
Travis CI occasionally has trouble figuring out the branch, so this
change makes sure it falls back to using at least a commit hash
  • Loading branch information
svenklemm committed Dec 12, 2018
1 parent 5339531 commit 981147f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BUILD_IMAGE_NAME=${BUILD_IMAGE_NAME:-$USER/pgbuild}
IMAGE_NAME=${IMAGE_NAME:-$USER/timescaledb}
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD ${BASE_DIR} | awk '{print $1; exit}' | sed -e "s|/|_|g")
GIT_TAG=$(git -C ${BASE_DIR} rev-parse --short --verify HEAD)
GIT_ID=$(git -C ${BASE_DIR} describe --dirty | sed -e "s|/|_|g")
GIT_ID=$(git -C ${BASE_DIR} describe --dirty --always | sed -e "s|/|_|g")
TAG_NAME=${TAG_NAME:-$GIT_ID}
BUILD_TYPE=${BUILD_TYPE:-Debug}
USE_OPENSSL=${USE_OPENSSL:-true}
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_update_from_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CLEAN_PG_PORT=${CLEAN_PG_PORT:-6433}
PG_VERSION=${PG_VERSION:-9.6.5} # Need 9.6.x version since we are
# upgrading the extension from
# versions that didn't support PG10.
GIT_ID=$(git -C ${BASE_DIR} describe --dirty | sed -e "s|/|_|g")
GIT_ID=$(git -C ${BASE_DIR} describe --dirty --always | sed -e "s|/|_|g")
UPDATE_FROM_IMAGE=${UPDATE_FROM_IMAGE:-timescale/timescaledb}
UPDATE_FROM_TAG=${UPDATE_FROM_TAG:-0.1.0}
UPDATE_TO_IMAGE=${UPDATE_TO_IMAGE:-update_test}
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_updates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TEST_TMPDIR=${TEST_TMPDIR:-$(mktemp -d 2>/dev/null || mktemp -d -t 'timescaledb_
BASE_DIR=${PWD}/${SCRIPT_DIR}/..
TAGS=${TAGS:-}
TEST_VERSION=${TEST_VERSION:-}
GIT_ID=$(git -C ${BASE_DIR} describe --dirty | sed -e "s|/|_|g")
GIT_ID=$(git -C ${BASE_DIR} describe --dirty --always | sed -e "s|/|_|g")
UPDATE_TO_IMAGE=${UPDATE_TO_IMAGE:-update_test}
UPDATE_TO_TAG=${UPDATE_TO_TAG:-${GIT_ID}}
PG_VERSION=${PG_VERSION:-9.6.5} # Need 9.6.x version since we are
Expand Down

0 comments on commit 981147f

Please sign in to comment.