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

Sign up
Appearance settings

Fix up checks in Makefile and make them portable #1661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Byron merged 18 commits into gitpython-developers:main from EliahKagan:portable-makefile
Sep 15, 2023
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6fb2318
Reference HEAD in Makefile (more portable than head)
EliahKagan Sep 11, 2023
335d03b
Have Makefile use git tag to sort the tags
EliahKagan Sep 11, 2023
b1c61d9
Make "git tag" sort our SemVer-ish tags correctly
EliahKagan Sep 13, 2023
cc202cc
Improve when and how Makefile suggests virtual env
EliahKagan Sep 13, 2023
b54c346
Use "python" in the virtual env, "python3" outside
EliahKagan Sep 13, 2023
ae9405a
LF line endings for scripts that may need them
EliahKagan Sep 13, 2023
f5da163
Have "make release" check other release preconditions
EliahKagan Sep 13, 2023
5cf7f97
Fix non-venv branch always failing
EliahKagan Sep 13, 2023
6495d84
Extract checks from release target to script
EliahKagan Sep 14, 2023
4b1c564
Extract build from force_release target to script
EliahKagan Sep 14, 2023
729372f
Prevent buggy interaction between MinGW and WSL
EliahKagan Sep 14, 2023
ba84db4
Fix message wording that was opposite of intended
EliahKagan Sep 14, 2023
de40e68
Ignore some other virtual environment directories
EliahKagan Sep 14, 2023
693d041
make `.gitattributes` file more generic
Byron Sep 15, 2023
962f747
submodules don't contribute to the release; ignore their changes
Byron Sep 15, 2023
d18d90a
Use 'echo' where possible to avoid explicit newlines
Byron Sep 15, 2023
5919f8d
Be explicit on how to interpret the data table
Byron Sep 15, 2023
1e0b3f9
refinements to `build-reelase.sh`
Byron Sep 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make "git tag" sort our SemVer-ish tags correctly
This sorts numerically for each of major, minor, and patch,
rather than, e.g., rating 2.1.15 as a higher version than 2.1.2.
It also rates things like X-beta and X-rc as lower versions than X,
but X-patched (not SemVer, but present in this project) as higher
versions than X.
  • Loading branch information
EliahKagan committed Sep 13, 2023
commit b1c61d933d36a8e7fb6fb4109d2b07bd06bfbf32
12 changes: 8 additions & 4 deletions Makefile
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ clean:

release: clean
# Check if latest tag is the current head we're releasing
echo "Latest tag = $$(git tag -l '[0-9]*' --sort=-v:refname | head -n1)"
echo "HEAD SHA = $$(git rev-parse HEAD)"
echo "Latest tag SHA = $$(git tag -l '[0-9]*' --sort=-v:refname | head -n1 | xargs git rev-parse)"
@test "$$(git rev-parse HEAD)" = "$$(git tag -l '[0-9]*' --sort=-v:refname | head -n1 | xargs git rev-parse)"
@config_opts="$$(printf ' -c versionsort.suffix=-%s' alpha beta pre rc RC)" && \
latest_tag=$$(git $$config_opts tag -l '[0-9]*' --sort=-v:refname | head -n1) && \
head_sha=$$(git rev-parse HEAD) latest_tag_sha=$$(git rev-parse "$$latest_tag") && \
printf '%-14s = %s\n' 'Latest tag' "$$latest_tag" \
'HEAD SHA' "$$head_sha" \
'Latest tag SHA' "$$latest_tag_sha" && \
test "$$head_sha" = "$$latest_tag_sha"

make force_release

force_release: clean
Expand Down

AltStyle によって変換されたページ (->オリジナル) /