Commit 9202a5d
authored
feat: centralize SemVer versioning with nightly/stable pipeline support (#349)
Centralizes SemVer versioning so nightly and stable releases get proper
version numbers, with all platform builds in the same pipeline run
guaranteed to use the same version.
### Changes
- Add `version`, `edition` to `[workspace.package]` in root `Cargo.toml`
— single source of truth
- All 26 sub-crates inherit via `version.workspace = true`
- New `set-version.ps1` script: reads base version from `Cargo.toml`,
optionally appends a pre-release suffix
- Pre-release pipeline calls `./set-version.ps1 -Suffix
"dev.$(Build.BuildId)"` — `Build.BuildId` is pipeline-scoped, ensuring
all platform agents get the same version
- Stable pipeline uses the version from `Cargo.toml` as-is (no script
call needed)
- Suffix parameter validated with
`[ValidatePattern('^[a-zA-Z0-9._-]+$')]` to prevent TOML injection
### Usage
```powershell
# Stable: explicit version bump (edit Cargo.toml, or use the script)
./set-version.ps1 -Version 1.0.0
# Nightly: auto-reads base version, appends deterministic suffix
./set-version.ps1 -Suffix "dev.$(Build.BuildId)"
```
Fixes #3481 parent d5fcd19 commit 9202a5d
File tree
29 files changed
+158
-77
lines changed- azure-pipelines
- crates
- pet-conda
- pet-core
- pet-env-var-path
- pet-fs
- pet-global-virtualenvs
- pet-homebrew
- pet-jsonrpc
- pet-linux-global-python
- pet-mac-commandlinetools
- pet-mac-python-org
- pet-mac-xcode
- pet-pipenv
- pet-pixi
- pet-poetry
- pet-pyenv
- pet-python-utils
- pet-reporter
- pet-telemetry
- pet-uv
- pet-venv
- pet-virtualenvwrapper
- pet-virtualenv
- pet-windows-registry
- pet-windows-store
- pet-winpython
- pet
29 files changed
+158
-77
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments