Skip to content

Commit

Permalink
Fix docs publish
Browse files Browse the repository at this point in the history
  • Loading branch information
airsquared committed Sep 24, 2023
1 parent b4e3d2a commit ba85067
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ gradlePlugin {
implementationClass = 'org.beryx.jlink.JlinkPlugin'
displayName = 'Badass JLink Plugin'
description = 'A Gradle plugin that assembles your modules into a custom runtime image'
tags.set(['jlink', 'jpms', 'image'])
tags.set(['jlink', 'jpackage', 'jpms'])
}
}
}
Expand All @@ -98,7 +98,6 @@ asciidoctor {
'project-version': project.version,
icons: 'font',
imagesdir: 'img',
'data-uri': '',
linkattrs: true,
linkcss: true,
'git-tag': badassJlinkPluginTag,
Expand All @@ -109,10 +108,11 @@ gitPublish {
repoUri = 'https://github.com/beryx/badass-jlink-plugin.git'
branch = 'gh-pages'

def pgType = hasProperty('ghPageType') ? ghPageType : 'latest'
def pgType = project.hasProperty('ghPageType') ? ghPageType : 'latest'
if (pgType == 'init') {
contents.from file('ghpages')
} else if (pgType == 'list') {
gitPublishReset.dependsOn('update-release-list')
contents.from file('build/release-list')
} else {
contents.from file(asciidoctor.outputDir.path)
Expand Down
10 changes: 6 additions & 4 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/bin/bash
set -ev

GRADLE_COMMAND='./gradlew --info gitPublishPush --rerun-tasks'

if [ "${GITHUB_REF}" == "refs/heads/master" ]; then
if [ "$(git ls-remote origin gh-pages)" == "" ]; then
echo Start gitPublishPush with ghPageType=init
./gradlew --no-daemon -i -s gitPublishPush --rerun-tasks -PghPageType=init
$GRADLE_COMMAND -PghPageType=init
echo Finished gitPublishPush with ghPageType=init
fi
echo Start gitPublishPush with ghPageType=latest
./gradlew --no-daemon -i -s gitPublishPush --rerun-tasks -PghPageType=latest
$GRADLE_COMMAND -PghPageType=latest
echo Finished gitPublishPush with ghPageType=version

echo Start gitPublishPush with ghPageType=version
./gradlew --no-daemon -i -s gitPublishPush --rerun-tasks -PghPageType=version
$GRADLE_COMMAND -PghPageType=version
echo Finished gitPublishPush with ghPageType=version

echo Start updating releases.md
./gradlew --no-daemon -i -s update-release-list gitPublishPush --rerun-tasks -PghPageType=list
$GRADLE_COMMAND -PghPageType=list
echo Finished updating releases.md
fi

0 comments on commit ba85067

Please sign in to comment.