Add make.ps1 cmdlet + activateenv command for Windows make scripts (#4087)

* Add missing command to `make.bat`'s help

* Add `activateenv` and `deactivateenv` commands to `make.bat`

* Add help to `Makefile`

* Add `make.ps1` cmdlet
This commit is contained in:
jack1142
2021-02-27 12:23:32 +01:00
committed by GitHub
parent 53c069a636
commit 1ff976b3d0
3 changed files with 130 additions and 12 deletions

View File

@@ -1,7 +1,28 @@
.DEFAULT_GOAL := help
PYTHON ?= python3.8
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
define HELP_BODY
Usage:
make <command>
Commands:
reformat Reformat all .py files being tracked by git.
stylecheck Check which tracked .py files need reformatting.
stylediff Show the post-reformat diff of the tracked .py files
without modifying them.
gettext Generate pot files.
upload_translations Upload pot files to Crowdin.
download_translations Download translations from Crowdin.
bumpdeps Run script bumping dependencies.
newenv Create or replace this project's virtual environment.
syncenv Sync this project's virtual environment to Red's latest
dependencies.
endef
export HELP_BODY
# Python Code Style
reformat:
$(PYTHON) -m black $(ROOT_DIR)
@@ -29,3 +50,7 @@ newenv:
$(MAKE) syncenv
syncenv:
.venv/bin/pip install -Ur ./tools/dev-requirements.txt
# Help
help:
@echo "$$HELP_BODY"