From fddf5d9ed0daa6740777aadf6254b97cf48adbc0 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 17 Jan 2025 16:21:10 -0500 Subject: [PATCH] Remove gpg hacks --- .github/workflows/cd.yml | 7 +------ Cargo.lock | 4 ++-- crates/cli/Cargo.toml | 4 ++-- crates/lib/Cargo.toml | 2 +- scripts/publish-release.sh | 11 +++++++---- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0a797768..72252cc6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -127,14 +127,11 @@ jobs: - run: tar cJf $FILENAME pkgx - name: GPG sign archive - # NOTE the +sqlite3 is a bug that we can’t figure out that only fails - # on darwin aarch64 in CI, the sqlite dep is not installed for some - # reason. Works locally! So we're confused and stuck. run: | ./pkgx gpg-agent --daemon || true echo $GPG_PRIVATE_KEY | \ base64 -d | \ - ./pkgx +sqlite3 gpg --import --batch --yes + ./pkgx gpg --import --batch --yes ./pkgx gpg \ --detach-sign --armor \ --local-user $GPG_KEY_ID \ @@ -142,8 +139,6 @@ jobs: env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - if: matrix.platform.build-id != 'linux+x86-64' - # ^^ pkgx^2 deployment woe - run: echo 'naughty-boy' > $FILENAME.asc if: matrix.platform.build-id == 'linux+x86-64' diff --git a/Cargo.lock b/Cargo.lock index 9c7609ef..41abdec2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -735,7 +735,7 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libpkgx" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "async-compression", @@ -1017,7 +1017,7 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "pkgx" -version = "2.1.0" +version = "2.1.1" dependencies = [ "console", "indicatif", diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index edcff9f1..4cfff363 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -3,7 +3,7 @@ name = "pkgx" description = "Run anything" authors = ["Max Howell ", "Jacob Heider "] license = "Apache-2.0" -version = "2.1.0" +version = "2.1.1" edition = "2021" repository = "https://github.com/pkgxdev/pkgx" @@ -14,7 +14,7 @@ regex = "1.11.1" indicatif = "0.17.9" nix = { version = "0.29.0", features = ["process"] } serde_json = "1.0.135" -libpkgx = { version = "0.1.0", path = "../lib" } +libpkgx = { version = "0.1.1", path = "../lib" } console = { version = "0.15", default-features = false, features = [ "ansi-parsing", ] } diff --git a/crates/lib/Cargo.toml b/crates/lib/Cargo.toml index a73ab6d5..5bf8be33 100644 --- a/crates/lib/Cargo.toml +++ b/crates/lib/Cargo.toml @@ -3,7 +3,7 @@ name = "libpkgx" description = "Install and run `pkgx` packages" authors = ["Max Howell ", "Jacob Heider "] license = "Apache-2.0" -version = "0.1.0" +version = "0.1.1" edition = "2021" repository = "https://github.com/pkgxdev/pkgx" diff --git a/scripts/publish-release.sh b/scripts/publish-release.sh index f1af1113..b23c63d6 100755 --- a/scripts/publish-release.sh +++ b/scripts/publish-release.sh @@ -11,17 +11,17 @@ if [ "$(git rev-parse --abbrev-ref HEAD)" != main ]; then fi v_new=$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "pkgx") | .version') +v_latest=$(gh release view --json tagName --jq .tagName) -case $(gh release view --json isDraft | jq .isDraft) in -'release not found') +case "$((gh release view v$v_new --json isDraft | jq .isDraft) 2>&1)" in +release\ not\ found) gum confirm "prepare draft release for $v_new?" || exit 1 gh release create \ v$v_new \ --draft=true \ - --prerelease=$is_prerelease \ --generate-notes \ - --notes-start-tag=v$v_latest \ + --notes-start-tag=$v_latest \ --title=v$v_new ;; @@ -32,6 +32,9 @@ true) false) gum format "$v_new already published! edit \`./crates/cli/Cargo.toml\`" exit 1;; +*) + echo 'unexpected exit result' >&2 + exit 2;; esac git push origin main