tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
215 stars 35 forks source link

Embedded version makes development difficult #42

Closed penberg closed 1 year ago

penberg commented 1 year ago

I have used go run during development, but now it doesn't work:

$ cd cmd/turso/
$ go run main.go
../../internal/cmd/root.go:11:12: pattern version.txt: no matching files found

Let's use the build tag solution for conditionally including version information depending on whether it's a development or production build:

https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/

haaawk commented 1 year ago

You need to run go generate and everything will work.

On Sun, Jan 22, 2023, 08:46 Pekka Enberg @.***> wrote:

I have used go run during development, but now it doesn't work:

$ cd cmd/turso/ $ go run main.go../../internal/cmd/root.go:11:12: pattern version.txt: no matching files found

Let's use the build tag solution for conditionally including version information depending on whether it's a development or production build:

https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/

— Reply to this email directly, view it on GitHub https://github.com/chiselstrike/iku-turso-cli/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKADLLPN5G56KV45RJVJ2DWTTQU3ANCNFSM6AAAAAAUC25U2Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

haaawk commented 1 year ago

The problem should be fixed with https://github.com/chiselstrike/iku-turso-cli/pull/44