Skip to content

Commit

Permalink
chore(hack): allow for revisions count
Browse files Browse the repository at this point in the history
It is possible now to define how many revisions back the script should
investigate. By default it is 5.

To change it to 3:

```
./hack/generate-release-notes.sh 3
```
  • Loading branch information
goldmann committed Jan 29, 2025
1 parent 93d439d commit f225d1e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hack/generate-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@

set -e

if [ "$#" -ne 0 ]; then
echo "Illegal number of parameters, provided $#, required: 0"
if [ "$#" -gt 1 ]; then
echo "Illegal number of parameters, provided $#, required: 0 or 1"
echo
echo "Usage:"
echo " ${0}"
echo " ${0} 3"
exit 1
fi

KUBE_CONTEXT="${KUBE_CONTEXT:-aws-prod}"
REVISIONS=5
REVISIONS="${1:-5}"

export TZ=":UTC"

echo "---- Release history ----"
history=$(helm --kube-context "${KUBE_CONTEXT}" -n sbomer--runtime-int history --max ${REVISIONS} sbomer 2>/dev/null)
history=$(helm --kube-context "${KUBE_CONTEXT}" -n sbomer--runtime-int history --max ${REVISIONS} sbomer)

echo "$history"

Expand Down

0 comments on commit f225d1e

Please sign in to comment.