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

add version file for cli #218

Merged
merged 3 commits into from
Jun 8, 2022
Merged

add version file for cli #218

merged 3 commits into from
Jun 8, 2022

Conversation

t-oki
Copy link
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/[email protected] and it's quite confusing.
This PR will sync the version of the CLI tool with the git tag.

@rubenv
Copy link
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
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
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
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