Skip to content

Commit

Permalink
Move verlte
Browse files Browse the repository at this point in the history
  • Loading branch information
ldziedziul committed Oct 16, 2024
1 parent d427a67 commit ddb5d70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/scripts/get-tags-to-push.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/version.functions.sh"

function find_last_matching_version() {
FILTER=$1
git tag | grep -v BETA | grep -v DEVEL | grep '^v' | cut -c2- | grep "^$FILTER" | tail -n 1
Expand All @@ -9,10 +12,6 @@ function get_latest_version() {
find_last_matching_version ""
}

function verlte() {
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
}

function get_version_only_tags_to_push() {
local VERSION_TO_RELEASE=$1
local IS_LATEST_LTS=$2
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/version.functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function get_latest_patch_versions() {
echo "${LATEST_PATCH_VERSIONS[@]}"
}

function verlte() {
[ "$1" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ]
}

get_tags_descending() {
git tag -l "v*" | sort -V -r | grep -v '-'
}
Expand Down

0 comments on commit ddb5d70

Please sign in to comment.