Skip to content

Commit b0500bb

Browse files
CyberShadowdlang-bot
authored andcommitted
changelog/next_version.sh: Zero-pad three-digit version properly
Fix the next version being calculated as "2.0100.0".
1 parent a22db05 commit b0500bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

changelog/next_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ VERSION=${VERSION:1:7}
1212
# 2.076.1 -> (2 076 1)
1313
PARTS=(${VERSION//./ })
1414
# use 10#076 prefix to read octal as base10 int
15-
PARTS[1]=0$((10#${PARTS[1]} + 1))
15+
PARTS[1]=$(printf %03d $((10#${PARTS[1]} + 1)))
1616
PARTS[2]=0
1717
# 2 077 0 -> 2.077.0
1818
echo "${PARTS[0]}.${PARTS[1]}.${PARTS[2]}"

0 commit comments

Comments
 (0)