Skip to content

Commit caa9bfc

Browse files
authored
Fix jgitver version computation (#64)
1 parent d6eeb61 commit caa9bfc

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ on:
66
- master
77
- 'hf-*' # hotfix branches
88
tags:
9-
- '*.*.*-*' # xx.yy.zz-experimental
109
- '*.*.*' # release tag xx.yy.zz
1110
pull_request:
12-
branches: [ master ]
11+
branches:
12+
- master
13+
- 'hf-*'
1314

1415
jobs:
1516

@@ -21,6 +22,12 @@ jobs:
2122
steps:
2223
- name: Checkout code
2324
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
- run: |
28+
git fetch -f --tags
29+
echo exit code $?
30+
git tag --list
2431
2532
- name: Set up JDK 1.8
2633
uses: actions/setup-java@v1

.github/workflows/deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
tags:
66
- '*.*.*'
7-
- '*.*.*-*'
87

98
jobs:
109

@@ -15,6 +14,12 @@ jobs:
1514
steps:
1615
- name: Checkout code
1716
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- run: |
20+
git fetch -f --tags
21+
echo exit code $?
22+
git tag --list
1823
1924
- name: Set up JDK 1.8
2025
uses: actions/setup-java@v1

.mvn/jgitver.config.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<configuration xmlns="http://jgitver.github.io/maven/configuration/1.0.0-beta"
1818
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1919
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.0.0-beta https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_0_0-beta.xsd ">
20-
<regexVersionTag>[rv]?([0-9.]+)</regexVersionTag>
20+
<regexVersionTag>^([0-9\.]+)(-(GA|beta|alpha|xp.*))?$</regexVersionTag>
21+
<mavenLike>true</mavenLike>
2122
<branchPolicies>
2223
<branchPolicy>
2324
<pattern>(hf-.*)</pattern> <!-- regex pattern for hotfix branches -->

0 commit comments

Comments
 (0)