mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
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:
25
Makefile
25
Makefile
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user