Skip to content

Commit 9fe701f

Browse files
committed
Made release notes script portable.
1 parent cd33b4f commit 9fe701f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

docs/docs/releases/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
This is developer documentation to help with release notes. It is not published in our docs guide.
44

5+
## Requirements
6+
- This script assumes you're running a Bash shell.
7+
- Install [DuckDB](https://duckdb.org/#quickinstall).
8+
- On Macs, the easiest way to do this is via [Homebrew](https://brew.sh/): `brew install duckdb`.
9+
- Install the [GitHub CLI](https://cli.github.com/).
10+
- On Macs, the easiest way to do this is via [Homebrew](https://brew.sh/): `brew install gh`.
11+
- If you're on a Mac, you also need to:
12+
- Install the GNU date library and alias it to the `date` command: `brew install coreutils ; echo "alias date=gdate" >> ~/.bash_profile`
13+
514
## How to generate release notes
615

716
1. Run the `find_missing_prs.sh` script, passing the release version number as the only argument.

docs/docs/releases/find_missing_prs.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
shopt -s expand_aliases
4+
source ~/.bash_profile
5+
36
function print_help {
47
cat << EOF
58
Usage: $(basename $0) <VERSION_NUMBER>
@@ -44,7 +47,7 @@ TEMPLATE_FILE=TEMPLATE.md
4447
# If the notes file doesn't yet exist, create one
4548
if [ ! -f $NOTES_FILE ]; then
4649
cp $TEMPLATE_FILE $NOTES_FILE
47-
sed -i "s/__VERSION__/$RELEASE/g" $NOTES_FILE
50+
sed -i '' "s/__VERSION__/$RELEASE/g" $NOTES_FILE
4851
fi
4952

5053
PREV_NOTES_FILE=$(ls -1 | sort | grep -B 1 $NOTES_FILE | head -n 1)
@@ -95,7 +98,7 @@ gh pr list \
9598

9699
# Find and cache the URLs to any PRs that we've already referenced in the
97100
# release notes.
98-
grep -Po 'https://github\.com/mathesar-foundation/mathesar/pull/\d*' \
101+
grep -o 'https://github\.com/mathesar-foundation/mathesar/pull/\d*' \
99102
$NOTES_FILE > $INCLUDED_PRS_FILE
100103

101104
# Generate a CSV containing details for PRs that match commits in the release

0 commit comments

Comments
 (0)