From 55deb6a68bcd60a4f0b6660eb33e214a83519904 Mon Sep 17 00:00:00 2001 From: jiangjianfeng Date: Fri, 6 Jun 2025 07:55:59 +0000 Subject: [PATCH] Avoid incrementing the crate version in publish ostd if the mode is try run --- tools/github_workflows/publish_osdk_and_ostd.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tools/github_workflows/publish_osdk_and_ostd.sh b/tools/github_workflows/publish_osdk_and_ostd.sh index 04889fd7..9d0a3c9d 100755 --- a/tools/github_workflows/publish_osdk_and_ostd.sh +++ b/tools/github_workflows/publish_osdk_and_ostd.sh @@ -50,17 +50,6 @@ do_publish_for() { RF="$RUSTFLAGS --check-cfg cfg(ktest)" if [ -n "$DRY_RUN" ]; then - # Temporarily change the crate version to the next patched version. - # - # `cargo publish --dry-run` requires that - # the crate version is not already published on crates.io, - # otherwise, the check will fail. - # Therefore, we modify the crate version to ensure it is not published. - current_version=$(cat $ASTER_SRC_DIR/VERSION) - next_patched_version=$(echo "$current_version" | awk -F. '{printf "%d.%d.%d\n", $1, $2, $3 + 1}') - pattern="^version = \"[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\"$" - sed -i "0,/${pattern}/s/${pattern}/version = \"${next_patched_version}\"/1" Cargo.toml - # Perform checks RUSTFLAGS=$RF cargo publish --dry-run --allow-dirty $ADDITIONAL_ARGS RUSTFLAGS=$RF cargo doc $ADDITIONAL_ARGS