diff --git a/README.adoc b/README.adoc index 2b1b0bda..76f24e24 100644 --- a/README.adoc +++ b/README.adoc @@ -337,6 +337,8 @@ Spring Cloud Build Docs comes with a set of attributes for asciidoctor that you ${project.version}@ ${github-tag}@ ${version-type}@ + + ${docs-url}@ ${raw-docs-url}@ ${project.version}@ diff --git a/docs/pom.xml b/docs/pom.xml index 8444d0c9..473f37f8 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -209,7 +209,6 @@ ${skipTests} - true ${basedir}/src/test/bash/run-bats.sh diff --git a/docs/src/test/bash/build-helper.sh b/docs/src/test/bash/build-helper.sh index 818c58e6..8308c252 100755 --- a/docs/src/test/bash/build-helper.sh +++ b/docs/src/test/bash/build-helper.sh @@ -20,13 +20,17 @@ if [[ $# -ne 1 ]]; then usage fi -SHELLCHECK_VERSION="v0.6.0" +SHELLCHECK_VERSION="v0.7.0" +ARCH="x86_64" +if [ "$(uname -m)" == aarch64 ]; then + ARCH="aarch64" +fi SHELLCHECK_BIN="${ROOT_DIR}/../target/shellcheck-${SHELLCHECK_VERSION}/shellcheck" case $1 in download-shellcheck) if [[ "${OSTYPE}" == linux* && ! -z "${SHELLCHECK_BIN}" ]]; then - SHELLCHECK_ARCHIVE="shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" + SHELLCHECK_ARCHIVE="shellcheck-${SHELLCHECK_VERSION}.linux.${ARCH}.tar.xz" if [[ -x "${ROOT_DIR}/../target/shellcheck-${SHELLCHECK_VERSION}/shellcheck" ]]; then echo "shellcheck already downloaded - skipping..." exit 0 @@ -55,6 +59,8 @@ case $1 in exit 0 fi git clone https://github.com/bats-core/bats-core.git "${ROOT_DIR}/../target/bats" + git clone https://github.com/ztombol/bats-support.git "${ROOT_DIR}/target/test_helper/bats-support" + git clone https://github.com/ztombol/bats-assert "${ROOT_DIR}/target/test_helper/bats-assert" ;; run-bats) echo "Running bats" diff --git a/docs/src/test/bats/ghpages.bats b/docs/src/test/bats/ghpages.bats index 6bd942d8..ad7a4aaa 100644 --- a/docs/src/test/bats/ghpages.bats +++ b/docs/src/test/bats/ghpages.bats @@ -1,8 +1,8 @@ #!/usr/bin/env bats load 'test_helper' -load 'test_helper/bats-support/load' -load 'test_helper/bats-assert/load' +load '../../../target/test_helper/bats-support/load' +load '../../../target/test_helper/bats-assert/load' setup() { export TEMP_DIR="$( mktemp -d )" @@ -84,6 +84,7 @@ export -f printing_git_with_remotes export -f stubbed_git @test "should upload the built docs to the root of gh-pages for snapshot versions" { + export BRANCH=master export GIT_BIN="stubbed_git" export SOURCE_FUNCTIONS="" export RELEASER_GIT_OAUTH_TOKEN="mytoken" @@ -111,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" @@ -145,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" @@ -217,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 diff --git a/docs/src/test/bats/test_helper/bats-assert b/docs/src/test/bats/test_helper/bats-assert deleted file mode 160000 index 9f88b420..00000000 --- a/docs/src/test/bats/test_helper/bats-assert +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9f88b4207da750093baabc4e3f41bf68f0dd3630 diff --git a/docs/src/test/bats/test_helper/bats-support b/docs/src/test/bats/test_helper/bats-support deleted file mode 160000 index 004e7076..00000000 --- a/docs/src/test/bats/test_helper/bats-support +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 004e707638eedd62e0481e8cdc9223ad471f12ee diff --git a/docs/src/test/bats/update-guides.bats b/docs/src/test/bats/update-guides.bats index fc7871bc..e45a3183 100644 --- a/docs/src/test/bats/update-guides.bats +++ b/docs/src/test/bats/update-guides.bats @@ -1,8 +1,8 @@ #!/usr/bin/env bats load 'test_helper' -load 'test_helper/bats-support/load' -load 'test_helper/bats-assert/load' +load '../../../target/test_helper/bats-support/load' +load '../../../target/test_helper/bats-assert/load' setup() { export TEMP_DIR="$( mktemp -d )" diff --git a/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml b/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml index f5f67058..b7204284 100644 --- a/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml +++ b/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml @@ -9,6 +9,7 @@ +