chore(ci): use git tag sort to get last two tags
This commit is contained in:
parent
c5783bd053
commit
a4180e0953
@ -8,8 +8,8 @@ if [ ! -f "${CHART_FILE}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DEFAULT_NEW_TAG="$(git describe --abbrev=0)"
|
DEFAULT_NEW_TAG="$(git tag --sort=-version:refname | head -n 1)"
|
||||||
DEFAULT_OLD_TAG="$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=1 --max-count=1)")"
|
DEFAULT_OLD_TAG="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
||||||
|
|
||||||
if [ -z "${1}" ]; then
|
if [ -z "${1}" ]; then
|
||||||
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
read -p "Enter start tag [${DEFAULT_OLD_TAG}]: " OLD_TAG
|
||||||
|
@ -26,8 +26,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git tag
|
git tag
|
||||||
|
|
||||||
NEW_TAG="$(git describe --abbrev=0)"
|
NEW_TAG="$(git tag --sort=-version:refname | head -n 1)"
|
||||||
OLD_TAG="$(git describe --abbrev=0 --tags "$(git rev-list --tags --skip=1 --max-count=1)")"
|
OLD_TAG="$(git tag --sort=-version:refname | head -n 2 | tail -n 1)"
|
||||||
|
|
||||||
.gitea/scripts/add-annotations.sh "${OLD_TAG}" "${NEW_TAG}"
|
.gitea/scripts/add-annotations.sh "${OLD_TAG}" "${NEW_TAG}"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user