Skip to content

Commit e117a61

Browse files
committed
Add git SHA to wheel versions using versioningit
Signed-off-by: jbernloehr <[email protected]>
1 parent 58fa181 commit e117a61

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

.github/workflows/build_whl_and_publish.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,5 @@ jobs:
3535
test-infra-ref: main
3636
package-name: torchtitan
3737
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
38-
pre-script: .github/scripts/update_version.sh
3938
trigger-event: ${{ github.event_name }}
4039
build-platform: 'python-build-package'

assets/version.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Stable Releases
22
Currently we follow a lightweight release process.
3-
- Update the version number in `assets/version.txt` with a PR. The version numbering should follow https://semver.org/.
3+
- Pick a version for the release. The version numbering should follow https://semver.org/.
44
- E.g. for a pre-release `0.y.z`
55
- if major features are added, increment `y`
66
- if minor fixes are added, increment `z`

pyproject.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,27 @@ dev = [
4242
"expecttest", # test_tokenizer
4343
]
4444

45-
[tool.setuptools.dynamic]
46-
version = {file = "assets/version.txt"}
47-
4845
[tool.codespell]
4946
skip = ["*.json"]
5047
ignore-words-list = ["assertin", "datas" ,"indx", "inpt", "nd", "socio-economic"]
5148

5249
# ---- Explicit project build information ---- #
5350
[build-system]
54-
requires = ["setuptools>=61.0"]
51+
requires = ["setuptools>=61.0", "versioningit>=3.3"]
5552
build-backend = "setuptools.build_meta"
5653

5754
[tool.setuptools.packages.find]
5855
where = [""]
5956
include = ["torchtitan*"]
6057

58+
[tool.versioningit.tag2version]
59+
rmprefix = "v"
60+
61+
[tool.versioningit.format]
62+
distance = "{base_version}+git{rev}"
63+
dirty = "{base_version}+git{rev}.dirty"
64+
distance-dirty = "{base_version}+git{rev}.dirty"
65+
6166
[tool.pytest.ini_options]
6267
addopts = ["--showlocals"] # show local variables in tracebacks
6368
testpaths = ["tests"]

0 commit comments

Comments
 (0)