From 27553b9dd9c626d4928da53c79a6180cdd809b67 Mon Sep 17 00:00:00 2001 From: spencergibb Date: Fri, 8 May 2020 13:45:06 -0400 Subject: [PATCH] set current branch for test --- docs/src/main/asciidoc/ghpages.sh | 1 - docs/src/test/bats/ghpages.bats | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh index c286d792..bcee92e9 100755 --- a/docs/src/main/asciidoc/ghpages.sh +++ b/docs/src/main/asciidoc/ghpages.sh @@ -85,7 +85,6 @@ function retrieve_current_branch() { # Code getting the name of the current branch. For master we want to publish as we did until now # https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch # If there is a branch already passed will reuse it - otherwise will try to find it - echo "BRANCH=${BRANCH}" CURRENT_BRANCH=${BRANCH} if [[ -z "${CURRENT_BRANCH}" ]] ; then CURRENT_BRANCH=$("${GIT_BIN}" symbolic-ref -q HEAD) diff --git a/docs/src/test/bats/ghpages.bats b/docs/src/test/bats/ghpages.bats index 05cf0d8a..ad7a4aaa 100644 --- a/docs/src/test/bats/ghpages.bats +++ b/docs/src/test/bats/ghpages.bats @@ -112,6 +112,7 @@ export -f stubbed_git } @test "should upload the built docs to spring-cloud-static gh-pages branch for non-snapshot versions" { + export BRANCH=master export GIT_BIN="stubbed_git" export SOURCE_FUNCTIONS="" export RELEASER_GIT_OAUTH_TOKEN="mytoken" @@ -146,6 +147,7 @@ export -f stubbed_git } @test "should upload the release train docs to spring-cloud-static under the release train folder" { + export BRANCH=master export GIT_BIN="stubbed_git" export SOURCE_FUNCTIONS="" export RELEASER_GIT_OAUTH_TOKEN="mytoken" @@ -218,6 +220,7 @@ export -f stubbed_git } @test "should retrieve the name of the current branch" { + export BRANCH=master export GIT_BIN="stubbed_git" cd "${TEMP_DIR}/spring-cloud-stream/" source "${SOURCE_DIR}"/ghpages.sh