We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0bde33 commit 67a8948Copy full SHA for 67a8948
scripts/update_tags_and_docs.sh
@@ -16,9 +16,14 @@ echo "Extracted version: ${BOOKSTACK_VERSION}"
16
# Remove the 'v' for our tags
17
BOOKSTACK_VERSION="${BOOKSTACK_VERSION/#v/}"
18
# 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?/.}"
+
+# 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
27
28
echo "Tag name: ${BOOKSTACK_VERSION}"
29
0 commit comments