Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:

steps:
- name: Checkout harmony-gdal-adapter repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 0
fetch-tags: true

- name: Extract semantic version number
run: echo "semantic_version=$(cat version.txt)" >> $GITHUB_ENV
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:

steps:
- name: Checkout harmony-gdal-adapter repository
uses: actions/checkout@v4
with:
lfs: true
uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
25 changes: 24 additions & 1 deletion bin/extract-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# 2024-01-23: Copied and modified from Swath Projector repository to HyBIG.
# 2025-07-15: Copied and modified from HyBIG to earthdata-hashdiff.
# 2025-09-05: Copied and modified from earthdata-hashdiff to HGA.
# 2025-09-22: Append git commit messages to release notes.
#
###############################################################################

Expand All @@ -28,5 +29,27 @@ LINK_PATTERN="^\[.*\]:.*https://github.com/nasa"
# VERSION_PATTERN
result=$(awk "/$VERSION_PATTERN/{c++; if(c==2) exit;} c==1" "$CHANGELOG_FILE")

# Get all commit messages since the last release (marked with a git tag). If
# there are no tags, get the full commit history of the repository.
if [[ $(git tag) ]]
then
# There are git tags, so get the most recent one
GIT_REF=$(git describe --tags --abbrev=0)
else
# There are not git tags, so get the initial commit of the repository
GIT_REF=$(git rev-list --max-parents=0 HEAD)
fi

# Retrieve the title line of all commit messages since $GIT_REF, filtering out
# those from the pre-commit-ci[bot] author and any containing the string
# "nasa/pre-commit-ci-update-config", which may result from merge commits.
GIT_COMMIT_MESSAGES=$(git log --oneline --format="%s" --perl-regexp --author='^(?!pre-commit-ci\[bot\]).*$' --grep="nasa\/pre-commit-ci-update-config" --invert-grep ${GIT_REF}..HEAD)

# Append git commit messages to the release notes:
if [[ ${GIT_COMMIT_MESSAGES} ]]
then
result+="\n\n## Commits\n\n${GIT_COMMIT_MESSAGES}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will have a larger font than the added/changed level. Is that what you want? ## instead of ###?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is what I wanted. It felt like this was distinct from the KeepAChangelog content, so I wanted it to be clear that it wasn't just a subsection of that. I don't have a strong opinion on if that's best, but it is intentional.

fi

# Print the result
echo "$result" | grep -v "$VERSION_PATTERN" | grep -v "$LINK_PATTERN"
echo -e "$result" | grep -v "$VERSION_PATTERN" | grep -v "$LINK_PATTERN"