Last active
March 3, 2025 22:48
-
-
Save lynsei/ccc502d271422c652d2bfada33ff7443 to your computer and use it in GitHub Desktop.
[Makefile Self-Documenting] #autodoc #makefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # import config | |
| ifeq ($(shell test -e .env),yes) | |
| cnf ?= .env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| endif | |
| # HIDDEN | |
| print-%: ## Print env var names and values | |
| @echo $* = $($*) | |
| echo-%: ## Print any environment variable | |
| @echo $($*) | |
| # HELP | |
| # This will output the help for each task | |
| # thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | |
| .PHONY: help | |
| help: ## Print all commands and help info | |
| @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | |
| .DEFAULT_GOAL := help | |
| envs: ## Source env file if you are running local | |
| ./env.sh | |
| bump-major: ## Bump the major version tag | |
| ./bump_major.sh | |
| bump-minor: ## Bump the minor version tag | |
| ./bump_minor.sh | |
| bump-patch: ## Bump the patch version tag | |
| ./bump_patch.sh | |
| bump-build: ## Bump the build version to a random build number | |
| ./bump_build.sh | |
| run-release: ## Run release image locally | |
| ./docker_run.sh | |
| images: build-push-bins build-push-release ## Build and push binaries, build and push release image | |
| build-push-bins: bake-bin-arm bake-bin-amd push ## Bake and push binary images | |
| build-push-release: bake-release push ## Bake and push release image | |
| push: ## Push Images to the docker registry | |
| ./docker_push.sh | |
| bake-release: ## Create Bake Release Image | |
| ./docker_bake_release.sh | |
| bake-bin-arm: ## Create Bake Bin ARM Image | |
| ./docker_bake_arm.sh | |
| bake-bin-amd: ## Create Bake Bin AMD Image | |
| ./docker_bake_amd.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment