From 3108eb64ac14d8ce3715e5496f48b124be234a99 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 10:31:11 -0400 Subject: [PATCH 01/13] Capture codecovcli and pypi artifacts --- .craft.yml | 2 +- .github/workflows/build.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.craft.yml b/.craft.yml index 39d46330..74556159 100644 --- a/.craft.yml +++ b/.craft.yml @@ -10,6 +10,6 @@ targets: tagPrefix: v checksums: - algorithm: sha256 - includeNames: /^sentry-prevent-cli_.*/i + includeNames: /^(sentry-prevent-|sentry_prevent_|codecov-|codecov_)cli.*/i # - name: pypi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4576d7f8..3828ec3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -166,10 +166,10 @@ jobs: - name: Download artifacts uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: - pattern: sentry-prevent-cli_* + pattern: "{sentry-prevent-,sentry_prevent_,codecov-,codecov_}cli*" - name: Upload release artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ github.sha }} - path: sentry-prevent-cli_* + path: "{sentry-prevent-cli,sentry_prevent_,codecov-,codecov_}cli*" From a0eb0bd71dc2adac02a35b1937d02dd2a1f58eb7 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 10:43:42 -0400 Subject: [PATCH 02/13] Fix patterns --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3828ec3a..d76be1ed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -166,10 +166,14 @@ jobs: - name: Download artifacts uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: - pattern: "{sentry-prevent-,sentry_prevent_,codecov-,codecov_}cli*" + pattern: "{sentry-prevent-,codecov-,codecov}cli*" - name: Upload release artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ github.sha }} - path: "{sentry-prevent-cli,sentry_prevent_,codecov-,codecov_}cli*" + path: | + sentry-prevent-cli* + sentry_prevent_cli* + codecov_cli* + codecovcli* From cc4b6c598ce2176894a6e0c25f1303e089425428 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 11:04:49 -0400 Subject: [PATCH 03/13] Test ls --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d76be1ed..e1bc062d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,6 +167,10 @@ jobs: uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: pattern: "{sentry-prevent-,codecov-,codecov}cli*" + i + + - name: Test ls + run: ls -R - name: Upload release artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 From cd976e614671c4ca68ac4fdc84c4084c66f41c5d Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 11:21:09 -0400 Subject: [PATCH 04/13] Fix oops --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1bc062d..03c387d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,7 +167,6 @@ jobs: uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 with: pattern: "{sentry-prevent-,codecov-,codecov}cli*" - i - name: Test ls run: ls -R From 276afcfb6ba96f7340745b6ca1e7f3064454585c Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 15:45:38 -0400 Subject: [PATCH 05/13] Try new pattern --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03c387d5..8e42801f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -178,5 +178,5 @@ jobs: path: | sentry-prevent-cli* sentry_prevent_cli* - codecov_cli* + codecov_cli-* codecovcli* From 30f62a63cfd058bcd9979d62ea324637178d6071 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 15:58:59 -0400 Subject: [PATCH 06/13] again --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e42801f..d6aed031 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,6 +177,6 @@ jobs: name: ${{ github.sha }} path: | sentry-prevent-cli* - sentry_prevent_cli* - codecov_cli-* + sentry-prevent-cli_wheel/* codecovcli* + codecov-cli_wheel/* From 6be25bb7d224f7a9468aecca597a9bd6aa81c415 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 16:05:31 -0400 Subject: [PATCH 07/13] Fix craft github release paths --- .craft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.craft.yml b/.craft.yml index 74556159..49c1d33d 100644 --- a/.craft.yml +++ b/.craft.yml @@ -10,6 +10,6 @@ targets: tagPrefix: v checksums: - algorithm: sha256 - includeNames: /^(sentry-prevent-|sentry_prevent_|codecov-|codecov_)cli.*/i + includeNames: /^(sentry-prevent-|sentry_prevent_|codecov|codecov_)cli.*/i # - name: pypi From 0bc856ed7ae58f32e1244a39e81238c2484e1e13 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 16:16:30 -0400 Subject: [PATCH 08/13] Remove debug step --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6aed031..097bc33c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -168,9 +168,6 @@ jobs: with: pattern: "{sentry-prevent-,codecov-,codecov}cli*" - - name: Test ls - run: ls -R - - name: Upload release artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: From fc8baa4b02da95002c64bf2ed78dccea6469de70 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 29 Jul 2025 16:20:04 -0400 Subject: [PATCH 09/13] Remove codecov cli specific github release upload --- .github/workflows/build.yml | 2 +- .github/workflows/release-codecov-cli.yml | 39 ++++------------------- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 097bc33c..277bd28b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -158,7 +158,7 @@ jobs: path: ./prevent-cli/dist/sentry-prevent-cli_* package_artifacts: - # Craft requires one artifact named after the long commit sha of the release + # Craft requires one artifact named after the long commit sha of the release. name: Package assets for Craft runs-on: ubuntu-latest needs: [build_for_pypi, build_assets, build_linux_assets] diff --git a/.github/workflows/release-codecov-cli.yml b/.github/workflows/release-codecov-cli.yml index aefa45cf..a2b2e274 100644 --- a/.github/workflows/release-codecov-cli.yml +++ b/.github/workflows/release-codecov-cli.yml @@ -1,5 +1,5 @@ -# This workflow publishes the codecov-cli assets to PyPI, GitHub releases, and -# our GCS bucket when a release is created. +# This workflow publishes the codecov-cli assets to PyPI and our GCS bucket +# when a release is created. name: Build and publish codecov-cli on: @@ -10,8 +10,12 @@ permissions: contents: read jobs: + test: + runs-on: ubuntu-latest + steps: + - run: echo "hi from build and publish codecov-cli" + # publish_to_pypi: - # needs: build_for_pypi # permissions: # id-token: write # This is required for OIDC # runs-on: ubuntu-latest @@ -32,37 +36,8 @@ jobs: # verbose: true # packages-dir: codecov-cli/dist - publish_to_github: - runs-on: ubuntu-latest - steps: - - name: Download build artifacts - uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11 - with: - branch: release/${{ github.ref }} - name: codecov.* - name_is_regexp: true - path: codecov-cli/dist - - - name: Get auth token - id: token - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 - with: - app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} - private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - - - name: Upload Release Asset - id: upload-release-asset - uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2.11.2 - with: - repo_token: ${{ steps.token.outputs.token }} - file_glob: true - file: ./codecov-cli/dist/* - tag: ${{ github.ref }} - overwrite: true - # publish_release: # name: Publish release - # needs: [build_assets, build_linux_assets, build_for_pypi, publish_to_pypi] # runs-on: ubuntu-latest # permissions: # contents: "read" From 3ec93ba263dc056f6de37e66f1a43537798d7a33 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 30 Jul 2025 10:48:41 -0400 Subject: [PATCH 10/13] Fix editable field for pyinstaller build --- .github/workflows/build.yml | 3 +++ prevent-cli/pyproject.toml | 2 +- scripts/build_alpine.sh | 1 + scripts/build_linux.sh | 1 + scripts/pre-build.sh | 4 ++++ 5 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 scripts/pre-build.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 277bd28b..4e12b8ae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,6 +94,9 @@ jobs: cd ../codecov-cli uv sync --no-binary-package pyyaml --no-binary-package ijson + - name: Run pre-build script + run: ./scripts/pre-build.sh + - name: Build with pyinstaller for ${{matrix.TARGET}} run: ${{matrix.CMD_BUILD}} diff --git a/prevent-cli/pyproject.toml b/prevent-cli/pyproject.toml index 5938e084..2085daf6 100644 --- a/prevent-cli/pyproject.toml +++ b/prevent-cli/pyproject.toml @@ -8,7 +8,7 @@ authors = [{ name = "Sentry", email = "oss@sentry.io" }] requires-python = ">=3.9" dependencies = [ - "codecov-cli==11.0.4", + "codecov-cli==11.0.3", ] [dependency-groups] diff --git a/scripts/build_alpine.sh b/scripts/build_alpine.sh index c3de7443..8c85f864 100755 --- a/scripts/build_alpine.sh +++ b/scripts/build_alpine.sh @@ -7,6 +7,7 @@ if sha256sum -c ./scripts/uv-installer-0.7.8.sha256sum; then sh uv-installer.sh; else echo "uv-installer failed checksum" && exit 1 fi +./scripts/pre-build.sh cd prevent-cli /root/.local/bin/uv python pin 3.9 # we need to build with python 3.9 to support systems with libpython >= 3.9 /root/.local/bin/uv sync diff --git a/scripts/build_linux.sh b/scripts/build_linux.sh index afd85c01..446596b6 100755 --- a/scripts/build_linux.sh +++ b/scripts/build_linux.sh @@ -3,6 +3,7 @@ set -eux apt update DEBIAN_FRONTEND=noninteractive apt install -y tzdata apt install -y python3.9 python3.9-dev python3-pip +./scripts/pre-build.sh cd prevent-cli python3.9 -m pip install uv --only-binary uv uv python pin 3.9 # we need to build with python 3.9 to support systems with libpython >= 3.9 diff --git a/scripts/pre-build.sh b/scripts/pre-build.sh new file mode 100644 index 00000000..b3ee48d2 --- /dev/null +++ b/scripts/pre-build.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# this updates the editable property on the codecov-cli import in prevent-cli +# to be false. This is necessary for the pyinstaller build to work. +sed -i "s/editable\ =\ true/editable\ =\ false/g" prevent-cli/pyproject.toml From 6ba147ebc340bfe574cf9d8fbe21b4d5903d20ae Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 30 Jul 2025 10:50:35 -0400 Subject: [PATCH 11/13] Make pre-build executable --- scripts/pre-build.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/pre-build.sh diff --git a/scripts/pre-build.sh b/scripts/pre-build.sh old mode 100644 new mode 100755 From a7aa60aafd400a69837822f9db0f82cd5de2e298 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 30 Jul 2025 10:55:27 -0400 Subject: [PATCH 12/13] Tweak script for macos compat --- scripts/pre-build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/pre-build.sh b/scripts/pre-build.sh index b3ee48d2..77da30ae 100755 --- a/scripts/pre-build.sh +++ b/scripts/pre-build.sh @@ -1,4 +1,8 @@ #!/bin/sh # this updates the editable property on the codecov-cli import in prevent-cli # to be false. This is necessary for the pyinstaller build to work. -sed -i "s/editable\ =\ true/editable\ =\ false/g" prevent-cli/pyproject.toml +if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "s/editable\ =\ true/editable\ =\ false/g" prevent-cli/pyproject.toml +else + sed -i "s/editable\ =\ true/editable\ =\ false/g" prevent-cli/pyproject.toml +fi From 5952da8dbe2ed9ec8b61be39fc2680c1eb05783e Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 30 Jul 2025 11:04:47 -0400 Subject: [PATCH 13/13] Revert test change --- prevent-cli/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prevent-cli/pyproject.toml b/prevent-cli/pyproject.toml index 2085daf6..5938e084 100644 --- a/prevent-cli/pyproject.toml +++ b/prevent-cli/pyproject.toml @@ -8,7 +8,7 @@ authors = [{ name = "Sentry", email = "oss@sentry.io" }] requires-python = ">=3.9" dependencies = [ - "codecov-cli==11.0.3", + "codecov-cli==11.0.4", ] [dependency-groups]