mirror of
https://github.com/ivabus/pantry
synced 2024-11-09 18:15:18 +03:00
+goose
This commit is contained in:
parent
5c9896041d
commit
928609ed1a
44
projects/pressly.github.io/goose/package.yml
Normal file
44
projects/pressly.github.io/goose/package.yml
Normal file
|
@ -0,0 +1,44 @@
|
|||
distributable:
|
||||
url: https://github.com/pressly/goose/archive/refs/tags/{{version.tag}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
versions:
|
||||
github: pressly/goose
|
||||
|
||||
provides:
|
||||
- bin/goose
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
go.dev: ^1.20
|
||||
working-directory: cmd/goose
|
||||
script:
|
||||
- go mod download
|
||||
- go build -v -trimpath -ldflags="$GO_LDFLAGS" -o '{{prefix}}/bin/goose' .
|
||||
env:
|
||||
GO_LDFLAGS:
|
||||
- -s
|
||||
- -w
|
||||
- -X main.version=v{{version}}
|
||||
linux:
|
||||
# or segmentation fault
|
||||
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||
GO_LDFLAGS:
|
||||
- -buildmode=pie
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
sqlite.org: 3
|
||||
env:
|
||||
GOOSE_DRIVER: sqlite3
|
||||
GOOSE_DBSTRING: ./test.db
|
||||
GOOSE_MIGRATION_DIR: ./migrations
|
||||
script:
|
||||
- 'test "$(goose -version)" = "goose version: v{{version}}"'
|
||||
- mkdir -p $GOOSE_MIGRATION_DIR
|
||||
- goose create add_some_column sql
|
||||
- goose status
|
||||
- goose up
|
||||
- goose status
|
||||
- goose down
|
||||
- goose status
|
Loading…
Reference in a new issue