Skip to content

Commit 79d5812

Browse files
ko3n1gclaude
authored andcommitted
build: drop rc0 pre-release tag and add dynamic git versioning (#2235)
Signed-off-by: oliver könig <okoenig@nvidia.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent eb84983 commit 79d5812

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/build-test-publish-wheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ defaults:
2626

2727
jobs:
2828
build-test-publish-wheel:
29-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_test_publish_wheel.yml@v0.33.0
29+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_build_test_publish_wheel.yml@v0.88.1
3030
if: ${{ vars.BUILD_TEST_PUBLISH_WHEEL == 'true' }}
3131
with:
3232
dry-run: true

nemo_rl/package_info.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,32 @@
1616
MAJOR = 0
1717
MINOR = 6
1818
PATCH = 0
19-
PRE_RELEASE = "rc0"
19+
PRE_RELEASE = ""
2020

2121
# Use the following formatting: (major, minor, patch, pre-release)
2222
VERSION = (MAJOR, MINOR, PATCH, PRE_RELEASE)
2323

2424
__shortversion__ = ".".join(map(str, VERSION[:3]))
2525
__version__ = ".".join(map(str, VERSION[:3])) + "".join(VERSION[3:])
2626

27+
import os as _os # noqa: I001
28+
import subprocess as _subprocess
29+
30+
31+
if not int(_os.getenv("NO_VCS_VERSION", "0")):
32+
try:
33+
_git = _subprocess.run(
34+
["git", "rev-parse", "--short", "HEAD"],
35+
capture_output=True,
36+
cwd=_os.path.dirname(_os.path.abspath(__file__)),
37+
check=True,
38+
universal_newlines=True,
39+
)
40+
except (_subprocess.CalledProcessError, OSError):
41+
pass
42+
else:
43+
__version__ += f"+{_git.stdout.strip()}"
44+
2745
__package_name__ = "nemo_rl"
2846
__contact_names__ = "NVIDIA"
2947
__contact_emails__ = "nemo-tookit@nvidia.com"

0 commit comments

Comments
 (0)