Skip to content

Commit

Permalink
Fix release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Aug 12, 2024
1 parent e72741e commit a2dfd81
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions bin/delete-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ if [ -z "$version" ]; then
echo "version is required"
exit_help
fi
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "invalid version"
# allow only x.y.z and x.y.z-n versions
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then
echo "invalid version ""$version"""
exit_help
fi

Expand Down
5 changes: 3 additions & 2 deletions bin/delete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ if [ -z "$version" ]; then
echo "version is required"
exit_help
fi
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "invalid version"
# allow only x.y.z and x.y.z-n versions
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then
echo "invalid version ""$version"""
exit_help
fi

Expand Down
6 changes: 3 additions & 3 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ if [ -z "$version" ]; then
echo "version is required"
exit_help
fi
# allow only x.y.z versions and not x.y.z-1 or x.y.z-2
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+\(-[0-9]+\)?$ ]]; then
echo "invalid version"
# allow only x.y.z and x.y.z-n versions
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then
echo "invalid version ""$version"""
exit_help
fi

Expand Down
5 changes: 3 additions & 2 deletions bin/tag-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ if [ -z "$version" ]; then
echo "version is required"
exit_help
fi
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "invalid version"
# allow only x.y.z and x.y.z-n versions
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then
echo "invalid version ""$version"""
exit_help
fi

Expand Down
5 changes: 3 additions & 2 deletions bin/tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ if [ -z "$version" ]; then
echo "version is required"
exit_help
fi
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "invalid version"
# allow only x.y.z and x.y.z-n versions
if [[ ! $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9]+)?$ ]]; then
echo "invalid version ""$version"""
exit_help
fi

Expand Down

0 comments on commit a2dfd81

Please sign in to comment.