Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

version command reports build time VERSION env or Cargo.toml version #66

Merged

Conversation

adrianfilip
Copy link
Contributor

@adrianfilip adrianfilip commented Feb 15, 2024

What?

  • If VERSION env variable was available at built time
    • golem-cli --version will return that value
  • Otherwise
    • golem-cli --version will return the build time version found in Cargo.toml

Why?

Because, currently, builds outside of the CI always return 0.0.0 (the Cargo.toml default)
This is helpful for things like creating a nix package. (The current way of changing the Cargo.toml leads to hash differences in a nix context.)

@adrianfilip adrianfilip changed the title Report version used at build --version reports version used at build Feb 15, 2024
@adrianfilip adrianfilip force-pushed the report_version_used_at_build branch from 55c2f2c to b4cdba3 Compare February 15, 2024 23:06
needed for artifact version

update

version command returns build time VERSION env or Cargo.toml version
@adrianfilip adrianfilip force-pushed the report_version_used_at_build branch from b4cdba3 to d9ea54b Compare February 15, 2024 23:09
@adrianfilip adrianfilip changed the title --version reports version used at build version command returns build time VERSION env or Cargo.toml version Feb 15, 2024
@adrianfilip adrianfilip changed the title version command returns build time VERSION env or Cargo.toml version version command reports build time VERSION env or Cargo.toml version Feb 15, 2024
@adrianfilip adrianfilip marked this pull request as ready for review February 18, 2024 02:39
@adamgfraser adamgfraser merged commit a38eeb6 into golemcloud:master Feb 18, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants