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

feat(cli/version): add canary versioning #8480

Merged
merged 9 commits into from
Nov 25, 2020
Merged

Conversation

crowlKats
Copy link
Member

No description provided.

@lucacasonato
Copy link
Member

@crowlKats Doesn't seem to work:
image
image

@bartlomieju
Copy link
Member

@crowlKats you need to add this line to build.rs:

println!("cargo:rustc-env=DENO_CANARY={}", env::var("DENO_CANARY").unwrap_or_else(""));

cli/build.rs Outdated Show resolved Hide resolved
@crowlKats
Copy link
Member Author

crowlKats commented Nov 24, 2020

@lucacasonato i was wondering why it said 1.5.1 and was misisng the extra sutff like target tuple afterward... you are calling --version on the deno binary used for the CI itself, not the one that just got built.
Already found it weird that i needed to add the build.rs line as it was working fine locally without it

@lucacasonato
Copy link
Member

@crowlKats Good catch. I validated that it works:
image

cli/version.rs Outdated Show resolved Hide resolved
@lucacasonato
Copy link
Member

I just realized that a canary for 1.6.0 would have version 1.5.4-hash with the current setup. It should really be 1.6.0-hash. We could fix this by setting DENO_CANARY env var to the next version (so 1.5.4 in cargo.toml, and 1.6.0 in DENO_CANARY env var). When updating the version, we would have to change both the cargo.toml, and the next version in the ci.yml file. WDYT?

@ry
Copy link
Member

ry commented Nov 24, 2020

I just realized that a canary for 1.6.0 would have version 1.5.4-hash with the current setup. It should really be 1.6.0-hash. We could fix this by setting DENO_CANARY env var to the next version (so 1.5.4 in cargo.toml, and 1.6.0 in DENO_CANARY env var). When updating the version, we would have to change both the cargo.toml, and the next version in the ci.yml file. WDYT?

This seems like a lot of work and potentially error prone. I think 1.5.4-hash is fine for now.

@IllusionPerdu
Copy link

Since the next versions are not known during the releases, it suffices to specify in the documentation that the canary versions are that of the last release and that it is the hash that allows them to be distinguished.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you @crowlKats

@ry ry merged commit a08d2ee into denoland:master Nov 25, 2020
@crowlKats crowlKats deleted the canary_version branch November 25, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants