core: added 'help' to the Makefile
This commit is contained in:
parent
23e0b3da5e
commit
b68e344daa
36
Makefile
36
Makefile
|
@ -21,7 +21,13 @@ CODESPELL_ARGS = -D - -D .github/codespell-dictionary.txt \
|
||||||
website/integrations \
|
website/integrations \
|
||||||
website/src
|
website/src
|
||||||
|
|
||||||
all: lint-fix lint test gen web
|
all: lint-fix lint test gen web ## Lint, build, and test everything
|
||||||
|
|
||||||
|
help: ## Show this help
|
||||||
|
@echo "\nSpecify a command. The choices are:\n"
|
||||||
|
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
||||||
|
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[0;36m%-24s\033[m %s\n", $$1, $$2}'
|
||||||
|
@echo ""
|
||||||
|
|
||||||
test-go:
|
test-go:
|
||||||
go test -timeout 0 -v -race -cover ./...
|
go test -timeout 0 -v -race -cover ./...
|
||||||
|
@ -35,26 +41,26 @@ test-docker:
|
||||||
docker-compose run -u root server test
|
docker-compose run -u root server test
|
||||||
rm -f .env
|
rm -f .env
|
||||||
|
|
||||||
test:
|
test: ## Run the server tests and produce a coverage report
|
||||||
coverage run manage.py test --keepdb authentik
|
coverage run manage.py test --keepdb authentik
|
||||||
coverage html
|
coverage html
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
lint-fix:
|
lint-fix: ## Lint and automatically fix errors in the python source code. Reports spelling errors.
|
||||||
isort authentik $(PY_SOURCES)
|
isort authentik $(PY_SOURCES)
|
||||||
black authentik $(PY_SOURCES)
|
black authentik $(PY_SOURCES)
|
||||||
ruff authentik $(PY_SOURCES)
|
ruff authentik $(PY_SOURCES)
|
||||||
codespell -w $(CODESPELL_ARGS)
|
codespell -w $(CODESPELL_ARGS)
|
||||||
|
|
||||||
lint:
|
lint: ## Lint the python and golang sources
|
||||||
pylint $(PY_SOURCES)
|
pylint $(PY_SOURCES)
|
||||||
bandit -r $(PY_SOURCES) -x node_modules
|
bandit -r $(PY_SOURCES) -x node_modules
|
||||||
golangci-lint run -v
|
golangci-lint run -v
|
||||||
|
|
||||||
migrate:
|
migrate: ## Run the Authentik Django server's migrations
|
||||||
python -m lifecycle.migrate
|
python -m lifecycle.migrate
|
||||||
|
|
||||||
i18n-extract: i18n-extract-core web-i18n-extract
|
i18n-extract: i18n-extract-core web-i18n-extract ## Extract strings that require translation into files to send to a translation service
|
||||||
|
|
||||||
i18n-extract-core:
|
i18n-extract-core:
|
||||||
ak makemessages --ignore web --ignore internal --ignore web --ignore web-api --ignore website -l en
|
ak makemessages --ignore web --ignore internal --ignore web --ignore web-api --ignore website -l en
|
||||||
|
@ -63,7 +69,7 @@ i18n-extract-core:
|
||||||
## API Schema
|
## API Schema
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
gen-build:
|
gen-build: ## Extract the schema from the database
|
||||||
AUTHENTIK_DEBUG=true ak make_blueprint_schema > blueprints/schema.json
|
AUTHENTIK_DEBUG=true ak make_blueprint_schema > blueprints/schema.json
|
||||||
AUTHENTIK_DEBUG=true ak spectacular --file schema.yml
|
AUTHENTIK_DEBUG=true ak spectacular --file schema.yml
|
||||||
|
|
||||||
|
@ -86,7 +92,7 @@ gen-clean:
|
||||||
rm -rf web/api/src/
|
rm -rf web/api/src/
|
||||||
rm -rf api/
|
rm -rf api/
|
||||||
|
|
||||||
gen-client-ts:
|
gen-client-ts: ## Build and install the Authentik API for Typescript into the Authentik UI Application
|
||||||
docker run \
|
docker run \
|
||||||
--rm -v ${PWD}:/local \
|
--rm -v ${PWD}:/local \
|
||||||
--user ${UID}:${GID} \
|
--user ${UID}:${GID} \
|
||||||
|
@ -128,24 +134,24 @@ gen: gen-build gen-clean gen-client-ts
|
||||||
## Web
|
## Web
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
web-build: web-install
|
web-build: web-install ## Build the Authentik UI
|
||||||
cd web && npm run build
|
cd web && npm run build
|
||||||
|
|
||||||
web: web-lint-fix web-lint web-check-compile
|
web: web-lint-fix web-lint web-check-compile
|
||||||
|
|
||||||
web-install:
|
web-install: ## Install the necessary libraries to build the Authentik UI
|
||||||
cd web && npm ci
|
cd web && npm ci
|
||||||
|
|
||||||
web-watch:
|
web-watch: ## Build and watch the Authentik UI for changes, updating automatically
|
||||||
rm -rf web/dist/
|
rm -rf web/dist/
|
||||||
mkdir web/dist/
|
mkdir web/dist/
|
||||||
touch web/dist/.gitkeep
|
touch web/dist/.gitkeep
|
||||||
cd web && npm run watch
|
cd web && npm run watch
|
||||||
|
|
||||||
web-storybook-watch:
|
web-storybook-watch: ## Build and run the storybook documentation server
|
||||||
cd web && npm run storybook
|
cd web && npm run storybook
|
||||||
|
|
||||||
web-lint-fix:
|
web-lint-fix: ## Automatically fix formatting issues in the Authentik UI source code
|
||||||
cd web && npm run prettier
|
cd web && npm run prettier
|
||||||
|
|
||||||
web-lint:
|
web-lint:
|
||||||
|
@ -162,7 +168,7 @@ web-i18n-extract:
|
||||||
## Website
|
## Website
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
website: website-lint-fix website-build
|
website: website-lint-fix website-build ## Build the documentation website
|
||||||
|
|
||||||
website-install:
|
website-install:
|
||||||
cd website && npm ci
|
cd website && npm ci
|
||||||
|
@ -173,7 +179,7 @@ website-lint-fix:
|
||||||
website-build:
|
website-build:
|
||||||
cd website && npm run build
|
cd website && npm run build
|
||||||
|
|
||||||
website-watch:
|
website-watch: ## Build and watch the documentation website, updating automatically
|
||||||
cd website && npm run watch
|
cd website && npm run watch
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
|
Reference in a new issue