Skip to content

Commit c137ec5

Browse files
authored
Merge pull request #1123 from abelsromero/fix-upstream-test
Fix upstream test
2 parents 2a57067 + ec2834e commit c137ec5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/continuous-integration.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
gradlew.bat -i -S check
6767
test-asciidoctor-upstream:
6868
name: Test Asciidoctor Upstream
69-
needs:
69+
needs:
7070
- build
7171
- build-windows
7272
strategy:
@@ -80,10 +80,10 @@ jobs:
8080
- ubuntu-latest
8181
runs-on: ${{ matrix.os }}
8282
steps:
83-
- uses: actions/checkout@v2
83+
- uses: actions/checkout@v3
8484
with:
8585
fetch-depth: 1
86-
- uses: actions/setup-java@v2
86+
- uses: actions/setup-java@v3
8787
with:
8888
distribution: temurin
8989
java-version: ${{ matrix.java }}

CHANGELOG.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bug Fixes::
3131
Build Improvement::
3232

3333
* Upgrade build to Gradle 7.5.1 (#1109)
34+
* Fix upstream tests forcing SNAPSHOT on Asciidoctor gem installation (#1123) (@abelsromero)
3435

3536
== 2.5.4 (2022-06-30)
3637

ci/test-asciidoctor-upstream.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ wget --quiet -O $SRC_DIR.zip https://github.com/asciidoctor/asciidoctor/archive/
2020
unzip -q $SRC_DIR.zip
2121
cp ../../ci/asciidoctor-gem-installer.pom $SRC_DIR/pom.xml
2222
cd $SRC_DIR
23-
readonly ASCIIDOCTOR_VERSION=`grep 'VERSION' ./lib/asciidoctor/version.rb | sed "s/.*'\(.*\)'.*/\1/" | sed "s/[.]dev$/.dev-SNAPSHOT/"`
23+
# force SNAPSHOT trailing to keep always consistency, gem-maven-plugin adds it depending on version format, breaking the build
24+
readonly ASCIIDOCTOR_VERSION="$(grep 'VERSION' ./lib/asciidoctor/version.rb | sed "s/.*'\(.*\)'.*/\1/" | sed "s/[.]dev$/.dev-SNAPSHOT/")-SNAPSHOT"
2425
# we don't use sed -i here for compatibility with OSX
2526
sed "s;<version></version>;<version>$ASCIIDOCTOR_VERSION</version>;" pom.xml > pom.xml.sedtmp && \
2627
mv -f pom.xml.sedtmp pom.xml
2728

2829
# 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
29-
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"
30+
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"
3031
popd
3132

3233
## Test against installed gem
33-
./gradlew -S -Pskip.signing -PasciidoctorGemVersion=$ASCIIDOCTOR_VERSION -PuseMavenLocal=true check
34+
./gradlew --no-daemon -S -Pskip.signing -PasciidoctorGemVersion="$ASCIIDOCTOR_VERSION" -PuseMavenLocal=true check
3435
exit $?

0 commit comments

Comments
 (0)