From 8f7a54501c33d088a38ac3817d72fdf0f2f316b2 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 30 Apr 2025 11:53:03 -0700 Subject: [PATCH 1/2] chore: Rust release, set prerelease:false and version=0.0.2504301132 (#755) The generated DotSlash file has URLs that refer to `https://github.com/openai/codex/releases/`, so let's set `prerelease:false` (but keep `draft:true` for now) so those URLs should work. Also updated `version` in Cargo workspace so I will kick off a build once this lands. --- .github/workflows/rust-release.yml | 4 ++-- codex-rs/Cargo.lock | 4 ++-- codex-rs/Cargo.toml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index d62cda0880..396a0a3c1d 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -143,10 +143,10 @@ jobs: with: tag_name: ${{ env.RELEASE_TAG }} files: dist/** - # TODO(ragona): I'm going to leave these as prerelease/draft for now. + # TODO(ragona): I'm going to leave these as draft for now. # It gives us 1) clarity that these are not yet a stable version, and # 2) allows a human step to review the release before publishing the draft. - prerelease: true + prerelease: false draft: true - uses: facebook/dotslash-publish-release@v2 diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 4264ab7f3b..1f601caff8 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -469,7 +469,7 @@ dependencies = [ [[package]] name = "codex-cli" -version = "0.0.2504292236" +version = "0.0.2504301132" dependencies = [ "anyhow", "clap", @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "codex-exec" -version = "0.0.2504292236" +version = "0.0.2504301132" dependencies = [ "anyhow", "chrono", diff --git a/codex-rs/Cargo.toml b/codex-rs/Cargo.toml index 953f21bd46..13bf7b48c9 100644 --- a/codex-rs/Cargo.toml +++ b/codex-rs/Cargo.toml @@ -11,7 +11,7 @@ members = [ ] [workspace.package] -version = "0.0.2504292236" +version = "0.0.2504301132" [profile.release] lto = "fat" From 4e7f007e689b7b9c5684e801df297930eaaef9d7 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 30 Apr 2025 12:04:40 -0700 Subject: [PATCH 2/2] chore: script to create a Rust release --- codex-rs/Cargo.lock | 4 ++-- codex-rs/Cargo.toml | 2 +- codex-rs/scripts/create_github_release.sh | 26 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100755 codex-rs/scripts/create_github_release.sh diff --git a/codex-rs/Cargo.lock b/codex-rs/Cargo.lock index 1f601caff8..2bd66370cf 100644 --- a/codex-rs/Cargo.lock +++ b/codex-rs/Cargo.lock @@ -469,7 +469,7 @@ dependencies = [ [[package]] name = "codex-cli" -version = "0.0.2504301132" +version = "0.0.0" dependencies = [ "anyhow", "clap", @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "codex-exec" -version = "0.0.2504301132" +version = "0.0.0" dependencies = [ "anyhow", "chrono", diff --git a/codex-rs/Cargo.toml b/codex-rs/Cargo.toml index 13bf7b48c9..ea00073186 100644 --- a/codex-rs/Cargo.toml +++ b/codex-rs/Cargo.toml @@ -11,7 +11,7 @@ members = [ ] [workspace.package] -version = "0.0.2504301132" +version = "0.0.0" [profile.release] lto = "fat" diff --git a/codex-rs/scripts/create_github_release.sh b/codex-rs/scripts/create_github_release.sh new file mode 100755 index 0000000000..b0ebf33fda --- /dev/null +++ b/codex-rs/scripts/create_github_release.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -euo pipefail + +# Change to the root of the Cargo workspace. +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +# Cancel if there are uncommitted changes. +if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then + echo "ERROR: You have uncommitted or untracked changes." >&2 + exit 1 +fi + +# Fail if in a detached HEAD state. +CURRENT_BRANCH=$(git symbolic-ref --short -q HEAD) + +# Create a new branch for the release and make a commit with the new version. +VERSION=$(printf '0.0.%d' "$(date +%y%m%d%H%M)") +TAG="rust-v$VERSION" +git checkout -b "$TAG" +perl -i -pe "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml +git add Cargo.toml +git commit -m "Release $VERSION" +git tag -a "$TAG" -m "Release $VERSION" +git push origin "$TAG" +git checkout "$CURRENT_BRANCH"