-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
update_dev_dependencies
executable file
·41 lines (34 loc) · 1.04 KB
/
update_dev_dependencies
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
#
# Copyright 2009-2024 Joshua Bronson. All rights reserved.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -euo pipefail
log() {
>&2 printf "> %s\n" "$@"
}
main() {
declare -r hint="Hint: Use 'nix develop' to bootstrap a development environment"
for cmd in uv pre-commit; do
if ! type "$cmd"; then
log "Error: No '$cmd' on PATH. $hint"
exit 1
fi
done
log "Upgrading PyPI dependencies..."
uv lock --upgrade
log "Upgrading PyPI dependencies: Done"
log
log "Upgrading pre-commit hooks..."
pre-commit autoupdate
log "Done."
log
log "Reminders:"
log " - Check release notes of upgraded packages for anything that affects bidict."
log " - Ensure tests pass for all supported Python versions."
log " - Check output for any new warnings, not just test failures."
log " - Ensure 'pre-commit run --all-files' still succeeds."
}
main