Skip to content
Snippets Groups Projects

Version check based on regex match

Closed Raghunandan Netrapalli Madhusudhan requested to merge develop into main
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -40,7 +40,7 @@ if [[ $exit_status -ne 0 ]]; then
@@ -40,7 +40,7 @@ if [[ $exit_status -ne 0 ]]; then
fi
fi
# Check if the output is exactly the tag name (ignoring 'v' prefix)
# Check if the output is exactly the tag name (ignoring 'v' prefix)
if [[ "${version_output#v}" == "${TAG_NAME#v}" ]]; then
if [[ "$version_output" =~ ${TAG_NAME#v}$ ]]; then
echo "Version is correctly set: $version_output"
echo "Version is correctly set: $version_output"
else
else
echo "Version is falsely set: $version_output"
echo "Version is falsely set: $version_output"
Loading