PRQL / prql

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement
https://prql-lang.org
Apache License 2.0
9.6k stars 208 forks source link

build: Set version on Snap #4569

Closed vanillajonathan closed 3 weeks ago

vanillajonathan commented 4 weeks ago

This replaces the version field in the snapcraft.yaml manifest file with the github.ref_name variable from the GitHub Action context.

This uses the name of the tagged release instead of the Git commit hash as version.

max-sixty commented 4 weeks ago

Thanks!

Though should we instead use the replacement approach from here: https://github.com/PRQL/prql/blob/6e5db30646e3255a3da354ae2c997f0048c540a6/prqlc/prqlc/Cargo.toml#L126-L130

Then we can observe the version number and everything uses the same approach.

You can test locally with cargo release replace -x --no-confirm, from https://github.com/PRQL/prql/blob/ff492a5a98dff52c429a39607eaa185111fdbead/web/book/src/project/contributing/development.md#L489

vanillajonathan commented 4 weeks ago

I think that would commit the snapcraft.yaml file though, but maybe that is okay?

max-sixty commented 4 weeks ago

I think that would commit the snapcraft.yaml file though, but maybe that is okay?

Yes! We have the version numbers in lots of files — Cargo.toml, package.json , etc

vanillajonathan commented 3 weeks ago

Okay, I now do the replacement in Cargo.toml.

max-sixty commented 3 weeks ago

It's great, thank you!