Add Windows build to build.sh. Switch from `ql` to `sqlite3`.

This commit is contained in:
Netscape Navigator 2020-09-27 08:25:14 -05:00
parent 214116a30d
commit 24a30d0121
3 changed files with 4 additions and 4 deletions

View File

@ -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

BIN
pigeon-windows.exe Executable file

Binary file not shown.

View File

@ -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)