File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,14 @@ echo "Extracted version: ${BOOKSTACK_VERSION}"
1616# Remove the 'v' for our tags
1717BOOKSTACK_VERSION=" ${BOOKSTACK_VERSION/# v/ } "
1818# Remove leading zeros to make the version fit a SemVer-shaped hole
19- BOOKSTACK_VERSION=" ${BOOKSTACK_VERSION/ .0/ .} "
20- # And again for patch version, just in case
21- BOOKSTACK_VERSION=" ${BOOKSTACK_VERSION/ .0/ .} "
19+ BOOKSTACK_VERSION=" ${BOOKSTACK_VERSION// .0?/ .} "
20+
21+ # If the version only has one decimal dot in it, it doesn't have a patch
22+ # version and one should be added to ensure semver-shape.
23+ BS_DECIMALS=" ${BOOKSTACK_VERSION// [^.]} "
24+ if [[ " ${# BS_DECIMALS} " -eq " 1" ]]; then
25+ BOOKSTACK_VERSION=" ${BOOKSTACK_VERSION} .0"
26+ fi
2227
2328echo " Tag name: ${BOOKSTACK_VERSION} "
2429
You can’t perform that action at this time.
0 commit comments