Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show correct version #77

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Show correct version #77

merged 1 commit into from
Jun 21, 2024

Conversation

chicoxyzzy
Copy link
Contributor

Fixes #64

@chriso is this enough? How can I test this locally?
I've tried to run goreleaser release --snapshot --clean, the output is:

➜ goreleaser release --snapshot --clean
  • starting release...
  • only configurations files on  version: 2  are supported, yours is  version: 0 , please update your configuration
  • loading                                          path=.goreleaser.yml
  • skipping announce, publish and validate...
  • loading environment variables
  • getting and validating git state
    • git state                                      commit=5ba89d384d8067becde40b73714eff7db801e4ad branch=main current_tag=v0.2.0 previous_tag=v0.1.0 dirty=true
    • pipe skipped                                   reason=disabled during snapshot mode
  • parsing tag
  • setting defaults
  • snapshotting
    • building snapshot...                           version=0.2.0-SNAPSHOT-5ba89d3
  • running before hooks
    • running                                        hook=go mod tidy
  • checking distribution directory
  • setting up metadata
  • storing release metadata
    • writing                                        file=goreleaser/dist/metadata.json
  • loading go mod information
  • build prerequisites
  • checking go.mod
  • writing effective config file
    • writing                                        config=goreleaser/dist/config.yaml
  • building binaries
    • building                                       binary=goreleaser/dist/dispatch_linux_arm64/dispatch
    • building                                       binary=goreleaser/dist/dispatch_linux_amd64_v1/dispatch
    • building                                       binary=goreleaser/dist/dispatch_darwin_amd64_v1/dispatch
    • building                                       binary=goreleaser/dist/dispatch_darwin_arm64/dispatch
    • took: 30s
  • archives
    • creating                                       archive=goreleaser/dist/dispatch_0.2.0-SNAPSHOT-5ba89d3_darwin_arm64.tar.gz
    • creating                                       archive=goreleaser/dist/dispatch_0.2.0-SNAPSHOT-5ba89d3_darwin_amd64.tar.gz
    • creating                                       archive=goreleaser/dist/dispatch_0.2.0-SNAPSHOT-5ba89d3_linux_amd64.tar.gz
    • creating                                       archive=goreleaser/dist/dispatch_0.2.0-SNAPSHOT-5ba89d3_linux_arm64.tar.gz
    • took: 2s
  • calculating checksums
  • homebrew tap formula
    • guessing install                               install=[bin.install "dispatch"]
    • guessing install                               install=[bin.install "dispatch"]
    • guessing install                               install=[bin.install "dispatch"]
    • guessing install                               install=[bin.install "dispatch"]
    • writing                                        formula=goreleaser/dist/homebrew/Formula/dispatch.rb
  • storing artifacts metadata
    • writing                                        file=goreleaser/dist/artifacts.json
  • release succeeded after 32s
  • thanks for using goreleaser!

@chicoxyzzy chicoxyzzy requested a review from chriso June 20, 2024 15:51
@chicoxyzzy chicoxyzzy self-assigned this Jun 20, 2024
@chicoxyzzy
Copy link
Contributor Author

When I create a tag locally and then run goreleaser, it still shows me dispatch version devel <sha>

@chicoxyzzy
Copy link
Contributor Author

we should find a way to test it locally to test such cases

@chriso
Copy link
Contributor

chriso commented Jun 21, 2024

When I create a tag locally and then run goreleaser, it still shows me dispatch version devel

I imagine the fact that the tag hasn't been pushed to GitHub is the issue. goreleaser would be creating a dummy Go module and then pulling Dispatch as a dependency of that module before building it. If you haven't pushed the tag, go get won't see it when the github.com/dispatchrun/dispatch dependency is downloaded and the module built.

Given this a minor change, I think it's probably fine to merge and then wait until we tag a release to verify that it's working correctly. If we get it wrong, we can always fix it and then tag a new release.

@chicoxyzzy chicoxyzzy merged commit 2db45fe into main Jun 21, 2024
3 checks passed
@chicoxyzzy chicoxyzzy deleted the fix_version branch June 21, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dispatch version should print version in semver format
2 participants