From cedbdc586d9c0aba087d1170d531cf98af2d0189 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 11 Jun 2019 10:06:19 +0200 Subject: [PATCH] Updated release train pushing --- docs/src/main/asciidoc/ghpages.sh | 9 +++++++++ docs/src/test/bats/ghpages.bats | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/ghpages.sh b/docs/src/main/asciidoc/ghpages.sh index 3adb610a..9d023533 100755 --- a/docs/src/main/asciidoc/ghpages.sh +++ b/docs/src/main/asciidoc/ghpages.sh @@ -86,6 +86,8 @@ function retrieve_current_branch() { function switch_to_tag() { if [[ "${RELEASE_TRAIN}" != "yes" ]] ; then "${GIT_BIN}" checkout v"${VERSION}" + else + echo "Not switching to tag" fi } @@ -93,6 +95,8 @@ function switch_to_tag() { function build_docs_if_applicable() { if [[ "${BUILD}" == "yes" ]] ; then ./mvnw clean install -P docs -pl docs -DskipTests + else + echo "Not building docs" fi } @@ -100,6 +104,11 @@ function build_docs_if_applicable() { # Get whitelisted branches - assumes that a `docs` module is available under `docs` profile # shellcheck disable=SC2016 function retrieve_doc_properties() { + if [[ "${RELEASE_TRAIN}" == "yes" ]]; then + echo "Will not extract any properties for release train" + return + fi + echo "Extracting doc properties" MAIN_ADOC_VALUE=$("${MAVEN_EXEC}" -q \ -Dexec.executable="echo" \ -Dexec.args='${docs.main}' \ diff --git a/docs/src/test/bats/ghpages.bats b/docs/src/test/bats/ghpages.bats index cc589b7a..3e24f707 100644 --- a/docs/src/test/bats/ghpages.bats +++ b/docs/src/test/bats/ghpages.bats @@ -161,7 +161,6 @@ export -f stubbed_git assert_output --partial "git remote set-url --push origin https://mytoken@foo.bar/baz.git" # Previous branch was [master] assert_output --partial "git checkout master" - assert_output --partial "Extracted 'main.adoc' from Maven build [home]" assert_output --partial "git stash" assert_output --partial "git checkout gh-pages" assert_output --partial "git pull origin gh-pages"