Skip to content

Commit 5d772a2

Browse files
committed
chore(publish): add version format validation to publish script
- Ensure version argument follows the X.Y.Z format (e.g., 0.0.1) before proceeding with publishing
1 parent da649e5 commit 5d772a2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

backend/publish.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ if [ -z "$1" ]; then
33
exit 1
44
fi
55

6+
if ! [[ "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
7+
echo "Error: Version must be in format X.Y.Z (e.g. 0.0.1)" >&2
8+
exit 1
9+
fi
10+
11+
612
# Check if the tag already exists
713
if docker manifest inspect apillonio/nft-studio:$1 >/dev/null 2>&1; then
814
read -p "Warning: Tag $1 already exists. Do you want to overwrite it? (y/N) " confirm

0 commit comments

Comments
 (0)