diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index c521fa2c..399079b4 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -66,7 +66,7 @@ jobs: gradlew.bat -i -S check test-asciidoctor-upstream: name: Test Asciidoctor Upstream - needs: + needs: - build - build-windows strategy: @@ -80,10 +80,10 @@ jobs: - ubuntu-latest runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 1 - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: distribution: temurin java-version: ${{ matrix.java }} diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index f650a0fe..30ba876d 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -31,6 +31,7 @@ Bug Fixes:: Build Improvement:: * Upgrade build to Gradle 7.5.1 (#1109) +* Fix upstream tests forcing SNAPSHOT on Asciidoctor gem installation (#1123) (@abelsromero) == 2.5.4 (2022-06-30) diff --git a/ci/test-asciidoctor-upstream.sh b/ci/test-asciidoctor-upstream.sh index 9ecba523..4e065167 100755 --- a/ci/test-asciidoctor-upstream.sh +++ b/ci/test-asciidoctor-upstream.sh @@ -20,15 +20,16 @@ wget --quiet -O $SRC_DIR.zip https://github.com/asciidoctor/asciidoctor/archive/ unzip -q $SRC_DIR.zip cp ../../ci/asciidoctor-gem-installer.pom $SRC_DIR/pom.xml cd $SRC_DIR -readonly ASCIIDOCTOR_VERSION=`grep 'VERSION' ./lib/asciidoctor/version.rb | sed "s/.*'\(.*\)'.*/\1/" | sed "s/[.]dev$/.dev-SNAPSHOT/"` +# force SNAPSHOT trailing to keep always consistency, gem-maven-plugin adds it depending on version format, breaking the build +readonly ASCIIDOCTOR_VERSION="$(grep 'VERSION' ./lib/asciidoctor/version.rb | sed "s/.*'\(.*\)'.*/\1/" | sed "s/[.]dev$/.dev-SNAPSHOT/")-SNAPSHOT" # we don't use sed -i here for compatibility with OSX sed "s;;$ASCIIDOCTOR_VERSION;" pom.xml > pom.xml.sedtmp && \ mv -f pom.xml.sedtmp pom.xml # we override the jruby version here with one supported by java9, additionally java9 needs some add-opens arguments that need to be ignored on older jvms -mvn install -B --no-transfer-progress -Dgemspec=asciidoctor.gemspec -Djruby.version=9.2.17.0 -Djruby.jvmargs="-XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED" +mvn install -B --no-transfer-progress -Dgemspec="asciidoctor.gemspec" -Djruby.version=9.2.17.0 -Djruby.jvmargs="-XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED" popd ## Test against installed gem -./gradlew -S -Pskip.signing -PasciidoctorGemVersion=$ASCIIDOCTOR_VERSION -PuseMavenLocal=true check +./gradlew --no-daemon -S -Pskip.signing -PasciidoctorGemVersion="$ASCIIDOCTOR_VERSION" -PuseMavenLocal=true check exit $?