Skip to content

Commit ac16a81

Browse files
authored
Adds a Python version bump task
This is meant to be run after altering the Python version in .python-version and throughout pyproject.toml. I did a bunch of Python bumps today and all of them worked with this pattern.
1 parent 1cbfd35 commit ac16a81

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ deps-py: install-python $(POETRY_TASK) poetry-use-pyenv poetry-install ## Instal
203203
deps-py-update: poetry-update ## Update Poetry deps, e.g. after adding a new one manually
204204
@echo "$(COLOR_GREEN)All Python deps updated!$(COLOR_RESET)"
205205

206+
.PHONY: deps-py-upgrade-python
207+
deps-py-upgrade-python: ## Run after upgrading Python version
208+
@echo "$(COLOR_ORANGE)Running deps twice with possible poetry-relock…$(COLOR_RESET)"
209+
$(MAKE) deps || $(MAKE) poetry-relock
210+
$(MAKE) deps
211+
@echo "$(COLOR_GREEN)Python version updated! Don't forget to run check and test.$(COLOR_RESET)"
212+
206213
COLOR_ORANGE = \033[33m
207214
COLOR_BLUE = \033[34m
208215
COLOR_RED = \033[31m

0 commit comments

Comments
 (0)