diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68c4371..3cf8fa0 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##*[#@:]}" # Determine if the release already exists. if gh release view "v$VERSION" &> /dev/null; then diff --git a/toast.yml b/toast.yml index f6cf672..1bf6704 100644 --- a/toast.yml +++ b/toast.yml @@ -303,7 +303,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 docuum | grep "docuum = \"$VERSION\"" > /dev/null; then