-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (25 loc) · 772 Bytes
/
Makefile
File metadata and controls
32 lines (25 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
build:
go build -o ./bin/gcx ./cmd/gcx
install:
go install ./cmd/gcx
test:
go test -v ./...
fmt:
gofumpt -l -w .
lint:
golangci-lint run
docker-build:
docker build \
--build-arg VERSION=`git describe --tags --abbrev=0 || echo "0.0.0"` \
--build-arg COMMIT=`git rev-parse --short HEAD` \
--build-arg DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'` \
-t sxwebdev/gcx:latest .
docker-build-linux:
docker buildx build --platform linux/amd64 \
--build-arg VERSION=`git describe --tags --abbrev=0 || echo "0.0.0"` \
--build-arg COMMIT=`git rev-parse --short HEAD` \
--build-arg DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'` \
-t sxwebdev/gcx:latest .
docker-push: docker-build-linux
docker tag sxwebdev/gcx:latest sxwebdev/gcx:latest
docker push sxwebdev/gcx:latest