fix prql >=0.9

closes #2657
closes #2663
This commit is contained in:
Jacob Heider 2023-07-25 14:24:44 -04:00
parent d2db2471f5
commit d69b452c2d
No known key found for this signature in database
GPG key ID: A98011B5713535BF

View file

@ -8,32 +8,26 @@ versions:
build: build:
dependencies: dependencies:
rust-lang.org/cargo: '*' rust-lang.org/cargo: '*'
working-directory: prql-compiler script:
script: | - run: cargo install --path prql-compiler --root {{prefix}}
if test {{version.major}} -eq 0 -a {{version.minor}} -lt 4; then if: <0.4.0
cargo install --path . --root {{prefix}} - run: cargo install --path prql-compiler --root {{prefix}} --all-features
elif test "{{version}}" = "0.4.0"; then if: =0.4.0
cargo install --path . --root {{prefix}} --all-features - run: cargo install --path prql-compiler/prqlc --root {{prefix}}
else if: '>=0.4.1<0.9.0'
cargo install --path prqlc --root {{prefix}} - run: cargo install --path crates/prqlc --root {{prefix}} --all-features
fi if: '>=0.9.0'
cd {{prefix}}/bin
# Bin got renamed; this is one way to keep ourselves working # Bin got renamed; this is one way to keep ourselves working
if test {{version.major}} -eq 0 -a {{version.minor}} -lt 4; then - run: ln -s prql-compiler prqlc
ln -s prql-compiler prqlc working-directory: "{{prefix}}/bin"
else if: <0.4.0
ln -s prqlc prql-compiler - run: ln -s prqlc prql-compiler
fi working-directory: "{{prefix}}/bin"
if: '>=0.4.0'
test: | test:
if test {{version.major}} -eq 0 -a {{version.minor}} -lt 4; then - echo "from employees | filter has_dog | select salary" | prqlc compile
COMPILER=prql-compiler
else
COMPILER=prqlc
fi
echo "from employees | filter has_dog | select salary" | $COMPILER compile
provides: provides:
- bin/prql-compiler - bin/prql-compiler