2022-03-20 16:19:51 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Copyright 2009-2022 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/.
|
|
|
|
|
2022-04-01 14:29:06 +00:00
|
|
|
set -euo pipefail
|
2022-03-20 16:19:51 +00:00
|
|
|
|
|
|
|
log() {
|
2022-04-01 14:29:06 +00:00
|
|
|
echo -e >&2 "$@"
|
2022-03-20 16:19:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
2022-04-03 20:30:09 +00:00
|
|
|
if ! type pre-commit || ! type pip-compile-multi; then
|
|
|
|
log "Error: pre-commit or pip-compile-multi not found." \
|
2022-04-01 14:29:06 +00:00
|
|
|
"\n Hint: pip install -r requirements/dev.txt"
|
2022-03-23 15:31:29 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2022-03-20 16:19:51 +00:00
|
|
|
|
2022-03-23 15:31:29 +00:00
|
|
|
git checkout -b deps main
|
2022-03-20 16:19:51 +00:00
|
|
|
|
2022-04-03 20:30:09 +00:00
|
|
|
pip-compile-multi
|
2022-03-23 15:31:29 +00:00
|
|
|
pip install -r requirements/dev.txt
|
|
|
|
|
|
|
|
pre-commit autoupdate
|
|
|
|
pre-commit clean
|
|
|
|
|
2022-03-27 20:36:17 +00:00
|
|
|
log "Dev dependencies upgraded."
|
2022-04-01 14:29:06 +00:00
|
|
|
log "Reminders:" \
|
|
|
|
"\n - Check release notes of upgraded packages for anything that affects bidict." \
|
|
|
|
"\n - Run tests via 'tox' or by pushing to the 'deps' branch to ensure everything still works." \
|
|
|
|
"\n - Check output for any new warnings, not just test failures."
|
2022-03-20 16:19:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main
|