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

Propagate scie-pants' version into the pants invocation #246

Merged
merged 3 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
11 changes: 10 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Release Notes

## 0.9.0
## 0.9.2

This release propagates the version of the `scie-pants` into the invocation of pants, so that Pants
itself can [detect if it requires (or will require) features from newer versions of
`scie-pants`](https://github.com/pantsbuild/pants/issues/19600).

## 0.9.0 / 0.9.1

This release adds support for scie-pants to bootstrap Pants using a "per-platform" PEX uploaded as
a GitHub release asset. Additionally, the new wheels.pantsbuild.prg/simple wheels index has been wired
up to support Pants releases back to 2.0.0.dev0. Lastly, the selection of the latest version is now
deferred to the GitHub Release with the "latest" tag.

NB. this version was published as 0.9.0, but `PANTS_BOOTSTRAP_VERSION=report pants` reports itself
as 0.9.1.
Comment on lines +16 to +17
Copy link
Member

Choose a reason for hiding this comment

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

Weird

Copy link
Contributor Author

@huonw huonw Aug 23, 2023

Choose a reason for hiding this comment

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

I think there was just a small mistake in setting the version in Cargo.toml in #239. I don't think it causes problems, just thought it'd be sensible to call out why 0.9.1 seems to be missed so people don't get confused.

Copy link
Member

Choose a reason for hiding this comment

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

I have no clue how I messed that up, lol


## 0.8.2

This release fixes handling of environment variables when non-utf8 variables are present in the
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [
[package]
name = "scie-pants"
description = "Protects your Pants from the elements."
version = "0.9.1"
version = "0.9.2"
edition = "2021"
authors = [
"John Sirois <john.sirois@gmail.com>",
Expand Down
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ use crate::config::PantsConfig;
mod build_root;
mod config;

const SCIE_PANTS_VERSION: &str = env!("CARGO_PKG_VERSION");

#[derive(Debug, Default)]
struct Process {
exe: OsString,
Expand Down Expand Up @@ -221,6 +223,7 @@ fn get_pants_process() -> Result<Process> {
"PANTS_DEBUG".into(),
if pants_debug { "1" } else { "" }.into(),
),
("SCIE_PANTS_VERSION".into(), SCIE_PANTS_VERSION.into()),
];
if let Some(debugpy_version) = debugpy_version {
env.push(("PANTS_DEBUGPY_VERSION".into(), debugpy_version.into()));
Expand Down Expand Up @@ -313,7 +316,7 @@ fn main() -> Result<()> {
// scie-pants available.
if let Ok(value) = env::var("PANTS_BOOTSTRAP_VERSION") {
if "report" == value.as_str() {
println!(env!("CARGO_PKG_VERSION"));
println!("{}", SCIE_PANTS_VERSION);
std::process::exit(0);
}
}
Expand Down