Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: make version extraction more reliable #3166

Merged
merged 3 commits into from
Jul 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"