2024-11-27 16:30:24 +01:00
|
|
|
.PHONY: help
|
|
|
|
help: ## Show the help.
|
|
|
|
@echo "Usage: make <target>"
|
|
|
|
@echo ""
|
|
|
|
@echo "Targets:"
|
|
|
|
@fgrep "##" Makefile | fgrep -v fgrep
|
|
|
|
|
2024-11-27 19:20:16 +01:00
|
|
|
.PHONY: buildrel
|
|
|
|
buildrel: ## Format code.
|
|
|
|
dotnet build -c Release project_name.sln
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: ## Format code.
|
|
|
|
dotnet build project_name.sln
|
|
|
|
|
|
|
|
.PHONY: publish
|
|
|
|
publish: ## Format code.
|
|
|
|
dotnet publish -c Release project_name.sln
|
|
|
|
|
2024-11-27 16:30:24 +01:00
|
|
|
.PHONY: fmt
|
2024-11-27 19:04:30 +01:00
|
|
|
fmt: ## Format code.
|
|
|
|
dotnet format project_name.sln
|
2024-11-27 16:30:24 +01:00
|
|
|
|
|
|
|
.PHONY: lint
|
2024-11-27 19:20:16 +01:00
|
|
|
lint: ## Lint code.
|
2024-11-27 19:04:30 +01:00
|
|
|
dotnet format --verify-no-changes --verbosity diagnostic project_name.sln
|
2024-11-27 16:30:24 +01:00
|
|
|
|
|
|
|
.PHONY: test
|
2024-11-27 19:20:16 +01:00
|
|
|
test: ## Run tests and generate coverage report.
|
2024-11-27 19:04:30 +01:00
|
|
|
dotnet test project_name.sln
|
2024-11-27 16:30:24 +01:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean: ## Clean unused files.
|
2024-11-27 19:04:30 +01:00
|
|
|
dotnet clean project_name.sln
|
2024-11-27 16:30:24 +01:00
|
|
|
|
|
|
|
.PHONY: release
|
|
|
|
release: ## Create a new tag for release.
|
|
|
|
@echo "WARNING: This operation will create a version tag and push to gitea"
|
|
|
|
@read -p "Version? (provide the next x.y.z semver) : " TAG
|
|
|
|
@echo "$${TAG}" > project_name/VERSION
|
|
|
|
@$(ENV_PREFIX)gitchangelog > HISTORY.md
|
|
|
|
@git add project_name/VERSION HISTORY.md
|
|
|
|
@git commit -m "release: version $${TAG} 🚀"
|
|
|
|
@echo "creating git tag : $${TAG}"
|
|
|
|
@git tag $${TAG}
|
|
|
|
@git push -u origin HEAD --tags
|
|
|
|
@echo "Gitea Actions will detect the new tag and release the new version."
|
|
|
|
|
|
|
|
.PHONY: docs
|
|
|
|
docs: ## Build the documentation.
|
|
|
|
@echo "building documentation ..."
|
|
|
|
@$(ENV_PREFIX)mkdocs build
|
|
|
|
URL="site/index.html"; xdg-open $$URL || sensible-browser $$URL || x-www-browser $$URL || gnome-open $$URL || open $$URL
|
|
|
|
|
|
|
|
# This project has been generated from rochacbruno/python-project-template
|
|
|
|
# __author__ = 'rochacbruno'
|
|
|
|
# __repo__ = https://github.com/rochacbruno/python-project-template
|
|
|
|
# __sponsor__ = https://github.com/sponsors/rochacbruno/
|