fix(make): renommer targets selon projet utilisé

Préfixes go- et docker- ajoutés à la majorité des targets
This commit is contained in:
Victor Lacasse-Beaudoin 2025-05-06 19:00:21 -04:00
parent cefff49f9a
commit 23a6bb104b

View file

@ -10,32 +10,32 @@ help: ## Show this help
awk \ awk \
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build .PHONY: go-build
build: ## Build agecem-org executable go-build: ## Build agecem-org executable
CGO_ENABLED=0 go build -a -o agecem-org \ CGO_ENABLED=0 go build -a -o agecem-org \
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/ -ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/
.PHONY: install .PHONY: install
install: ## Using `go install`, install the agecem-org executable at ~/go/bin/haul go-install: ## Using `go install`, install the agecem-org executable at ~/go/bin/haul
CGO_ENABLED=0 go install -a \ CGO_ENABLED=0 go install -a \
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/ -ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/
.PHONY: run .PHONY: go-run
run: ## Run agecem-org from source with `go run` go-run: ## Run agecem-org from source with `go run`
CGO_ENABLED=0 go run \ CGO_ENABLED=0 go run \
-ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/ -ldflags="-X 'git.agecem.com/agecem/agecem-org/pkg/agecemorg/version.version=`git describe`'" ./cmd/agecemorg/
.PHONY: build-container .PHONY: docker-build
build-container: ## Build agecem-org container image docker-build: ## Build agecem-org container image
docker-compose build \ docker-compose build \
--build-arg agecem_org_version=`git describe` --build-arg agecem_org_version=`git describe`
.PHONY: deploy-container .PHONY: docker-deploy
deploy-container: ## Using `docker-compose up`, deploy the database and agecem-org containers docker-deploy: ## Using `docker-compose up`, deploy the database and agecem-org containers
docker-compose up -d docker-compose up -d
.PHONY: deploy .PHONY: deploy
deploy: build-container deploy-container ## Build and deploy agecem-org container image deploy: docker-build docker-deploy ## Build and deploy agecem-org container image
.PHONY: docker-tag-from-git .PHONY: docker-tag-from-git
docker-tag-from-git: ## Tag latest image according to annotated tag from `git describe` docker-tag-from-git: ## Tag latest image according to annotated tag from `git describe`