-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xiansonwu
committed
Dec 4, 2024
1 parent
7b9ba9f
commit 64ac056
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
REGISTRY_NAME=ponyai-registry-vpc.cn-shenzhen.cr.aliyuncs.com/ponyai-vd-infra-platform | ||
GIT_COMMIT=$(shell git rev-parse "HEAD^{commit}") | ||
ifndef VERSION | ||
VERSION=$(shell git describe --tags --match='v*' --dirty 2>/dev/null || git rev-list -n1 HEAD) | ||
endif | ||
CMDS=build | ||
all: build | ||
|
||
build: | ||
GOOS=linux CGO_ENABLED=0 go build -o ./bin/draino ./cmd/draino | ||
|
||
image: build | ||
docker build -f ./Dockerfile -t $(REGISTRY_NAME)/draino:$(VERSION) ./ | ||
|
||
push: image | ||
docker push $(REGISTRY_NAME)/draino:$(VERSION) | ||
|
||
push-test: build | ||
docker build -f ./Dockerfile -t $(REGISTRY_NAME)/draino:latest ./ | ||
docker push $(REGISTRY_NAME)/draino:latest | ||
clean: | ||
rm -rf ./bin |