You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -74,14 +74,12 @@ Before triggering a release, ensure:
74
74
75
75
#### Version Storage
76
76
77
-
The single source of truth for the Turborepo version is **`version.txt`** at the repository root:
77
+
The single source of truth for the Turborepo version is **`version.txt`** at the repository root. This file contains two lines:
78
78
79
-
```
80
-
Line 1: Version number (e.g., 2.6.1)
81
-
Line 2: NPM dist-tag (e.g., latest, canary)
82
-
```
79
+
- Line 1: Version number (e.g., 2.6.1)
80
+
- Line 2: NPM dist-tag (e.g., latest, canary)
83
81
84
-
**Current version**: `2.6.1`
82
+
See: `version.txt`
85
83
86
84
#### Version Calculation
87
85
@@ -108,23 +106,12 @@ When a release is triggered, the `scripts/version.js` script:
108
106
109
107
#### Version Synchronization
110
108
111
-
Once the version is calculated, the `cli/Makefile` (target: `stage-release`) updates all package.json files:
112
-
113
-
```makefile
114
-
# Updates all package.json versions to match TURBO_VERSION
115
-
cd packages/turbo && pnpm version "$(TURBO_VERSION)" --allow-same-version
116
-
cd packages/create-turbo && pnpm version "$(TURBO_VERSION)" --allow-same-version
117
-
cd packages/turbo-codemod && pnpm version "$(TURBO_VERSION)" --allow-same-version
118
-
cd packages/turbo-ignore && pnpm version "$(TURBO_VERSION)" --allow-same-version
119
-
cd packages/turbo-workspaces && pnpm version "$(TURBO_VERSION)" --allow-same-version
120
-
cd packages/turbo-gen && pnpm version "$(TURBO_VERSION)" --allow-same-version
121
-
cd packages/eslint-plugin-turbo && pnpm version "$(TURBO_VERSION)" --allow-same-version
122
-
cd packages/eslint-config-turbo && pnpm version "$(TURBO_VERSION)" --allow-same-version
123
-
cd packages/turbo-types && pnpm version "$(TURBO_VERSION)" --allow-same-version
124
-
```
109
+
Once the version is calculated, the `cli/Makefile` (target: `stage-release`) updates all package.json files by running `pnpm version` for each package to match `TURBO_VERSION`.
125
110
126
111
Additionally, the `packages/turbo/bump-version.js` postversion hook updates the `optionalDependencies` in `packages/turbo/package.json` to reference the correct versions of platform-specific packages.
127
112
113
+
See: `cli/Makefile` (stage-release target) and `packages/turbo/bump-version.js`
114
+
128
115
---
129
116
130
117
### Release Workflow Stages
@@ -197,15 +184,9 @@ The release workflow consists of 6 sequential and parallel stages:
**Safety Checks**: The Makefile includes safety checks to verify no unpushed commits exist and that `version.txt` was properly updated before proceeding.
201
188
202
-
```bash
203
-
# Fail if unpushed commits exist
204
-
test"" = "`git cherry`"|| (echo "Refusing to publish with unpushed commits"&& false)
205
-
206
-
# Fail if version.txt wasn't updated
207
-
test""!= "`git diff -- ../version.txt`"|| (echo "Refusing to publish with unupdated version.txt"&& false)
208
-
```
189
+
See: `cli/Makefile` (stage-release target)
209
190
210
191
#### Stage 2: Rust Smoke Test
211
192
@@ -253,17 +234,9 @@ This runs TypeScript type checking and all Jest/Vitest tests for JavaScript pack
253
234
254
235
**Build Configuration**:
255
236
256
-
The Rust binaries are built using the `release-turborepo` profile defined in `Cargo.toml`:
237
+
The Rust binaries are built using the `release-turborepo` profile (inherits from release profile with stripping enabled) and Link-time optimization (LTO) enabled via the `CARGO_PROFILE_RELEASE_LTO=true` environment variable.
257
238
258
-
```toml
259
-
[profile.release-turborepo]
260
-
inherits = "release"
261
-
strip = true# Remove debug symbols for smaller binaries
262
-
```
263
-
264
-
Additional build flags:
265
-
266
-
-`CARGO_PROFILE_RELEASE_LTO=true` - Link-time optimization for better performance and smaller size
239
+
See: `Cargo.toml` (release-turborepo profile) and `.github/workflows/turborepo-release.yml`
267
240
268
241
**Build Steps**:
269
242
@@ -292,21 +265,9 @@ This is the most complex stage with multiple sub-steps:
292
265
293
266
##### 5b. Build JavaScript Packages
294
267
295
-
Execute `make -C cli build`:
268
+
Execute `make -C cli build` which runs `turbo build copy-schema` with filters for all JavaScript/TypeScript packages. This builds all TypeScript packages and copies the JSON schema to the appropriate locations.
296
269
297
-
```bash
298
-
turbo build copy-schema \
299
-
--filter=create-turbo \
300
-
--filter=@turbo/codemod \
301
-
--filter=turbo-ignore \
302
-
--filter=@turbo/workspaces \
303
-
--filter=@turbo/gen \
304
-
--filter=eslint-plugin-turbo \
305
-
--filter=eslint-config-turbo \
306
-
--filter=@turbo/types
307
-
```
308
-
309
-
This builds all TypeScript packages and copies the JSON schema to the appropriate locations.
270
+
See: `cli/Makefile` (build target)
310
271
311
272
##### 5c. Pack and Publish Native Packages
312
273
@@ -316,27 +277,16 @@ Execute `turbo release-native` which invokes the `@turbo/releaser` tool.
@@ -440,23 +374,12 @@ The `turbo` package is unique:
440
374
- Falls back to x64 on ARM64 for macOS/Windows (Rosetta/emulation support)
441
375
- Provides just-in-time installation if the platform package is missing
442
376
443
-
2.**Declares platform packages as optional dependencies** in `package.json`:
444
-
445
-
```json
446
-
{
447
-
"optionalDependencies": {
448
-
"turbo-darwin-64": "2.6.2",
449
-
"turbo-darwin-arm64": "2.6.2",
450
-
"turbo-linux-64": "2.6.2",
451
-
"turbo-linux-arm64": "2.6.2",
452
-
"turbo-windows-64": "2.6.2",
453
-
"turbo-windows-arm64": "2.6.2"
454
-
}
455
-
}
456
-
```
377
+
2.**Declares platform packages as optional dependencies** - all six platform-specific packages are listed as `optionalDependencies` in the package.json, allowing npm to install only the relevant one for the current platform.
4. This wrapper spawns `turbo.exe` and forwards all arguments and stdio
409
+
See: `packages/turbo-releaser/` for the Windows wrapper generation
506
410
507
411
---
508
412
@@ -644,16 +548,9 @@ Windows has special considerations:
644
548
645
549
#### Rust Build Profile
646
550
647
-
```toml
648
-
# Cargo.toml
649
-
[profile.release-turborepo]
650
-
inherits = "release"
651
-
strip = true# Remove debug symbols
652
-
```
653
-
654
-
Additional flags set during build:
551
+
The `release-turborepo` profile inherits from the release profile with debug symbol stripping enabled. Link-time optimization is enabled via the `CARGO_PROFILE_RELEASE_LTO=true` environment variable during the build.
0 commit comments