From c0d32ae1727c04bcfd65704e892dae8747b79ba9 Mon Sep 17 00:00:00 2001 From: refcell Date: Wed, 6 Nov 2024 18:59:51 -0500 Subject: [PATCH] feat: changelog scripts --- scripts/changelog.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/changelog.sh diff --git a/scripts/changelog.sh b/scripts/changelog.sh new file mode 100644 index 0000000..031fefd --- /dev/null +++ b/scripts/changelog.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -e -o pipefail + +root=$(dirname "$(dirname "$0")") +cmd=(git cliff --workdir "$root" --output "$root/CHANGELOG.md" "$@") + +if [ "$DRY_RUN" = "true" ]; then + echo "skipping due to dry run: ${cmd[*]}" >&2 + exit 0 +else + "${cmd[@]}" +fi