Skip to content

Commit

Permalink
Extract Major and Minor Version Using grep
Browse files Browse the repository at this point in the history
  • Loading branch information
DarylTodosichuk committed Oct 22, 2024
1 parent 3dfcd60 commit d9f4f74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
id: tag-selector
run: |
# Extract the major and minor version parts
MAJOR_MINOR_VERSION=$(echo "${{env.RELEASE_VERSION}}" | sed 's/\.[0-9]*$//')
MAJOR_MINOR_VERSION=$(echo "${{env.RELEASE_VERSION}}" | grep -oE '^[0-9]+\.[0-9]+')
# Extract the latest patch version for the given major.minor version
VERSION_PATCH=$(git tag --list "${{env.RELEASE_PREFIX}}${MAJOR_MINOR_VERSION}.*" --sort=-version:refname | head -n 1 | grep -oE '[0-9]+$')
if [ -z "$VERSION_PATCH" ]; then
Expand Down
3 changes: 2 additions & 1 deletion applications/scripts/datafix-ab#001.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test1
test2
test2
test3

0 comments on commit d9f4f74

Please sign in to comment.