timescaledb/scripts/delete_released_change_logs.sh
Maheedhar PV 38ee7f49b0 Every PR to have its own changelog
The changes in this commit
1. workflow action to check if the PR has its own changelog file in
".unreleased/" folder.
2. script to merge the individual changelog entries that can be copied
into the CHANGELOG.md file.
3. script to check the format of the lines in the change log file.
4. script to delete the individual changelogs, post release.
2023-05-19 13:51:37 +05:30

15 lines
416 B
Bash
Executable File

#!/bin/bash
# Check if both old_version and new_version have been provided
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 <old_version> <new_version>"
exit 1
fi
# Assign the values to variables for easier use later
OLD_VERSION="$1"
NEW_VERSION="$2"
# Run git diff and remove the listed files
git diff --name-only "$OLD_VERSION" "$NEW_VERSION" .unreleased | grep -v '.unreleased/template.rfc822' | xargs rm