Add Windows build to build.sh. Switch from `ql` to `sqlite3`.
This commit is contained in:
parent
214116a30d
commit
24a30d0121
1
build.sh
1
build.sh
|
@ -2,6 +2,7 @@
|
|||
|
||||
cd project
|
||||
go build --o=../pigeon-cli
|
||||
env GOOS=windows GOARCH=386 go build --o=../pigeon.exe
|
||||
cd -
|
||||
PIGEON_PATH="."
|
||||
./pigeon-cli version
|
||||
|
|
Binary file not shown.
|
@ -4,14 +4,13 @@ import (
|
|||
"database/sql"
|
||||
"path"
|
||||
|
||||
"modernc.org/ql"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
func openDB() *sql.DB {
|
||||
ql.RegisterDriver()
|
||||
pigeonPath := maybeSetupPigeonDir()
|
||||
dbPath := path.Join(pigeonPath, "db")
|
||||
db, err0 := sql.Open("ql", dbPath)
|
||||
dbPath := path.Join(pigeonPath, "db.sqlite")
|
||||
db, err0 := sql.Open("sqlite3", dbPath)
|
||||
|
||||
if err0 != nil {
|
||||
panicf("failed to open db: %s", err0)
|
||||
|
|
Loading…
Reference in New Issue