Skip to content

Commit d296393

Browse files
committed
Improve zip_mod.sh
1 parent 1a45847 commit d296393

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.scripts/zip_mod.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ MOD_NAME=$(jq -r '.name' info.json)
5757
MOD_VERSION=$(jq -r '.version' info.json)
5858

5959

60+
# Validate the version string we're building
61+
if ! echo "${MOD_VERSION}" | grep -P --quiet '^(v)?\d+\.\d+\.\d+$'; then
62+
echo "Bad version, needs to be (v)%u.%u.%u"
63+
exit 1
64+
fi
65+
66+
6067
### Prepare zip for Factorio native use and mod portal
6168
### https://www.7-zip.org/download.html
6269
name="${MOD_NAME}_${MOD_VERSION}"

0 commit comments

Comments
 (0)