diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c6979fe..0963ec1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,7 +225,8 @@ jobs: rustup default 1.99.0 # [group:rust_1.99.0] # Fetch the program version. - VERSION="$(cargo pkgid | cut -d# -f2 | cut -d: -f2)" + PKGID="$(cargo pkgid)" + VERSION="${PKGID##*[#@:]}" # If the release already exists, exit early. if gh release view "v$VERSION" &> /dev/null; then diff --git a/toast.yml b/toast.yml index 792b0e9e..0077ad70 100644 --- a/toast.yml +++ b/toast.yml @@ -443,7 +443,8 @@ tasks: - src command: | # Fetch the program version. - VERSION="$(cargo-offline pkgid | grep --extended-regexp --only-matching '[0-9.]+$')" + PKGID="$(cargo-offline pkgid)" + VERSION="${PKGID##*[#@:]}" # If this version of the package already exists on crates.io, there's nothing more to do. if cargo-online search typical | grep "typical = \"$VERSION\"" > /dev/null; then