gojuno / minimock

Powerful mock generation tool for Go programming language
MIT License
577 stars 38 forks source link

Release tags are versioned as "dev" #55

Closed btipling closed 6 months ago

btipling commented 3 years ago
  1. Run go get github.com/gojuno/minimock/v3/cmd/minimock@v3.0.8
  2. Run minimock --version
  3. Output:
    MiniMock version dev
    Git commit: dev
    Build date: 2021-01-22T00:47:47Z
  4. What I expected to see:
    MiniMock version 3.0.8
    Git commit: 3.0.8
    Build date: 2021-01-22T00:47:47Z

    In addition the top of the mocks all say:

    // Code generated by http://github.com/gojuno/minimock (dev). DO NOT EDIT.

    Instead of (3.0.8)

If you download the tagged release source code it shows as "dev"[0]:


    //do not modify the following vars
    //the values are being injected at the compile time by goreleaser
    version   = "dev"
    commit    = "dev"

[0] https://github.com/gojuno/minimock/archive/v3.0.8.zip

Terminator637 commented 7 months ago

Hi! Some workaround to avoid this issue: go install -ldflags "-X main.version=3.1.2" github.com/gojuno/minimock/v3/cmd/minimock@v3.1.2

hexdigest commented 6 months ago

Hey guys, there's nothing I can do about this really. The only way to have correct version for the minimock installed via go get is update these vars manually (which I don't want to do). So please download the pre-built binaries from the releases/tags page