Skip to content
Permalink
Browse files

chore: better handling of go modules

  • Loading branch information...
moul committed Jul 11, 2019
1 parent 29b4a6b commit 77e28a566cd6f314c0f19ddf7672d64f7cc5cc6d
Showing with 4 additions and 4 deletions.
  1. +1 −1 Dockerfile
  2. +3 −3 Makefile
@@ -4,7 +4,7 @@ RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev ope
ENV GO111MODULE=on GOPROXY=https://goproxy.io
COPY go.mod go.sum /go/src/pathwar.pw/
WORKDIR /go/src/pathwar.pw
RUN go get .
RUN go mod download
COPY . .
RUN touch .proto.generated && make install

@@ -46,7 +46,7 @@ run: $(BIN) mysql.up
.PHONY: install
install: $(BIN)
$(BIN): .proto.generated $(PWCTL_OUT_FILES) $(OUR_SOURCES)
go install -v
go install -mod=readonly -v

.PHONY: mysql.up
mysql.up:
@@ -99,11 +99,11 @@ _proto_generate: $(GENERATED_PB_FILES) swagger.yaml

$(PWCTL_OUT_FILES): $(PWCTL_SOURCES)
mkdir -p ./pwctl/out
GOOS=linux GOARCH=amd64 go build -o ./pwctl/out/pwctl-linux-amd64 ./pwctl/
GOOS=linux GOARCH=amd64 go build -mod=readonly -o ./pwctl/out/pwctl-linux-amd64 ./pwctl/

.PHONY: test
test: .proto.generated
go test -v ./...
go test -mod=readonly -v ./...

%.pb.go: %.proto
protoc \

0 comments on commit 77e28a5

Please sign in to comment.
You can’t perform that action at this time.