Skip to content

Commit 4d2beee

Browse files
committed
fix the release process
1 parent 31c19f3 commit 4d2beee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/python/pants_release/generate_github_workflows.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,13 @@ def build_wheels_job(
932932
"if": "needs.release_info.outputs.is-release == 'true'",
933933
"run": dedent(
934934
"""\
935+
PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import pants.version;print(pants.version.VERSION)")
936+
PY_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
937+
PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')")
935938
PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
939+
936940
mv dist/src.python.pants/pants-pex.pex dist/src.python.pants/$PEX_FILENAME
941+
echo "PEX_FILENAME=$PEX_FILENAME" >> "$GITHUB_ENV"
937942
"""
938943
),
939944
},
@@ -956,11 +961,6 @@ def build_wheels_job(
956961
# support. `curl` is a good lowest-common-denominator way to upload the assets.
957962
"run": dedent(
958963
"""\
959-
PANTS_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import pants.version;print(pants.version.VERSION)")
960-
PY_VER=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import sys;print(f'cp{sys.version_info[0]}{sys.version_info[1]}')")
961-
PLAT=$(PEX_INTERPRETER=1 dist/src.python.pants/pants-pex.pex -c "import os;print(f'{os.uname().sysname.lower()}_{os.uname().machine.lower()}')")
962-
PEX_FILENAME=pants.$PANTS_VER-$PY_VER-$PLAT.pex
963-
964964
curl -L --fail \\
965965
-X POST \\
966966
-H "Authorization: Bearer ${{ github.token }}" \\

0 commit comments

Comments
 (0)