2023-11-13 16:52:52 -05:00
|
|
|
|
|
|
|
.DEFAULT_GOAL := help
|
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help: ## Show this help
|
|
|
|
@egrep -h '\s##\s' $(MAKEFILE_LIST) | \
|
|
|
|
sort | \
|
|
|
|
awk \
|
|
|
|
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: ## Build agecem-org executable
|
|
|
|
CGO_ENABLED=0 go build -a -o agecem-org \
|
2024-09-27 20:25:12 -04:00
|
|
|
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/
|
2023-11-13 16:52:52 -05:00
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: ## Using `go install`, install the agecem-org executable at ~/go/bin/haul
|
|
|
|
CGO_ENABLED=0 go install -a \
|
2024-09-27 20:25:12 -04:00
|
|
|
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/
|
2023-11-13 16:52:52 -05:00
|
|
|
|
|
|
|
.PHONY: run
|
|
|
|
run: ## Run agecem-org from source with `go run`
|
|
|
|
CGO_ENABLED=0 go run \
|
2024-09-27 20:25:12 -04:00
|
|
|
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/
|
2023-11-13 16:52:52 -05:00
|
|
|
|
|
|
|
.PHONY: build-container
|
|
|
|
build-container: ## Build agecem-org container image
|
|
|
|
docker-compose build \
|
|
|
|
--build-arg agecem_org_version=`git describe`
|
|
|
|
|
|
|
|
.PHONY: deploy-container
|
|
|
|
deploy-container: ## Using `docker-compose up`, deploy the database and agecem-org containers
|
|
|
|
docker-compose up -d
|
|
|
|
|
|
|
|
.PHONY: deploy
|
|
|
|
deploy: build-container deploy-container ## Build and deploy agecem-org container image
|