Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork965
Improve scripts and tool configurations#1693
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
8c4df3cf3be76f7dd8add21875b50920371e973f52be53823e604b4619dfbd87110bf8c7cdaf4f6dbba25060c9dd5479b252f9a68b88d07ed36818c4ba5ad15d8ddd9a872d9c9b9de115d150636de86a8f094909fc96980b98f15e7cca7d2e4e009de16e4c062c024e9e245d0c2472e9File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3,4 +3,4 @@ updates: | ||
| -package-ecosystem:"github-actions" | ||
| directory:"/" | ||
| schedule: | ||
| interval:"weekly" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,39 @@ | ||
| repos: | ||
| - repo: https://github.com/psf/black-pre-commit-mirror | ||
| rev:23.9.1 | ||
| hooks: | ||
| - id:black | ||
| alias: black-check | ||
| name: black (check) | ||
| args: [--check, --diff] | ||
| exclude: ^git/ext/ | ||
| stages: [manual] | ||
| - id: black | ||
| alias: black-format | ||
| name: black (format) | ||
| exclude: ^git/ext/ | ||
| - repo: https://github.com/PyCQA/flake8 | ||
| rev: 6.1.0 | ||
| hooks: | ||
| - id: flake8 | ||
| additional_dependencies: | ||
| - flake8-bugbear==23.9.16 | ||
| - flake8-comprehensions==3.14.0 | ||
| - flake8-typing-imports==1.14.0 | ||
| exclude: ^doc|^git/ext/ | ||
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.9.0.5 | ||
| hooks: | ||
| - id: shellcheck | ||
| args: [--color] | ||
| exclude: ^git/ext/ | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.4.0 | ||
| hooks: | ||
| - id: check-toml | ||
| - id: check-yaml | ||
| - id: check-merge-conflict |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -10,29 +10,39 @@ trap 'echo "$0: Check failed. Stopping." >&2' ERR | ||
| readonly version_path='VERSION' | ||
| readonly changes_path='doc/source/changes.rst' | ||
| function check_status() { | ||
EliahKagan marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| git status -s "$@" | ||
| test -z "$(git status -s "$@")" | ||
| } | ||
| function get_latest_tag() { | ||
| local config_opts | ||
| printf -v config_opts ' -c versionsort.suffix=-%s' alpha beta pre rc RC | ||
EliahKagan marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| # shellcheck disable=SC2086 # Deliberately word-splitting the arguments. | ||
| git $config_opts tag -l '[0-9]*' --sort=-v:refname | head -n1 | ||
| } | ||
| echo 'Checking current directory.' | ||
| test "$(cd -- "$(dirname -- "$0")" && pwd)" = "$(pwd)" # Ugly, but portable. | ||
| echo "Checking that $version_path and $changes_path exist and have no uncommitted changes." | ||
| test -f "$version_path" | ||
| test -f "$changes_path" | ||
| check_status -- "$version_path" "$changes_path" | ||
| # This section can be commented out, if absolutely necessary. | ||
| echo 'Checking that ALL changes are committed.' | ||
| check_status --ignore-submodules | ||
| version_version="$(<"$version_path")" | ||
| changes_version="$(awk '/^[0-9]/ {print $0; exit}' "$changes_path")" | ||
| latest_tag="$(get_latest_tag)" | ||
| head_sha="$(git rev-parse HEAD)" | ||
| latest_tag_sha="$(git rev-parse "${latest_tag}^{commit}")" | ||
| # Display a table of all the current version, tag, and HEAD commit information. | ||
| echo | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. This conveys spacing much better thanks to the separate MemberAuthor
| ||
| echo 'The VERSION must be the same in all locations, and so must the HEAD and tag SHA' | ||
| printf '%-14s = %s\n' 'VERSION file' "$version_version" \ | ||
| 'changes.rst' "$changes_version" \ | ||
| 'Latest tag' "$latest_tag" \ | ||
Uh oh!
There was an error while loading.Please reload this page.