File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ RUN go mod download
1515# Compile
1616COPY . .
1717RUN make test
18- RUN make build # warmup
1918ARG TARGETOS TARGETARCH
2019RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build
2120
@@ -36,7 +35,7 @@ ENV LOG_JSON=1
3635WORKDIR /
3736COPY --from=test /app .
3837USER 1000:1000
39- ENTRYPOINT ["/azure-auditor " ]
38+ ENTRYPOINT ["/azure-janitor " ]
4039
4140# ############################################
4241# static-final
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ GIT_TAG := $(shell git describe --dirty --tags --always)
33GIT_COMMIT := $(shell git rev-parse --short HEAD)
44BUILD_DATE := $(shell TZ=UTC date '+% Y-% m-% dT% H:% M:% SZ')
55LDFLAGS := -X "main.gitTag=$(GIT_TAG ) " -X "main.gitCommit=$(GIT_COMMIT ) " -X "main.buildDate=$(BUILD_DATE ) " -extldflags "-static" -s -w
6+ BUILDFLAGS := -trimpath
67
78FIRST_GOPATH := $(firstword $(subst :, ,$(shell go env GOPATH) ) )
89GOLANGCI_LINT_BIN := $(FIRST_GOPATH ) /bin/golangci-lint
@@ -26,13 +27,13 @@ vendor:
2627
2728.PHONY : build-all
2829build-all :
29- GOOS=linux GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' -o ' $(PROJECT_NAME)' .
30- GOOS=darwin GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' -o ' $(PROJECT_NAME).darwin' .
31- GOOS=windows GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' -o ' $(PROJECT_NAME).exe' .
30+ GOOS=linux GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' $( BUILDFLAGS ) -o ' $(PROJECT_NAME)' .
31+ GOOS=darwin GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' $( BUILDFLAGS ) -o ' $(PROJECT_NAME).darwin' .
32+ GOOS=windows GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' $( BUILDFLAGS ) -o ' $(PROJECT_NAME).exe' .
3233
3334.PHONY : build
3435build :
35- GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' -o $(PROJECT_NAME ) .
36+ GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -ldflags ' $(LDFLAGS)' $( BUILDFLAGS ) -o $(PROJECT_NAME ) .
3637
3738.PHONY : image
3839image : image
You can’t perform that action at this time.
0 commit comments