Skip to content

Commit ece032b

Browse files
committed
fix: resolve docs javadoc version from git tags
Ensure docs-pages checkout uses full history and fetches tags so gradle-jgitver can derive semantic versions instead of fallback 0.0.0-0. Add a workflow guard that fails early when fallback version is resolved.
1 parent 7808917 commit ece032b

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/docs-pages.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
2224

2325
- name: Set up Node.js
2426
uses: actions/setup-node@v4
@@ -34,6 +36,24 @@ jobs:
3436
- name: Set up Gradle
3537
uses: gradle/actions/setup-gradle@v4
3638

39+
- name: Fetch tags for jgitver
40+
run: git fetch --force --tags
41+
42+
- name: Validate resolved version for JavaDoc
43+
shell: bash
44+
run: |
45+
version="$(./gradlew --no-daemon -q :snapfx-core:properties | awk -F': ' '/^version:/ {print $2; exit}')"
46+
if [ -z "${version}" ]; then
47+
echo "::error::Could not resolve project version from Gradle properties."
48+
exit 1
49+
fi
50+
51+
echo "Resolved version: ${version}"
52+
if [ "${version}" = "0.0.0-0" ]; then
53+
echo "::error::Resolved fallback version 0.0.0-0. Ensure full git history and tags are available for gradle-jgitver."
54+
exit 1
55+
fi
56+
3757
- name: Generate API JavaDoc
3858
run: ./gradlew --no-daemon :snapfx-core:javadoc
3959

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Changelog categories for `Unreleased` and new release sections (in order, includ
1616

1717
## Unreleased
1818

19+
### Build and Tooling
20+
- ✅ Updated the GitHub Pages docs workflow to fetch full Git history and tags for `gradle-jgitver`, and added a JavaDoc version guard that fails if fallback version `0.0.0-0` is resolved.
21+
1922
## v0.7.1 - 2026-03-17
2023

2124
### Fixes

0 commit comments

Comments
 (0)