Skip to content

Commit 26d1fea

Browse files
authored
chore: add cargo codegen to pnpm x version script (#11018)
1 parent 73e6ae8 commit 26d1fea

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

scripts/release/version.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,8 @@ export async function version_handler(version, options) {
146146

147147
console.log(`Update ${newPackageJson.name}: ${newPackageJson.version}`);
148148
}
149+
150+
await $`cargo codegen`;
151+
152+
console.log("Cargo codegen done");
149153
}

website/docs/en/contribute/development/releasing.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ During the release, the following binary artifacts for the target platforms are
2525
### Release steps
2626

2727
1. Create a new branch, for example `release/v1.0.0`.
28-
2. Execute `cargo codegen` command to generate `crates/rspack_workspace/src/generated.rs` file.
29-
3. Update the version using the `pnpm x version` command on the branch.
28+
2. Update the version using the `pnpm x version` command on the branch.
3029

3130
```bash
3231
# Release a patch version
@@ -48,19 +47,19 @@ pnpm x version patch --pre beta
4847
pnpm x version patch --pre rc
4948
```
5049

51-
4. Commit the code and push to the remote branch.
50+
3. Commit the code and push to the remote branch.
5251

5352
```bash
5453
git add .
5554
git commit -m "chore: release v1.0.0"
5655
git push origin release/vx.y.z
5756
```
5857

59-
5. Create a PR with the title `chore: release v1.0.0`.
60-
6. Run the [Ecosystem CI workflow](https://github.com/web-infra-dev/rspack/actions/workflows/ecosystem-ci.yml) to ensure all ecosystem projects are working properly.
61-
7. Run the full release workflow on the release branch.
62-
8. After the release, merge the PR to the `main` branch.
63-
9. Generate the [GitHub release note](https://github.com/web-infra-dev/rspack/releases), and add highlights information.
58+
4. Create a PR with the title `chore: release v1.0.0`.
59+
5. Run the [Ecosystem CI workflow](https://github.com/web-infra-dev/rspack/actions/workflows/ecosystem-ci.yml) to ensure all ecosystem projects are working properly.
60+
6. Run the full release workflow on the release branch.
61+
7. After the release, merge the PR to the `main` branch.
62+
8. Generate the [GitHub release note](https://github.com/web-infra-dev/rspack/releases), and add highlights information.
6463

6564
## Canary release
6665

website/docs/zh/contribute/development/releasing.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ Latest 是最新的稳定版本,遵循 Semantic Versioning 语义化版本号
2525
### 发布步骤
2626

2727
1. 创建一个新分支,例如 `release/v1.0.0`
28-
2. 执行 `cargo codegen` 命令生成 `crates/rspack_workspace/src/generated.rs` 文件。
29-
3. 在分支上使用 `pnpm x version` 命令更新版本号。
28+
2. 在分支上使用 `pnpm x version` 命令更新版本号。
3029

3130
```bash
3231
# 发布 patch 版本
@@ -48,19 +47,19 @@ pnpm x version patch --pre beta
4847
pnpm x version patch --pre rc
4948
```
5049

51-
4. 提交代码并推送到远程分支。
50+
3. 提交代码并推送到远程分支。
5251

5352
```bash
5453
git add .
5554
git commit -m "chore: release v1.0.0"
5655
git push origin release/vx.y.z
5756
```
5857

59-
5. 创建一个 PR,标题为 `chore: release v1.0.0`
60-
6. 执行 [Ecosystem CI 工作流](https://github.com/web-infra-dev/rspack/actions/workflows/ecosystem-ci.yml),确保所有生态项目都能正常工作。
61-
7. 在 release 分支上执行全量发布工作流。
62-
8. 发布完成后,合并 PR 到 `main` 分支。
63-
9. 生成 GitHub [release note](https://github.com/web-infra-dev/rspack/releases),补充 highlights 信息。
58+
4. 创建一个 PR,标题为 `chore: release v1.0.0`
59+
5. 执行 [Ecosystem CI 工作流](https://github.com/web-infra-dev/rspack/actions/workflows/ecosystem-ci.yml),确保所有生态项目都能正常工作。
60+
6. 在 release 分支上执行全量发布工作流。
61+
7. 发布完成后,合并 PR 到 `main` 分支。
62+
8. 生成 GitHub [release note](https://github.com/web-infra-dev/rspack/releases),补充 highlights 信息。
6463

6564
## Canary 发布
6665

0 commit comments

Comments
 (0)