Skip to content

Commit

Permalink
Merge pull request #109 from bavix/var-rename
Browse files Browse the repository at this point in the history
[2.6] rename variable
  • Loading branch information
rez1dent3 authored Jan 12, 2024
2 parents 9001cb3 + bd3ce9d commit cb63e6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
build-args: |
buildRelease=${{ github.ref_name }}
version=${{ github.ref_name }}
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=gRPC Mock Server
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.source=https://github.com/bavix/gripmock
LABEL org.opencontainers.image.description="gRPC Mock Server"
LABEL org.opencontainers.image.licenses=Apache-2.0

ARG buildRelease
ARG version

# install tools (git, protobuf, protoc-gen-go, protoc-grn-go-grpc)
RUN apk -U --no-cache add git protobuf curl &&\
Expand All @@ -29,7 +29,7 @@ COPY . /go/src/github.com/bavix/gripmock
RUN cd /go/src/github.com/bavix/gripmock/protoc-gen-gripmock &&\
go install -v -ldflags "-s -w" &&\
cd /go/src/github.com/bavix/gripmock &&\
go install -v -ldflags "-X 'main.buildRelease=${buildRelease:-dev}' -s -w"
go install -v -ldflags "-X 'main.version=${version:-dev}' -s -w"

WORKDIR /go/src/github.com/bavix/gripmock

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/bavix/gripmock/stub"
)

var buildRelease string //nolint:gochecknoglobals
var version string

//nolint:funlen,cyclop
func main() {
Expand Down Expand Up @@ -81,7 +81,7 @@ func main() {

//nolint:godox
// fixme: move validation of required arguments to a separate service
logger.Info().Str("release", buildRelease).Msg("Starting GripMock")
logger.Info().Str("release", version).Msg("Starting GripMock")
if os.Getenv("GOPATH") == "" {
logger.Fatal().Msg("$GOPATH is empty")
}
Expand Down

0 comments on commit cb63e6f

Please sign in to comment.