Skip to content

Instantly share code, notes, and snippets.

@aChase55
Created October 20, 2022 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aChase55/065034d63aa9eb9e4c6d935ce1f8a48f to your computer and use it in GitHub Desktop.
Save aChase55/065034d63aa9eb9e4c6d935ce1f8a48f to your computer and use it in GitHub Desktop.
#Slug format is version-build-configuration
VERSION_NUMBER=${SLUG%%-*}
BUILD_AND_VERSION=${SLUG#*-}
BUILD_NUMBER=${BUILD_AND_VERSION%%-*}
BUILD_CONFIGURATION=${SLUG##*-}
if ! [[ "$BUILD_CONFIGURATION" =~ ^(Debug|Release)$ ]]; then
echo "INVALID CONFIGURATION: " $BUILD_CONFIGURATION
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment