File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
1
### Added
2
2
3
+
4
+ ### Release v0.0.2
5
+
3
6
- Cleanup: Add automatically tag image before push in Makefile
4
7
- Cleanup: Fix usage in ReadMe
5
8
- Cleanup: Fix error with CHANGELOG name file
6
- - CLeanup: Add release to Makefile
9
+ - CLeanup: Add release to Makefile
10
+ - Cleanup: Fix error with Makefile
Original file line number Diff line number Diff line change 1
1
FROM busybox
2
2
3
- USER 65534
3
+ USER 65533
4
4
5
5
ARG BINARY=config-reloader
6
6
COPY out/$BINARY /config-reloader
Original file line number Diff line number Diff line change @@ -16,8 +16,9 @@ SHELL := /bin/bash -euo pipefail
16
16
17
17
# Use the native vendor/ dependency system
18
18
export GO111MODULE := on
19
- export CGO_ENABLED := 0
20
19
20
+ GOOS ?= $(shell go env GOOS)
21
+ GOARCH ?= $(shell go env GOARCH)
21
22
22
23
ORG := github.com/vzemtsov
23
24
REPOPATH ?= $(ORG ) /config-reloader
@@ -27,21 +28,26 @@ BINARY=config-reloader
27
28
28
29
LDFLAGS := -extldflags '-static'
29
30
31
+ .PHONY : build-local
32
+ build : clean
33
+ GOARCH=$(GOARCH ) GOOS=$(GOOS ) CGO_ENABLED=0 \
34
+ go build -ldflags=" $( LDFLAGS) " -o out/$(BINARY ) cmd/app/main.go
35
+
30
36
.PHONY : build
31
37
build : clean
32
- CGO_ENABLED=0 go build -ldflags=" $( LDFLAGS) " -o out/$(BINARY ) cmd/app/main.go
38
+ GOARCH=amd64 GOOS=linux CGO_ENABLED=0 \
39
+ go build -ldflags=" $( LDFLAGS) " -o out/$(BINARY ) cmd/app/main.go
33
40
34
41
.PHONY : run
35
- run : build
42
+ run : build-local
36
43
./out/$(BINARY )
37
44
38
-
39
45
.PHONY : clean
40
46
clean :
41
47
rm -rf ./out
42
48
43
49
.PHONY : docker
44
- docker : clean build
50
+ docker : build
45
51
docker build --build-arg BINARY=$(BINARY ) -t $(DOCKER_IMAGE_NAME ) :$(DOCKER_IMAGE_TAG ) .
46
52
47
53
.PHONY : tag
@@ -53,6 +59,6 @@ push: tag
53
59
docker push $(DOCKER_IMAGE_NAME ) :$(TAG )
54
60
55
61
.PHONY : release
56
- push :
62
+ release :
57
63
docker tag $(DOCKER_IMAGE_NAME ) :$(TAG ) $(DOCKER_IMAGE_NAME ) :latest
58
64
docker push $(DOCKER_IMAGE_NAME ) :latest
You can’t perform that action at this time.
0 commit comments