Makefile fix
This commit is contained in:
7
Makefile
7
Makefile
@@ -1,7 +1,7 @@
|
|||||||
# Makefile for royalroadupdates — builds entirely inside Docker.
|
# Makefile for royalroadupdates — builds entirely inside Docker.
|
||||||
|
|
||||||
PWD := $(shell pwd)
|
PWD := $(shell pwd)
|
||||||
DOCKER_RUN := docker run --rm -v $(PWD):/src -w /src golang:1.22
|
DOCKER_RUN := docker run --rm -v $(PWD):/src -w /src -e HOME=/tmp -e GOCACHE=/tmp/go-build -e GOMODCACHE=/tmp/go-mod --user $(shell id -u):$(shell id -g) golang:1.22
|
||||||
|
|
||||||
.PHONY: build check clean
|
.PHONY: build check clean
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@ build:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
go build \
|
go build \
|
||||||
|
-buildvcs=false \
|
||||||
-ldflags "-X main.PBURL=$${PB_URL} -X main.PBUser=$${PB_USER} -X main.PBPassword=$${PB_PASSWORD} -X main.PBCategory=$${PB_CATEGORY}" \
|
-ldflags "-X main.PBURL=$${PB_URL} -X main.PBUser=$${PB_USER} -X main.PBPassword=$${PB_PASSWORD} -X main.PBCategory=$${PB_CATEGORY}" \
|
||||||
-o royalroadupdates \
|
-o royalroadupdates \
|
||||||
./cmd/royalroadupdates'
|
./cmd/royalroadupdates'
|
||||||
@@ -25,8 +26,8 @@ check:
|
|||||||
export PB_URL PB_USER PB_PASSWORD PB_CATEGORY; \
|
export PB_URL PB_USER PB_PASSWORD PB_CATEGORY; \
|
||||||
d=$$(gofmt -l .); \
|
d=$$(gofmt -l .); \
|
||||||
if [ -n "$$d" ]; then echo "format errors:"; echo "$$d"; exit 1; fi; \
|
if [ -n "$$d" ]; then echo "format errors:"; echo "$$d"; exit 1; fi; \
|
||||||
go vet ./...; \
|
go vet -buildvcs=false ./...; \
|
||||||
go test ./...'
|
go test -buildvcs=false ./...'
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f royalroadupdates
|
rm -f royalroadupdates
|
||||||
|
|||||||
Reference in New Issue
Block a user