You've already forked prometheus-fail2ban-exporter-charts
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
a4180e0953
|
|||
c5783bd053
|
|||
7cfe55a106
|
@ -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
|
||||||
@ -79,7 +79,11 @@ function map_type_to_kind() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
COMMIT_TITLES=$(git log "${OLD_TAG}..${NEW_TAG}" --pretty=format:"%s")
|
git log --pretty=format:"%s" "${OLD_TAG}..${NEW_TAG}"
|
||||||
|
|
||||||
|
COMMIT_TITLES="$(git log --pretty=format:"%s" "${OLD_TAG}..${NEW_TAG}")"
|
||||||
|
|
||||||
|
echo "INFO: Generate change log entries from ${OLD_TAG} until ${NEW_TAG}"
|
||||||
|
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then
|
if [[ "${line}" =~ ^([a-zA-Z]+)(\([^\)]+\))?\:\ (.+)$ ]]; then
|
||||||
@ -92,6 +96,8 @@ while IFS= read -r line; do
|
|||||||
DESC="${BASH_REMATCH[3]}"
|
DESC="${BASH_REMATCH[3]}"
|
||||||
KIND=$(map_type_to_kind "${TYPE}")
|
KIND=$(map_type_to_kind "${TYPE}")
|
||||||
|
|
||||||
|
echo "- ${KIND}: ${DESC}"
|
||||||
|
|
||||||
yq --inplace ". += [ {\"kind\": \"${KIND}\", \"description\": \"${DESC}\"}]" "${YAML_FILE}"
|
yq --inplace ". += [ {\"kind\": \"${KIND}\", \"description\": \"${DESC}\"}]" "${YAML_FILE}"
|
||||||
fi
|
fi
|
||||||
done <<< "${COMMIT_TITLES}"
|
done <<< "${COMMIT_TITLES}"
|
||||||
|
@ -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}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user