Skip to content

Commit

Permalink
Fix ./pants --version for pantsbuild.pants PEX (pantsbuild#14963)
Browse files Browse the repository at this point in the history
Closes pantsbuild#14938.

[ci skip-rust]
  • Loading branch information
Eric-Arellano authored Mar 31, 2022
1 parent 448c1e7 commit 43b93d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-support/bin/_release_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ def build_fs_util() -> None:
# capabilities, we should improve Pants. When porting, using `runtime_package_dependencies` to do
# the validation.
def build_pex(fetch: bool) -> None:
stable = os.environ.get("PANTS_PEX_RELEASE", "") == "STABLE"
if fetch:
extra_pex_args = [
"--python-shebang",
Expand Down Expand Up @@ -774,6 +775,8 @@ def build_pex(fetch: bool) -> None:
if fetch:
fetch_prebuilt_wheels(CONSTANTS.deploy_dir, include_3rdparty=True)
check_pants_wheels_present(CONSTANTS.deploy_dir)
if stable:
reversion_prebuilt_wheels()
else:
build_pants_wheels()
build_3rdparty_wheels()
Expand Down Expand Up @@ -809,7 +812,7 @@ def build_pex(fetch: bool) -> None:
check=True,
)

if os.environ.get("PANTS_PEX_RELEASE", "") == "STABLE":
if stable:
stable_dest = CONSTANTS.deploy_dir / "pex" / f"pants.{CONSTANTS.pants_stable_version}.pex"
stable_dest.parent.mkdir(parents=True, exist_ok=True)
dest.rename(stable_dest)
Expand Down

0 comments on commit 43b93d8

Please sign in to comment.