fix issues with binary name

This commit is contained in:
Jeffrey Picard 2022-08-06 08:43:19 +03:00
parent 1cdd320255
commit a5f300d9f7
3 changed files with 5 additions and 6 deletions

View file

@ -4,7 +4,7 @@ EXPOSE 50051
RUN mkdir /app RUN mkdir /app
WORKDIR /app WORKDIR /app
COPY . /app COPY . /app
RUN go build RUN go build -o herald .
FROM alpine:latest FROM alpine:latest
COPY --from=stage1 /app/hub /hub COPY --from=stage1 /app/herald /herald
ENTRYPOINT ["/herald.go", "serve"] ENTRYPOINT ["/herald", "serve"]

View file

@ -22,7 +22,7 @@ echo "using tag $LATEST_TAG"
git checkout "$LATEST_TAG" git checkout "$LATEST_TAG"
# CGO_ENABLED=0 go build -v -ldflags "-X ${IMPORT_PATH}/meta.Version=${VERSION}" # CGO_ENABLED=0 go build -v -ldflags "-X ${IMPORT_PATH}/meta.Version=${VERSION}"
go build -v -ldflags "-X ${IMPORT_PATH}/meta.Version=${VERSION}" go build -o herald -v -ldflags "-X ${IMPORT_PATH}/meta.Version=${VERSION}"
docker build . -t lbry/herald.go:latest docker build . -t lbry/herald.go:latest
docker tag lbry/herald.go:latest lbry/herald.go:"$LATEST_TAG" docker tag lbry/herald.go:latest lbry/herald.go:"$LATEST_TAG"
docker push lbry/herald.go:latest docker push lbry/herald.go:latest

View file

@ -1,6 +1,5 @@
#!/bin/bash #!/bin/bash
./protobuf/build.sh ./protobuf/build.sh
go version go version
go build . go build -o herald .
rm herald.go
go test -v -race -cover ./... go test -v -race -cover ./...