pantry/projects/priver.dev/geni/package.yml
Jacob Heider 950964af7f
fix(geni)
closes #5823
2024-04-08 10:28:41 -04:00

43 lines
1,021 B
YAML

distributable:
url: https://github.com/emilpriver/geni/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
provides:
- bin/geni
versions:
github: emilpriver/geni
strip: /^v/
build:
dependencies:
rust-lang.org: '>=1.65'
rust-lang.org/cargo: '*'
script:
# 0.0.4, 1.0.2 got released without a version bump
- run: sed -i -e 's/^version = ".*"/version = "{{version}}"/' Cargo.toml
- run: sed -i -e 's/"0\.0\.3"/"{{version}}"/' main.rs
working-directory: src
if: =0.0.4
- cargo install --locked --path . --root {{prefix}}
test:
env:
DATABASE_URL: 'sqlite://./database.sqlite'
dependencies:
sqlite.org: '*'
script:
- test "$(geni --version)" = "geni v{{version}}"
- geni new test
- run: cat $FIXTURE >> migrations/*_test.up.sql
fixture: |
CREATE TABLE Persons (
PersonID int
)
- run: cat $FIXTURE >> migrations/*_test.down.sql
fixture: |
DROP TABLE Persons;
- geni up
- geni down