File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed
Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 1- Upcoming release
2- ================
3-
411.0.0 (January 24, 2018)
52========================
63
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # Collects the pull-requests since the latest release and
4+ # aranges them in the CHANGES.txt file.
5+ #
6+ # This is a script to be run before releasing a new version.
7+ #
8+ # Usage /bin/bash update_changes.sh 1.0.1
9+ #
10+
11+ # Setting # $ help set
12+ set -u # Treat unset variables as an error when substituting.
13+ set -x # Print command traces before executing command.
14+
15+ # Check whether the Upcoming release header is present
16+ head -1 CHANGES | grep -q Upcoming
17+ UPCOMING=$?
18+
19+ # Elaborate today's release header
20+ HEADER=" $1 ($( date ' +%B %d, %Y' ) )"
21+ echo $HEADER >> newchanges
22+ echo $( printf " %${# HEADER} s" | tr " " " =" ) >> newchanges
23+ echo " " >> newchanges
24+
25+ # Search for PRs since previous release
26+ git log --grep=" Merge pull request" ` git describe --tags --abbrev=0` ..HEAD --pretty=' format: * %b %s' | sed ' s+Merge pull request \#\([^\d]*\)\ from\ .*+(https://github.com/nipy/nipype/pull/\1)+' >> newchanges
27+ echo " " >> newchanges
28+ echo " " >> newchanges
29+
30+ # Append old CHANGES
31+ if [[ " $UPCOMING " == " 0" ]]; then
32+ # Drop the Upcoming title if present
33+ tail -n+4 CHANGES >> newchanges
34+ else
35+ cat CHANGES >> newchanges
36+ fi
37+
38+ # Replace old CHANGES with new file
39+ mv newchanges CHANGES
40+
You can’t perform that action at this time.
0 commit comments