feat: add wrapper to tern

so environment variables are passed to tern's config file
This commit is contained in:
Vinicius Souza 2024-08-09 11:10:54 +00:00
parent 03c1025147
commit 5b7b08f733
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,19 @@
package main
import (
"os/exec"
"github.com/joho/godotenv"
)
func main() {
if err := godotenv.Load(); err != nil {
panic(err)
}
cmd := exec.Command("tern", "migrate", "--migrations", "./internal/store/pgstore/migrations", "--config", "./internal/store/pgstore/migrations/tern.conf")
if err := cmd.Run(); err != nil {
panic(err)
}
}

2
go.mod
View file

@ -1,3 +1,5 @@
module forgejo.home.viniciussouza.me/learning/go-react-server
go 1.22.2
require github.com/joho/godotenv v1.5.1