Skip to content

Commit

Permalink
DAS-2070 - Update extract-release-notes.sh, fix typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
owenlittlejohns committed Jan 24, 2024
1 parent 8526320 commit 2262f4f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ A short description of the changes in this PR.

## Jira Issue ID

[DAS-XXXX](https://bugs.earthdata.nasa.gov/browse/DAS-XXXX)

## Local Test Steps

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ updated:

## CI/CD:

The CI/CD for HyBIG is contained in GitHub workslofws in the
The CI/CD for HyBIG is contained in GitHub workflows in the
`.github/workflows` directory:

* `run_tests.yml` - A reusable workflow that builds the service and test Docker
Expand Down Expand Up @@ -149,5 +149,5 @@ to update the semantic version tag at the end of the full Docker image name.
You can reach out to the maintainers of this repository via email:

* [email protected]
* matthew.savioe@colorado.edu
* matthew.savoie@colorado.edu
* [email protected]
16 changes: 7 additions & 9 deletions bin/extract-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,16 @@
# 2023-06-16: Created.
# 2023-10-10: Copied from earthdata-varinfo repository to HOSS.
# 2024-01-03: Copied from HOSS repository to the Swath Projector.
# 2024-01-23: Copied from Swath Projector repository to HyBIG.
# 2024-01-23: Copied and modified from Swath Projector repository to HyBIG.
#
###############################################################################

CHANGELOG_FILE="CHANGELOG.md"
VERSION_PATTERN="^## v"
# Count number of versions in version file:
number_of_versions=$(grep -c "${VERSION_PATTERN}" ${CHANGELOG_FILE})

if [ ${number_of_versions} -gt 1 ]
then
grep -B 9999 -m 2 "${VERSION_PATTERN}" ${CHANGELOG_FILE} | sed '$d' | sed '$d'
else
cat ${CHANGELOG_FILE}
fi
# Read the file and extract text between the first two occurrences of the
# VERSION_PATTERN
result=$(awk "/$VERSION_PATTERN/{c++; if(c==2) exit;} c==1" "$CHANGELOG_FILE")

# Print the result
echo "$result" | grep -v "^#"

0 comments on commit 2262f4f

Please sign in to comment.