Commit 2a852d5 1 parent 8af3884 commit 2a852d5 Copy full SHA for 2a852d5
File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -242,17 +242,17 @@ jobs:
242
242
run : |
243
243
# Install required packages
244
244
pip install semver
245
-
245
+
246
246
# Get version tag and remove 'v' prefix
247
247
version_tag=${{ github.event.release.tag_name }}
248
248
version_tag=${version_tag#v}
249
-
249
+
250
250
# Convert semver to PyPI version using the script
251
251
pypi_version=$(python smver2pypi.py $version_tag)
252
-
252
+
253
253
# Update only the __version__ in __packaging__.py
254
254
sed -i "s/__version__ = VERSION_STRING/__version__ = \"$pypi_version\"/" packages/__packaging__.py
255
-
255
+
256
256
# Print the result for verification
257
257
echo "Original version tag: $version_tag"
258
258
echo "PyPI version: $pypi_version"
Original file line number Diff line number Diff line change 15
15
16
16
import sys
17
17
18
- from semver import Version as SemVerVersion
19
18
from packaging .version import Version as PyPIVersion
19
+ from semver import Version as SemVerVersion
20
20
21
21
semver_version = SemVerVersion .parse (sys .argv [1 ])
22
22
finalized_version = semver_version .finalize_version ()
23
23
prerelease = semver_version .prerelease or ""
24
24
build = semver_version .build or ""
25
25
pypi_version = PyPIVersion (f"{ finalized_version } { prerelease } { build } " )
26
- print (pypi_version )
26
+ print (pypi_version )
You can’t perform that action at this time.
0 commit comments