Skip to content

Commit

Permalink
add .DEFAULT_GOAL for Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
txqiangguo committed Jul 24, 2024
1 parent c700779 commit 36eabd3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hack/hack.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DEFAULT_GOAL := build

include ./hack/hack-cli.mk

# Update GoFrame and its CLI to latest stable version.
Expand Down Expand Up @@ -45,13 +47,13 @@ endif

# Build docker image and automatically push to docker repo.
.PHONY: image.push
image.push:
image.push: cli.install
@make image PUSH=-p;


# Deploy image and yaml to current kubectl environment.
.PHONY: deploy
deploy:
deploy: cli.install
$(eval _TAG = $(if ${TAG}, ${TAG}, develop))

@set -e; \
Expand All @@ -60,7 +62,7 @@ deploy:
kustomize build > $(ROOT_DIR)/temp/kustomize.yaml;\
kubectl apply -f $(ROOT_DIR)/temp/kustomize.yaml; \
if [ $(DEPLOY_NAME) != "" ]; then \
kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \
kubectl patch -n $(NAMESPACE) deployment/$(DEPLOY_NAME) -p "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"$(shell date +%s)\"}}}}}"; \
fi;


Expand Down

0 comments on commit 36eabd3

Please sign in to comment.