Skip to content

add version file for cli#218

Merged
rubenv merged 3 commits intorubenv:masterfrom
t-oki:version
Jun 8, 2022
Merged

add version file for cli#218
rubenv merged 3 commits intorubenv:masterfrom
t-oki:version

Conversation

@t-oki
Copy link
Copy Markdown
Contributor

@t-oki t-oki commented Jun 8, 2022

The version of the CLI tool is always 1.0.0 even if you install as
go install github.com/rubenv/sql-migrate/...@v1.1.1 and it's quite confusing.
This PR will sync the version of the CLI tool with the git tag.

@rubenv
Copy link
Copy Markdown
Owner

rubenv commented Jun 8, 2022

That's a file we manually have to maintain?

Can't we use buildinfo for that? https://pkg.go.dev/debug/buildinfo

@rubenv
Copy link
Copy Markdown
Owner

rubenv commented Jun 8, 2022

Though keep in mind that I don't want to drop pre-1.18 support yet.

@t-oki
Copy link
Copy Markdown
Contributor Author

t-oki commented Jun 8, 2022

@rubenv
Thanks, I used runtime/debug that have support for older go versions.
And I thought it would be better to show version 'dev' when runtime/debug failed to get the version than showing the wrong version

@rubenv
Copy link
Copy Markdown
Owner

rubenv commented Jun 8, 2022

Cool, thanks!

@rubenv rubenv merged commit 7aeab11 into rubenv:master Jun 8, 2022
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.

2 participants