File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 77 rm -rf build/ dist/ .eggs/ .tox/
88
99release : 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
You can’t perform that action at this time.
0 commit comments