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 go install as installation option #573

Closed
wants to merge 2 commits into from
Closed

Conversation

sombriks
Copy link

use go install results in a functional dbmate installation, as far as my tests goes.

please add this as installation option in the documentation.

README.md Outdated Show resolved Hide resolved
@amacneil
Copy link
Owner

I don't recommend this install option:

  • No guarantee that go bin is in your $PATH
  • Installing "latest commit on main" is never a good idea, you want a released version
  • if you happen to run this inside an existing module directory you get
$ go install github.com/amacneil/dbmate/v2
no required module provides package github.com/amacneil/dbmate/v2; to add it:
	go get github.com/amacneil/dbmate/v2

Running the proposed go get command adds a ton of unrelated dependencies to your project.

Generally I don't see any reason you would want to build dbmate from source unless you are hacking on it or using as a library. Those that are doing so should already know the appropriate commands to run.

@sombriks
Copy link
Author

I don't recommend this install option:

  • No guarantee that go bin is in your $PATH
  • Installing "latest commit on main" is never a good idea, you want a released version
  • if you happen to run this inside an existing module directory you get
$ go install github.com/amacneil/dbmate/v2
no required module provides package github.com/amacneil/dbmate/v2; to add it:
	go get github.com/amacneil/dbmate/v2

Running the proposed go get command adds a ton of unrelated dependencies to your project.

Generally I don't see any reason you would want to build dbmate from source unless you are hacking on it or using as a library. Those that are doing so should already know the appropriate commands to run.

i had no idea it was intentional and understand the reasons. feel free to close this PR.

@amacneil
Copy link
Owner

Also I should mention: Since we import sqlite via cgo, you will need a C toolchain installed to compile that. So ya, I highly recommend sticking to prebuilt binaries.

@amacneil amacneil closed this Aug 21, 2024
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.

3 participants