Skip to content

Commit

Permalink
ci: make version extraction more reliable (#3166)
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi authored Jul 29, 2023
1 parent 6f8ce57 commit 2a9581c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/set_version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# We set prefix-key to the version from Cargo.toml for Swatinem/rust-cache@v2
# since the caches seem to accumulate cruft over time;
# ref https://github.com/PRQL/prql/pull/2407

grep '^version =' Cargo.toml | tr -d ' "' >> $GITHUB_ENV
version=$(cargo metadata --format-version=1 --no-deps | jq --raw-output '.packages[] | select(.name == "prql-compiler") | .version')
echo "version=${version}" >>"$GITHUB_ENV"

0 comments on commit 2a9581c

Please sign in to comment.