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
|
cd project
|
||||||
go build --o=../pigeon-cli
|
go build --o=../pigeon-cli
|
||||||
|
env GOOS=windows GOARCH=386 go build --o=../pigeon.exe
|
||||||
cd -
|
cd -
|
||||||
PIGEON_PATH="."
|
PIGEON_PATH="."
|
||||||
./pigeon-cli version
|
./pigeon-cli version
|
||||||
|
|
Binary file not shown.
|
@ -4,14 +4,13 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"modernc.org/ql"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
)
|
)
|
||||||
|
|
||||||
func openDB() *sql.DB {
|
func openDB() *sql.DB {
|
||||||
ql.RegisterDriver()
|
|
||||||
pigeonPath := maybeSetupPigeonDir()
|
pigeonPath := maybeSetupPigeonDir()
|
||||||
dbPath := path.Join(pigeonPath, "db")
|
dbPath := path.Join(pigeonPath, "db.sqlite")
|
||||||
db, err0 := sql.Open("ql", dbPath)
|
db, err0 := sql.Open("sqlite3", dbPath)
|
||||||
|
|
||||||
if err0 != nil {
|
if err0 != nil {
|
||||||
panicf("failed to open db: %s", err0)
|
panicf("failed to open db: %s", err0)
|
||||||
|
|
Loading…
Reference in New Issue