Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f5da163

Browse filesBrowse files
committed
Have "make release" check other release preconditions
As documented in the release instructions in README.md.
1 parent ae9405a commit f5da163
Copy full SHA for f5da163

1 file changed

+19-3Lines changed: 19 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+19-3Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,29 @@ clean:
77
rm -rf build/ dist/ .eggs/ .tox/
88

99
release: clean
10-
# Check if latest tag is the current head we're releasing
11-
@config_opts="$$(printf ' -c versionsort.suffix=-%s' alpha beta pre rc RC)" && \
10+
# Check that VERSION and changes.rst exist and have no uncommitted changes
11+
test -f VERSION
12+
test -f doc/source/changes.rst
13+
git status -s VERSION doc/source/changes.rst
14+
@test -z "$$(git status -s VERSION doc/source/changes.rst)"
15+
16+
# Check that ALL changes are commited (can comment out if absolutely necessary)
17+
git status -s
18+
@test -z "$$(git status -s)"
19+
20+
# Check that latest tag matches version and is the current head we're releasing
21+
@version_file="$$(cat VERSION)" && \
22+
changes_file="$$(awk '/^[0-9]/ {print $$0; exit}' doc/source/changes.rst)" && \
23+
config_opts="$$(printf ' -c versionsort.suffix=-%s' alpha beta pre rc RC)" && \
1224
latest_tag=$$(git $$config_opts tag -l '[0-9]*' --sort=-v:refname | head -n1) && \
1325
head_sha=$$(git rev-parse HEAD) latest_tag_sha=$$(git rev-parse "$$latest_tag") && \
14-
printf '%-14s = %s\n' 'Latest tag' "$$latest_tag" \
26+
printf '%-14s = %s\n' 'VERSION file' "$$version_file" \
27+
'changes.rst' "$$changes_file" \
28+
'Latest tag' "$$latest_tag" \
1529
'HEAD SHA' "$$head_sha" \
1630
'Latest tag SHA' "$$latest_tag_sha" && \
31+
test "$$version_file" = "$$changes_file" && \
32+
test "$$latest_tag" = "$$version_file" && \
1733
test "$$head_sha" = "$$latest_tag_sha"
1834

1935
make force_release

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.