From efbf3898885262ca4b6a0d426f3aa93962f549b2 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 12:07:55 -0400 Subject: [PATCH 01/27] Test --- .github/workflows/build_for_pypi.yml | 7 +- .github/workflows/release_flow.yml | 125 ++++++++++++++------------- 2 files changed, 65 insertions(+), 67 deletions(-) diff --git a/.github/workflows/build_for_pypi.yml b/.github/workflows/build_for_pypi.yml index 92fd60f2..536e2bf3 100644 --- a/.github/workflows/build_for_pypi.yml +++ b/.github/workflows/build_for_pypi.yml @@ -21,15 +21,12 @@ jobs: persist-credentials: false - name: Install dependencies - run: | - pip install build + run: pip install uv - name: Build src dist run: | cd codecov-cli - python -m build --sdist - env: - PIP_CONSTRAINT: requirements.txt + uv build --sdist - name: Store the distribution packages uses: actions/upload-artifact@v4 diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 342d01df..cb2cb8cd 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -4,6 +4,7 @@ on: release: types: - created + push: permissions: contents: read @@ -15,67 +16,67 @@ jobs: contents: read # This is required for actions/checkout uses: ./.github/workflows/build_for_pypi.yml with: - publish: true + publish: false secrets: inherit - buildassets: - name: Build packages - uses: ./.github/workflows/build_assets.yml - with: - release: true - secrets: inherit - - publish_to_pypi: - needs: - - build_for_pypi - permissions: - id-token: write # This is required for OIDC - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/codecov-cli - steps: - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: dist/ - pattern: cibw-* - - - name: Display and move artifacts - run: | - ls -alrt */*/* - mv */*/*/* dist/ - mv */*/* dist/ - echo "Moved files" - ls -alrt */* - echo "Deleting empty directories" - find . -empty -type d -delete - ls -alrt */* - - - name: Publish package to PyPi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - verbose: true - - publish_release: - name: Publish release - needs: [buildassets, publish_to_pypi] - runs-on: ubuntu-latest - permissions: - contents: 'read' - id-token: 'write' - steps: - - id: 'auth' - name: 'Authenticate to Google Cloud' - uses: 'google-github-actions/auth@v1.0.0' - with: - create_credentials_file: 'true' - workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }} - service_account: ${{ secrets.CODECOV_GCP_WIDSA }} - - # Publish the release tag to a Pub/Sub topic - - name: Publish a message to a Pub/Sub topic - env: - CLOUDSDK_CORE_PROJECT: ${{ secrets.GCLOUD_UPLOADER_PROJECT_ID }} - run: | - gcloud pubsub topics publish ${{ secrets.GCLOUD_UPLOADER_PUBSUB_TOPIC }} --message '{"release":"'"${{ github.ref_name }}"'", "latest":true}' + # buildassets: + # name: Build packages + # uses: ./.github/workflows/build_assets.yml + # with: + # release: false + # secrets: inherit + # + # publish_to_pypi: + # needs: + # - build_for_pypi + # permissions: + # id-token: write # This is required for OIDC + # runs-on: ubuntu-latest + # environment: + # name: pypi + # url: https://pypi.org/p/codecov-cli + # steps: + # - name: Download artifacts + # uses: actions/download-artifact@v4 + # with: + # path: dist/ + # pattern: cibw-* + # + # - name: Display and move artifacts + # run: | + # ls -alrt */*/* + # mv */*/*/* dist/ + # mv */*/* dist/ + # echo "Moved files" + # ls -alrt */* + # echo "Deleting empty directories" + # find . -empty -type d -delete + # ls -alrt */* + # + # - name: Publish package to PyPi + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # verbose: true + # + # publish_release: + # name: Publish release + # needs: [buildassets, publish_to_pypi] + # runs-on: ubuntu-latest + # permissions: + # contents: 'read' + # id-token: 'write' + # steps: + # - id: 'auth' + # name: 'Authenticate to Google Cloud' + # uses: 'google-github-actions/auth@v1.0.0' + # with: + # create_credentials_file: 'true' + # workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }} + # service_account: ${{ secrets.CODECOV_GCP_WIDSA }} + # + # # Publish the release tag to a Pub/Sub topic + # - name: Publish a message to a Pub/Sub topic + # env: + # CLOUDSDK_CORE_PROJECT: ${{ secrets.GCLOUD_UPLOADER_PROJECT_ID }} + # run: | + # gcloud pubsub topics publish ${{ secrets.GCLOUD_UPLOADER_PUBSUB_TOPIC }} --message '{"release":"'"${{ github.ref_name }}"'", "latest":true}' From cacb46def1b19e353db567bb27c85757ee299e0f Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 12:20:13 -0400 Subject: [PATCH 02/27] Test2 --- .github/workflows/build_for_pypi.yml | 45 +++++----------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build_for_pypi.yml b/.github/workflows/build_for_pypi.yml index 536e2bf3..d9cc6504 100644 --- a/.github/workflows/build_for_pypi.yml +++ b/.github/workflows/build_for_pypi.yml @@ -13,7 +13,7 @@ permissions: contents: read jobs: - build_src_for_pypi: + build_for_pypi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -23,48 +23,19 @@ jobs: - name: Install dependencies run: pip install uv - - name: Build src dist + - name: Build sdist and bdist run: | cd codecov-cli - uv build --sdist + uv build - - name: Store the distribution packages + - name: Store the source distribution uses: actions/upload-artifact@v4 with: - name: cibw-sdist + name: codecov-cli-sdist path: ./**/*.tar.gz - build_dist_for_pypi: - needs: - - build_src_for_pypi - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - macos-13 - - macos-latest - - ubuntu-24.04-arm - - ubuntu-latest - - windows-latest - steps: - - name: Download the sdist - uses: actions/download-artifact@v4 - with: - name: cibw-sdist - - - name: Get sdist filename - id: get-sdist - run: | - echo "sdist_filename=$(ls codecov-cli/dist/)" >> "${GITHUB_OUTPUT}" - shell: bash - - - name: Build wheels - uses: pypa/cibuildwheel@v2.22.0 - with: - package-dir: codecov-cli/dist/${{ steps.get-sdist.outputs.sdist_filename }} - - - name: Store the distribution packages + - name: Store the binary distribution uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }} - path: ./wheelhouse/*.whl + name: codecov-cli-bdist + path: ./**/*.whl From 49c490fd1998fb8922d22e43c45a0745bca34c7f Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 12:27:31 -0400 Subject: [PATCH 03/27] License fix: --- .github/workflows/build_for_pypi.yml | 12 +- LICENSE => codecov-cli/LICENSE | 0 codecov-cli/pyproject.toml | 45 +++--- prevent-cli/LICENSE | 201 +++++++++++++++++++++++++++ prevent-cli/pyproject.toml | 1 + 5 files changed, 228 insertions(+), 31 deletions(-) rename LICENSE => codecov-cli/LICENSE (100%) create mode 100644 prevent-cli/LICENSE diff --git a/.github/workflows/build_for_pypi.yml b/.github/workflows/build_for_pypi.yml index d9cc6504..c8090079 100644 --- a/.github/workflows/build_for_pypi.yml +++ b/.github/workflows/build_for_pypi.yml @@ -28,14 +28,8 @@ jobs: cd codecov-cli uv build - - name: Store the source distribution + - name: Store the distributions uses: actions/upload-artifact@v4 with: - name: codecov-cli-sdist - path: ./**/*.tar.gz - - - name: Store the binary distribution - uses: actions/upload-artifact@v4 - with: - name: codecov-cli-bdist - path: ./**/*.whl + name: codecov-cli-dist + path: ./codecov-cli/dist/* diff --git a/LICENSE b/codecov-cli/LICENSE similarity index 100% rename from LICENSE rename to codecov-cli/LICENSE diff --git a/codecov-cli/pyproject.toml b/codecov-cli/pyproject.toml index 3ae7d3e6..96edb15d 100644 --- a/codecov-cli/pyproject.toml +++ b/codecov-cli/pyproject.toml @@ -1,15 +1,16 @@ -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - [project] +name = "codecov-cli" +version = "10.4.0" +description = "Codecov Command Line Interface" +readme = "README.md" +license-files = ["LICENSE"] authors = [ {name = "Tom Hu", email = "thomas.hu@sentry.io"}, ] maintainers = [ {name = "Codecov Support", email = "support@codecov.io"}, ] -description = "Codecov Command Line Interface" +requires-python = ">= 3.9" dependencies = [ "click==8.*", "ijson==3.*", @@ -18,23 +19,6 @@ dependencies = [ "sentry-sdk==2.*", "test-results-parser==0.5.4", ] -license = {file = "LICENSE"} -name = "codecov-cli" -readme = "README.md" -requires-python = ">= 3.9" -version = "10.4.0" - -[project.scripts] -codecov = "codecov_cli.main:run" -codecovcli = "codecov_cli.main:run" - -[tool.pytest.ini_options] -env = [ - "CODECOV_ENV=test", -] - -[tool.setuptools] -packages = ["codecov_cli"] [dependency-groups] dev = [ @@ -45,3 +29,20 @@ dev = [ "pytest-env==1.*", "pytest-mock==3.*", ] + +[project.scripts] +codecov = "codecov_cli.main:run" +codecovcli = "codecov_cli.main:run" + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools] +packages = ["codecov_cli"] + +[tool.pytest.ini_options] +env = [ + "CODECOV_ENV=test", +] + diff --git a/prevent-cli/LICENSE b/prevent-cli/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/prevent-cli/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/prevent-cli/pyproject.toml b/prevent-cli/pyproject.toml index 35e70f79..1c6aa486 100644 --- a/prevent-cli/pyproject.toml +++ b/prevent-cli/pyproject.toml @@ -3,6 +3,7 @@ name = "prevent-cli" version = "0.1.0" description = "Add your description here" readme = "README.md" +license-files = ["LICENSE"] authors = [ { name = "joseph-sentry", email = "joseph.sawaya@sentry.io" } ] From bff049af24214634424f393f7bc01a9364f9a194 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 12:45:01 -0400 Subject: [PATCH 04/27] Tweak build_assets --- .github/workflows/build_assets.yml | 32 +++++++++---------------- .github/workflows/build_for_pypi.yml | 5 ---- .github/workflows/release_flow.yml | 14 +++++------ codecov-cli/scripts/build_alpine_arm.sh | 7 ++---- codecov-cli/scripts/build_linux_arm.sh | 8 +++---- 5 files changed, 22 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 1b05dd61..90293682 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -22,11 +22,6 @@ jobs: include: - os: macos-latest TARGET: macos - # currently, wrapt pulls the arm64 version instead of the universal one, so the below is a hack - CMD_REQS: > - mkdir -p pip-packages && cd pip-packages && pip wheel --no-cache-dir --no-binary ijson,charset_normalizer,PyYAML .. && - rm $(ls | grep wrapt) && pip download wrapt --platform=universal2 --only-binary=:all: && pip install $(ls | grep wrapt) --force-reinstall && cd .. && - pip install --no-deps --no-index --find-links=pip-packages pip-packages/* CMD_BUILD: > pyinstaller --copy-metadata codecov-cli --target-arch universal2 -F codecov_cli/main.py && mv dist/main dist/codecovcli_macos && @@ -36,8 +31,6 @@ jobs: - os: ubuntu-22.04 TARGET: ubuntu - CMD_REQS: > - pip install -r requirements.txt && pip install . CMD_BUILD: > pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py && cp ./dist/main ./dist/codecovcli_linux @@ -46,8 +39,6 @@ jobs: - os: windows-latest TARGET: windows - CMD_REQS: > - pip install -r requirements.txt && pip install . CMD_BUILD: > pyinstaller --copy-metadata codecov-cli -F codecov_cli\main.py && Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" @@ -57,22 +48,21 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.11 + - name: Set up Python 3.13 uses: actions/setup-python@v3 with: - python-version: "3.11" + python-version: "3.13" - name: Install dependencies run: | + pip install uv pyinstaller cd codecov-cli - ${{matrix.CMD_REQS}} - python setup.py build - - - name: Install pyinstaller - run: pip install pyinstaller + uv sync - name: Build with pyinstaller for ${{matrix.TARGET}} - run: cd codecov-cli && ${{matrix.CMD_BUILD}} + run: | + cd codecov-cli + ${{matrix.CMD_BUILD}} - name: Upload a Build Artifact uses: actions/upload-artifact@v4 @@ -106,13 +96,13 @@ jobs: strategy: matrix: include: - - distro: "python:3.11-alpine3.18" + - distro: "python:3.13-alpine" arch: arm64 distro_name: alpine - - distro: "python:3.11-alpine3.18" + - distro: "python:3.13-alpine" arch: x86_64 distro_name: alpine - - distro: "python:3.11-bullseye" + - distro: "python:3.13-bullseye" arch: arm64 distro_name: linux @@ -132,7 +122,7 @@ jobs: -w ${{ github.workspace }} \ --platform linux/${{ matrix.arch }} \ ${{ matrix.distro }} \ - ./codecov-cli/scripts/build_${{ matrix.distro_name }}_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} + ./codecov-cli/scripts/build_linux_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} - name: Upload a Build Artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build_for_pypi.yml b/.github/workflows/build_for_pypi.yml index c8090079..1d7642eb 100644 --- a/.github/workflows/build_for_pypi.yml +++ b/.github/workflows/build_for_pypi.yml @@ -3,11 +3,6 @@ name: Build for PyPi on: workflow_call: - inputs: - publish: - type: boolean - default: false - description: "Build for PyPi" permissions: contents: read diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index cb2cb8cd..6b5b7002 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -15,17 +15,15 @@ jobs: id-token: write # This is required for requesting the JWT contents: read # This is required for actions/checkout uses: ./.github/workflows/build_for_pypi.yml + secrets: inherit + + buildassets: + name: Build packages + uses: ./.github/workflows/build_assets.yml with: - publish: false + release: false secrets: inherit - # buildassets: - # name: Build packages - # uses: ./.github/workflows/build_assets.yml - # with: - # release: false - # secrets: inherit - # # publish_to_pypi: # needs: # - build_for_pypi diff --git a/codecov-cli/scripts/build_alpine_arm.sh b/codecov-cli/scripts/build_alpine_arm.sh index a18691eb..27c657d5 100755 --- a/codecov-cli/scripts/build_alpine_arm.sh +++ b/codecov-cli/scripts/build_alpine_arm.sh @@ -1,9 +1,6 @@ #!/bin/sh cd codecov-cli -apk add musl-dev build-base -pip install -r requirements.txt -pip install . -python setup.py build -pip install pyinstaller +pip install uv pyinstaller +uv sync pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py cp ./dist/main ./dist/codecovcli_$1 diff --git a/codecov-cli/scripts/build_linux_arm.sh b/codecov-cli/scripts/build_linux_arm.sh index b389584c..c8d93cd8 100755 --- a/codecov-cli/scripts/build_linux_arm.sh +++ b/codecov-cli/scripts/build_linux_arm.sh @@ -1,9 +1,7 @@ #!/bin/sh cd codecov-cli -apt install build-essential -pip install -r requirements.txt -pip install . -python setup.py build -pip install pyinstaller +#apt install build-essential +pip install uv pyinstaller +uv sync pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py cp ./dist/main ./dist/codecovcli_$1 From 841ce3ee825b59b520d75aba8ccf13622da6a98a Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 13:02:15 -0400 Subject: [PATCH 05/27] Try 3.12 --- .github/workflows/build_assets.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 90293682..fa6c9906 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -48,10 +48,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.13 + - name: Set up Python 3.12 uses: actions/setup-python@v3 with: - python-version: "3.13" + python-version: "3.12" - name: Install dependencies run: | @@ -96,13 +96,13 @@ jobs: strategy: matrix: include: - - distro: "python:3.13-alpine" + - distro: "python:3.12-alpine" arch: arm64 distro_name: alpine - - distro: "python:3.13-alpine" + - distro: "python:3.12-alpine" arch: x86_64 distro_name: alpine - - distro: "python:3.13-bullseye" + - distro: "python:3.12-bullseye" arch: arm64 distro_name: linux From f31f39b8ed21df9bab7bc4b74cdcecd44c1a87b5 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 13:05:14 -0400 Subject: [PATCH 06/27] Add build-base/essential --- codecov-cli/scripts/build_alpine_arm.sh | 2 ++ codecov-cli/scripts/build_linux_arm.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/codecov-cli/scripts/build_alpine_arm.sh b/codecov-cli/scripts/build_alpine_arm.sh index 27c657d5..4763f829 100755 --- a/codecov-cli/scripts/build_alpine_arm.sh +++ b/codecov-cli/scripts/build_alpine_arm.sh @@ -1,4 +1,6 @@ #!/bin/sh +apk add build-base +#apk add musl-dev build-base cd codecov-cli pip install uv pyinstaller uv sync diff --git a/codecov-cli/scripts/build_linux_arm.sh b/codecov-cli/scripts/build_linux_arm.sh index c8d93cd8..08e3d1ed 100755 --- a/codecov-cli/scripts/build_linux_arm.sh +++ b/codecov-cli/scripts/build_linux_arm.sh @@ -1,6 +1,6 @@ #!/bin/sh +apt install build-essential cd codecov-cli -#apt install build-essential pip install uv pyinstaller uv sync pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py From 5b3ac312b287b77750ab5787e63641269c4492b6 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 13:06:29 -0400 Subject: [PATCH 07/27] Add back distro scripts --- .github/workflows/build_assets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index fa6c9906..53f34755 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -122,7 +122,7 @@ jobs: -w ${{ github.workspace }} \ --platform linux/${{ matrix.arch }} \ ${{ matrix.distro }} \ - ./codecov-cli/scripts/build_linux_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} + ./codecov-cli/scripts/build_${{ matrix.distro_name }}_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} - name: Upload a Build Artifact uses: actions/upload-artifact@v4 From de8508cdc2be0979bb5406119228289bde4c914b Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 13:11:44 -0400 Subject: [PATCH 08/27] idk --- .github/workflows/build_assets.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 53f34755..8724bc2f 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -60,9 +60,7 @@ jobs: uv sync - name: Build with pyinstaller for ${{matrix.TARGET}} - run: | - cd codecov-cli - ${{matrix.CMD_BUILD}} + run: cd codecov-cli && ${{matrix.CMD_BUILD}} - name: Upload a Build Artifact uses: actions/upload-artifact@v4 From 8a0d5afadf3fef6b605e5c64aa4576d79be4a8e5 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Wed, 21 May 2025 13:21:27 -0400 Subject: [PATCH 09/27] spec --- .github/workflows/build_assets.yml | 6 +++--- codecov-cli/MANIFEST.in | 5 ----- codecov-cli/scripts/build_alpine_arm.sh | 2 +- codecov-cli/scripts/build_linux_arm.sh | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) delete mode 100644 codecov-cli/MANIFEST.in diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 8724bc2f..40f41081 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -23,7 +23,7 @@ jobs: - os: macos-latest TARGET: macos CMD_BUILD: > - pyinstaller --copy-metadata codecov-cli --target-arch universal2 -F codecov_cli/main.py && + pyinstaller --target-arch universal2 main.spec && mv dist/main dist/codecovcli_macos && lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64' OUT_FILE_NAME: codecovcli_macos @@ -32,7 +32,7 @@ jobs: - os: ubuntu-22.04 TARGET: ubuntu CMD_BUILD: > - pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py && + pyinstaller main.spec && cp ./dist/main ./dist/codecovcli_linux OUT_FILE_NAME: codecovcli_linux ASSET_MIME: application/octet-stream @@ -40,7 +40,7 @@ jobs: - os: windows-latest TARGET: windows CMD_BUILD: > - pyinstaller --copy-metadata codecov-cli -F codecov_cli\main.py && + pyinstaller main.spec && Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" OUT_FILE_NAME: codecovcli_windows.exe ASSET_MIME: application/vnd.microsoft.portable-executable diff --git a/codecov-cli/MANIFEST.in b/codecov-cli/MANIFEST.in deleted file mode 100644 index 4f3a2eaa..00000000 --- a/codecov-cli/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include requirements.txt - -recursive-include codecov_cli * -recursive-include tests * -recursive-include samples * diff --git a/codecov-cli/scripts/build_alpine_arm.sh b/codecov-cli/scripts/build_alpine_arm.sh index 4763f829..65b1a03c 100755 --- a/codecov-cli/scripts/build_alpine_arm.sh +++ b/codecov-cli/scripts/build_alpine_arm.sh @@ -4,5 +4,5 @@ apk add build-base cd codecov-cli pip install uv pyinstaller uv sync -pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py +pyinstaller main.spec cp ./dist/main ./dist/codecovcli_$1 diff --git a/codecov-cli/scripts/build_linux_arm.sh b/codecov-cli/scripts/build_linux_arm.sh index 08e3d1ed..a4cbe261 100755 --- a/codecov-cli/scripts/build_linux_arm.sh +++ b/codecov-cli/scripts/build_linux_arm.sh @@ -3,5 +3,5 @@ apt install build-essential cd codecov-cli pip install uv pyinstaller uv sync -pyinstaller --copy-metadata codecov-cli -F codecov_cli/main.py +pyinstaller main.spec cp ./dist/main ./dist/codecovcli_$1 From 4810dd564890f43b2928ddf4c5788f8373359f84 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 08:46:08 -0400 Subject: [PATCH 10/27] I think fix --- .github/workflows/build_assets.yml | 9 +++++---- codecov-cli/scripts/build_alpine_arm.sh | 6 +++--- codecov-cli/scripts/build_linux_arm.sh | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 40f41081..2f4bd4bb 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -23,7 +23,7 @@ jobs: - os: macos-latest TARGET: macos CMD_BUILD: > - pyinstaller --target-arch universal2 main.spec && + uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py && mv dist/main dist/codecovcli_macos && lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64' OUT_FILE_NAME: codecovcli_macos @@ -32,7 +32,7 @@ jobs: - os: ubuntu-22.04 TARGET: ubuntu CMD_BUILD: > - pyinstaller main.spec && + uv run pyinstaller -F codecov_cli/main.py && cp ./dist/main ./dist/codecovcli_linux OUT_FILE_NAME: codecovcli_linux ASSET_MIME: application/octet-stream @@ -40,7 +40,7 @@ jobs: - os: windows-latest TARGET: windows CMD_BUILD: > - pyinstaller main.spec && + uv run pyinstaller -F codecov_cli\main.py && Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" OUT_FILE_NAME: codecovcli_windows.exe ASSET_MIME: application/vnd.microsoft.portable-executable @@ -55,9 +55,10 @@ jobs: - name: Install dependencies run: | - pip install uv pyinstaller + pip install uv cd codecov-cli uv sync + uv add --dev pyinstaller - name: Build with pyinstaller for ${{matrix.TARGET}} run: cd codecov-cli && ${{matrix.CMD_BUILD}} diff --git a/codecov-cli/scripts/build_alpine_arm.sh b/codecov-cli/scripts/build_alpine_arm.sh index 65b1a03c..c5caf85a 100755 --- a/codecov-cli/scripts/build_alpine_arm.sh +++ b/codecov-cli/scripts/build_alpine_arm.sh @@ -1,8 +1,8 @@ #!/bin/sh apk add build-base -#apk add musl-dev build-base cd codecov-cli -pip install uv pyinstaller +pip install uv uv sync -pyinstaller main.spec +uv add --dev pyinstaller +uv run pyinstaller main.spec cp ./dist/main ./dist/codecovcli_$1 diff --git a/codecov-cli/scripts/build_linux_arm.sh b/codecov-cli/scripts/build_linux_arm.sh index a4cbe261..c0248c90 100755 --- a/codecov-cli/scripts/build_linux_arm.sh +++ b/codecov-cli/scripts/build_linux_arm.sh @@ -1,7 +1,8 @@ #!/bin/sh apt install build-essential cd codecov-cli -pip install uv pyinstaller +pip install uv uv sync -pyinstaller main.spec +uv add --dev pyinstaller +uv run pyinstaller -F codecov_cli/main.py cp ./dist/main ./dist/codecovcli_$1 From cda710c087f7c69fd9b2cf445ee8101f4f3f6568 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 08:53:53 -0400 Subject: [PATCH 11/27] test macos? --- .github/workflows/build_assets.yml | 2 +- codecov-cli/scripts/build_alpine_arm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 2f4bd4bb..5b74d6d7 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -23,7 +23,7 @@ jobs: - os: macos-latest TARGET: macos CMD_BUILD: > - uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py && + rm -r .venv && uv sync --no-binary && uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py && mv dist/main dist/codecovcli_macos && lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64' OUT_FILE_NAME: codecovcli_macos diff --git a/codecov-cli/scripts/build_alpine_arm.sh b/codecov-cli/scripts/build_alpine_arm.sh index c5caf85a..3594fc91 100755 --- a/codecov-cli/scripts/build_alpine_arm.sh +++ b/codecov-cli/scripts/build_alpine_arm.sh @@ -4,5 +4,5 @@ cd codecov-cli pip install uv uv sync uv add --dev pyinstaller -uv run pyinstaller main.spec +uv run pyinstaller -F codecov_cli/main.py cp ./dist/main ./dist/codecovcli_$1 From a9ff3e3f5ca083cf2fe176fd1de6e43a8cf48a02 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 09:25:19 -0400 Subject: [PATCH 12/27] Try no universal2 --- .github/workflows/build_assets.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 5b74d6d7..07845add 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -23,7 +23,7 @@ jobs: - os: macos-latest TARGET: macos CMD_BUILD: > - rm -r .venv && uv sync --no-binary && uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py && + uv run pyinstaller -F codecov_cli/main.py && mv dist/main dist/codecovcli_macos && lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64' OUT_FILE_NAME: codecovcli_macos From d4429c66ffbe22e2b86f36050c98ad16ce6c85e8 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 09:34:31 -0400 Subject: [PATCH 13/27] Add x86_64 macos to os matrix --- .github/workflows/build_assets.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index 07845add..aec01232 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -20,13 +20,20 @@ jobs: fail-fast: true matrix: include: + - os: macos-13 + TARGET: macos + CMD_BUILD: > + uv run pyinstaller -F codecov_cli/main.py && + mv dist/main dist/codecovcli_macos_x86_64 + OUT_FILE_NAME: codecovcli_macos_x86_64 + ASSET_MIME: application/octet-stream + - os: macos-latest TARGET: macos CMD_BUILD: > uv run pyinstaller -F codecov_cli/main.py && - mv dist/main dist/codecovcli_macos && - lipo -archs dist/codecovcli_macos | grep 'x86_64 arm64' - OUT_FILE_NAME: codecovcli_macos + mv dist/main dist/codecovcli_macos_arm64 + OUT_FILE_NAME: codecovcli_macos_arm64 ASSET_MIME: application/octet-stream - os: ubuntu-22.04 From 0b15a2229f00cbd5e582142a41236468b9954892 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 12:38:21 -0400 Subject: [PATCH 14/27] Fix universal2 build and consolidate release workflows into one --- .github/workflows/build_assets.yml | 157 ----------------- .github/workflows/build_for_pypi.yml | 30 ---- .github/workflows/release_flow.yml | 251 ++++++++++++++++++++------- 3 files changed, 184 insertions(+), 254 deletions(-) delete mode 100644 .github/workflows/build_assets.yml delete mode 100644 .github/workflows/build_for_pypi.yml diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml deleted file mode 100644 index aec01232..00000000 --- a/.github/workflows/build_assets.yml +++ /dev/null @@ -1,157 +0,0 @@ ---- -name: Build Compiled Assets - -on: - workflow_call: - inputs: - release: - type: boolean - default: false - description: "Attach artifacts to a release" - -permissions: - contents: read - -jobs: - build_assets: - name: Build packages - ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - include: - - os: macos-13 - TARGET: macos - CMD_BUILD: > - uv run pyinstaller -F codecov_cli/main.py && - mv dist/main dist/codecovcli_macos_x86_64 - OUT_FILE_NAME: codecovcli_macos_x86_64 - ASSET_MIME: application/octet-stream - - - os: macos-latest - TARGET: macos - CMD_BUILD: > - uv run pyinstaller -F codecov_cli/main.py && - mv dist/main dist/codecovcli_macos_arm64 - OUT_FILE_NAME: codecovcli_macos_arm64 - ASSET_MIME: application/octet-stream - - - os: ubuntu-22.04 - TARGET: ubuntu - CMD_BUILD: > - uv run pyinstaller -F codecov_cli/main.py && - cp ./dist/main ./dist/codecovcli_linux - OUT_FILE_NAME: codecovcli_linux - ASSET_MIME: application/octet-stream - - - os: windows-latest - TARGET: windows - CMD_BUILD: > - uv run pyinstaller -F codecov_cli\main.py && - Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" - OUT_FILE_NAME: codecovcli_windows.exe - ASSET_MIME: application/vnd.microsoft.portable-executable - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.12 - uses: actions/setup-python@v3 - with: - python-version: "3.12" - - - name: Install dependencies - run: | - pip install uv - cd codecov-cli - uv sync - uv add --dev pyinstaller - - - name: Build with pyinstaller for ${{matrix.TARGET}} - run: cd codecov-cli && ${{matrix.CMD_BUILD}} - - - name: Upload a Build Artifact - uses: actions/upload-artifact@v4 - if: inputs.release == false - with: - name: ${{ matrix.OUT_FILE_NAME }} - path: ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }} - - - name: Get auth token - if: inputs.release == true - 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 - if: inputs.release == true - id: upload-release-asset - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ steps.token.outputs.token }} - file: ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }} - asset_name: ${{ matrix.OUT_FILE_NAME }} - tag: ${{ github.ref }} - overwrite: true - - build_assets_alpine_arm: - name: Build assets - Alpine and ARM - runs-on: ubuntu-latest - strategy: - matrix: - include: - - distro: "python:3.12-alpine" - arch: arm64 - distro_name: alpine - - distro: "python:3.12-alpine" - arch: x86_64 - distro_name: alpine - - distro: "python:3.12-bullseye" - arch: arm64 - distro_name: linux - - steps: - - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - with: - platforms: ${{ matrix.arch }} - - - name: Run in Docker - run: | - docker run \ - --rm \ - -v $(pwd):/${{ github.workspace }} \ - -w ${{ github.workspace }} \ - --platform linux/${{ matrix.arch }} \ - ${{ matrix.distro }} \ - ./codecov-cli/scripts/build_${{ matrix.distro_name }}_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} - - - name: Upload a Build Artifact - uses: actions/upload-artifact@v4 - if: inputs.release == false - with: - name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} - path: ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} - - - name: Get auth token - if: inputs.release == true - 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 - if: inputs.release == true - id: upload-release-asset - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ steps.token.outputs.token }} - file: ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} - asset_name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} - tag: ${{ github.ref }} - overwrite: true diff --git a/.github/workflows/build_for_pypi.yml b/.github/workflows/build_for_pypi.yml deleted file mode 100644 index 1d7642eb..00000000 --- a/.github/workflows/build_for_pypi.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: Build for PyPi - -on: - workflow_call: - -permissions: - contents: read - -jobs: - build_for_pypi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Install dependencies - run: pip install uv - - - name: Build sdist and bdist - run: | - cd codecov-cli - uv build - - - name: Store the distributions - uses: actions/upload-artifact@v4 - with: - name: codecov-cli-dist - path: ./codecov-cli/dist/* diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 6b5b7002..68255d08 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -10,71 +10,188 @@ permissions: contents: read jobs: - build_for_pypi: + build_and_publish_to_pypi: permissions: - id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout - uses: ./.github/workflows/build_for_pypi.yml - secrets: inherit - - buildassets: - name: Build packages - uses: ./.github/workflows/build_assets.yml - with: - release: false - secrets: inherit - - # publish_to_pypi: - # needs: - # - build_for_pypi - # permissions: - # id-token: write # This is required for OIDC - # runs-on: ubuntu-latest - # environment: - # name: pypi - # url: https://pypi.org/p/codecov-cli - # steps: - # - name: Download artifacts - # uses: actions/download-artifact@v4 - # with: - # path: dist/ - # pattern: cibw-* - # - # - name: Display and move artifacts - # run: | - # ls -alrt */*/* - # mv */*/*/* dist/ - # mv */*/* dist/ - # echo "Moved files" - # ls -alrt */* - # echo "Deleting empty directories" - # find . -empty -type d -delete - # ls -alrt */* - # - # - name: Publish package to PyPi - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # verbose: true - # - # publish_release: - # name: Publish release - # needs: [buildassets, publish_to_pypi] - # runs-on: ubuntu-latest - # permissions: - # contents: 'read' - # id-token: 'write' - # steps: - # - id: 'auth' - # name: 'Authenticate to Google Cloud' - # uses: 'google-github-actions/auth@v1.0.0' - # with: - # create_credentials_file: 'true' - # workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }} - # service_account: ${{ secrets.CODECOV_GCP_WIDSA }} - # - # # Publish the release tag to a Pub/Sub topic - # - name: Publish a message to a Pub/Sub topic - # env: - # CLOUDSDK_CORE_PROJECT: ${{ secrets.GCLOUD_UPLOADER_PROJECT_ID }} - # run: | - # gcloud pubsub topics publish ${{ secrets.GCLOUD_UPLOADER_PUBSUB_TOPIC }} --message '{"release":"'"${{ github.ref_name }}"'", "latest":true}' + id-token: write # This is required for OIDC + contents: read + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/codecov-cli + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install dependencies + run: pip install uv + + - name: Build sdist and bdist + run: | + cd codecov-cli + uv build + + - name: Publish package to PyPi + if: false #change to true + uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true + + build_assets: + name: Build packages - ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + include: + - os: macos-latest + TARGET: macos + CMD_BUILD: > + uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py && + mv dist/main dist/codecovcli_macos_x86_64 + OUT_FILE_NAME: codecovcli_macos + ASSET_MIME: application/octet-stream + + - os: ubuntu-22.04 + TARGET: ubuntu + CMD_BUILD: > + uv run pyinstaller -F codecov_cli/main.py && + cp ./dist/main ./dist/codecovcli_linux + OUT_FILE_NAME: codecovcli_linux + ASSET_MIME: application/octet-stream + + - os: windows-latest + TARGET: windows + CMD_BUILD: > + uv run pyinstaller -F codecov_cli\main.py && + Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" + OUT_FILE_NAME: codecovcli_windows.exe + ASSET_MIME: application/vnd.microsoft.portable-executable + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python 3.13 + uses: actions/setup-python@v3 + with: + python-version: "3.13" + + - name: Install dependencies + run: | + pip install uv + cd codecov-cli + # Need to build pyyaml and ijson from sdists to get universal2 macos build to work + uv sync --no-binary-package pyyaml --no-binary-package ijson + uv add --dev pyinstaller + + - name: Build with pyinstaller for ${{matrix.TARGET}} + run: cd codecov-cli && ${{matrix.CMD_BUILD}} + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4 + if: inputs.release == false + with: + name: ${{ matrix.OUT_FILE_NAME }} + path: ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }} + + - name: Get auth token + if: inputs.release == true + 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 + if: inputs.release == true + id: upload-release-asset + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ steps.token.outputs.token }} + file: ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }} + asset_name: ${{ matrix.OUT_FILE_NAME }} + tag: ${{ github.ref }} + overwrite: true + + build_assets_alpine_arm: + name: Build assets - Alpine and ARM + runs-on: ubuntu-latest + strategy: + matrix: + include: + - distro: "python:3.12-alpine" + arch: arm64 + distro_name: alpine + - distro: "python:3.12-alpine" + arch: x86_64 + distro_name: alpine + - distro: "python:3.12-bullseye" + arch: arm64 + distro_name: linux + + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: ${{ matrix.arch }} + + - name: Run in Docker + run: | + docker run \ + --rm \ + -v $(pwd):/${{ github.workspace }} \ + -w ${{ github.workspace }} \ + --platform linux/${{ matrix.arch }} \ + ${{ matrix.distro }} \ + ./codecov-cli/scripts/build_${{ matrix.distro_name }}_arm.sh ${{ matrix.distro_name }}_${{ matrix.arch }} + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v4 + if: false # todo change to true + with: + name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} + path: ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} + + - name: Get auth token + if: false # todo change to true + 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 + if: false # todo change to true + id: upload-release-asset + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ steps.token.outputs.token }} + file: ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} + asset_name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} + tag: ${{ github.ref }} + overwrite: true + + publish_release: + name: Publish release + needs: [buildassets, publish_to_pypi] + runs-on: ubuntu-latest + permissions: + contents: 'read' + id-token: 'write' + steps: + - id: 'auth' + name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1.0.0' + with: + create_credentials_file: 'true' + workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }} + service_account: ${{ secrets.CODECOV_GCP_WIDSA }} + + # Publish the release tag to a Pub/Sub topic + - name: Publish a message to a Pub/Sub topic + env: + CLOUDSDK_CORE_PROJECT: ${{ secrets.GCLOUD_UPLOADER_PROJECT_ID }} + run: | + gcloud pubsub topics publish ${{ secrets.GCLOUD_UPLOADER_PUBSUB_TOPIC }} --message '{"release":"'"${{ github.ref_name }}"'", "latest":true}' From 6d90c38381ed23ea8c46d39d5bc7ef165f29740e Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 12:54:53 -0400 Subject: [PATCH 15/27] idk --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d404904e..dd9ee111 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: - name: Detect changes on commit run: | if [ -n "$(git diff codecov-cli/codecovcli_commands prevent-cli/preventcli_commands)" ]; then - echo "Please run `python command_dump.py` before submitting, or install the hooks" + echo "Please run `make command_dump` before submitting, or install the hooks" echo "$(git diff codecov-cli/codecovcli_commands prevent-cli/preventcli_commands)" exit 1 fi @@ -94,7 +94,7 @@ jobs: - name: Install dependencies run: | - python -m pip install uv + pip install uv uv sync --project codecov-cli uv sync --project prevent-cli From de2afe35cc51a1eb44cefbc04a1017698c13203c Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 12:59:51 -0400 Subject: [PATCH 16/27] Fix stuff? --- Makefile | 2 +- codecov-cli/MANIFEST.in | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 codecov-cli/MANIFEST.in diff --git a/Makefile b/Makefile index fed2fdc1..cd802de4 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ lint: make lint.run command_dump: - cd prevent-cli && uv run command_dump.py + uv run --project prevent-cli prevent-cli/command_dump.py tag.release: ifeq ($(shell echo ${version} | egrep "${tag_regex}"),) diff --git a/codecov-cli/MANIFEST.in b/codecov-cli/MANIFEST.in new file mode 100644 index 00000000..4f3a2eaa --- /dev/null +++ b/codecov-cli/MANIFEST.in @@ -0,0 +1,5 @@ +include requirements.txt + +recursive-include codecov_cli * +recursive-include tests * +recursive-include samples * From 4e18c983d3ff4d526c561b102d6a52b5b2453dd8 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:00:41 -0400 Subject: [PATCH 17/27] oops --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cd802de4..fed2fdc1 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ lint: make lint.run command_dump: - uv run --project prevent-cli prevent-cli/command_dump.py + cd prevent-cli && uv run command_dump.py tag.release: ifeq ($(shell echo ${version} | egrep "${tag_regex}"),) From ab49b7aa3ae61f9a4a534e4ccf310718fece0b6b Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:03:21 -0400 Subject: [PATCH 18/27] Fix workflow deps --- .github/workflows/release_flow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 68255d08..2cc583e4 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -175,7 +175,7 @@ jobs: publish_release: name: Publish release - needs: [buildassets, publish_to_pypi] + needs: [build_assets, build_assets_alpine_arm, publish_to_pypi] runs-on: ubuntu-latest permissions: contents: 'read' From fbeee23449377ccf1c8e71aa8e0178b9ef05f5a0 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:04:02 -0400 Subject: [PATCH 19/27] Again --- .github/workflows/release_flow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 2cc583e4..f1d07a12 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -175,7 +175,7 @@ jobs: publish_release: name: Publish release - needs: [build_assets, build_assets_alpine_arm, publish_to_pypi] + needs: [build_assets, build_assets_alpine_arm, build_and_publish_to_pypi] runs-on: ubuntu-latest permissions: contents: 'read' From 4532d7bd9c375952651995a23cd2a2c31a28c916 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:09:19 -0400 Subject: [PATCH 20/27] 3.12? --- .github/workflows/release_flow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index f1d07a12..2d593372 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -71,10 +71,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.13 + - name: Set up Python 3.12 uses: actions/setup-python@v3 with: - python-version: "3.13" + python-version: "3.12" - name: Install dependencies run: | From 1ede399143930ee4ff6cf04f4c0c59f40ad16a0d Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:10:54 -0400 Subject: [PATCH 21/27] fix name --- .github/workflows/release_flow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 2d593372..19ecf8c0 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -48,7 +48,7 @@ jobs: TARGET: macos CMD_BUILD: > uv run pyinstaller --target-arch universal2 -F codecov_cli/main.py && - mv dist/main dist/codecovcli_macos_x86_64 + mv dist/main dist/codecovcli_macos OUT_FILE_NAME: codecovcli_macos ASSET_MIME: application/octet-stream From 8d5ca08914bf0af27909704711d6cdb9efc235e4 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:20:04 -0400 Subject: [PATCH 22/27] remove pip-tools.toml --- .pip-tools.toml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .pip-tools.toml diff --git a/.pip-tools.toml b/.pip-tools.toml deleted file mode 100644 index 6b42ec0b..00000000 --- a/.pip-tools.toml +++ /dev/null @@ -1,3 +0,0 @@ -[tool.pip-tools] -all-build-deps = true -all-extras = true From 67cae656ea9bae8035647dde32f3a3b87dd41644 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Thu, 22 May 2025 13:20:46 -0400 Subject: [PATCH 23/27] Disable publish step --- .github/workflows/release_flow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 19ecf8c0..94081c02 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -175,6 +175,7 @@ jobs: publish_release: name: Publish release + if: false # todo change to true needs: [build_assets, build_assets_alpine_arm, build_and_publish_to_pypi] runs-on: ubuntu-latest permissions: From 66ed0947ac27554c280b46221b750f9e0215e5ba Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Mon, 26 May 2025 16:51:20 -0400 Subject: [PATCH 24/27] test again From 556baa998ec35b4c8ce51d21fea08615d0a139be Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 27 May 2025 09:18:46 -0400 Subject: [PATCH 25/27] Remove testing stuff from release_flow.yml --- .github/workflows/release_flow.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 94081c02..42dc1c62 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -4,7 +4,6 @@ on: release: types: - created - push: permissions: contents: read @@ -32,7 +31,6 @@ jobs: uv build - name: Publish package to PyPi - if: false #change to true uses: pypa/gh-action-pypi-publish@release/v1 with: verbose: true @@ -89,13 +87,11 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v4 - if: inputs.release == false with: name: ${{ matrix.OUT_FILE_NAME }} path: ./codecov-cli/dist/${{ matrix.OUT_FILE_NAME }} - name: Get auth token - if: inputs.release == true id: token uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 with: @@ -103,7 +99,6 @@ jobs: private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - name: Upload Release Asset - if: inputs.release == true id: upload-release-asset uses: svenstaro/upload-release-action@v2 with: @@ -149,13 +144,11 @@ jobs: - name: Upload a Build Artifact uses: actions/upload-artifact@v4 - if: false # todo change to true with: name: codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} path: ./codecov-cli/dist/codecovcli_${{ matrix.distro_name }}_${{ matrix.arch }} - name: Get auth token - if: false # todo change to true id: token uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 with: @@ -163,7 +156,6 @@ jobs: private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} - name: Upload Release Asset - if: false # todo change to true id: upload-release-asset uses: svenstaro/upload-release-action@v2 with: @@ -175,7 +167,6 @@ jobs: publish_release: name: Publish release - if: false # todo change to true needs: [build_assets, build_assets_alpine_arm, build_and_publish_to_pypi] runs-on: ubuntu-latest permissions: From 598984bc6950fb4b3cdd55cd842c8e6855f08ef3 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 27 May 2025 09:23:44 -0400 Subject: [PATCH 26/27] Add LICENSE to project root as well for GH visibility --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 38f23bc49cdadfa58ea4765ba35d439ac7014045 Mon Sep 17 00:00:00 2001 From: Spencer Murray Date: Tue, 27 May 2025 09:42:46 -0400 Subject: [PATCH 27/27] Make all mvs instead of mixed with cps --- .github/workflows/release_flow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_flow.yml b/.github/workflows/release_flow.yml index 42dc1c62..67fd29ff 100644 --- a/.github/workflows/release_flow.yml +++ b/.github/workflows/release_flow.yml @@ -54,7 +54,7 @@ jobs: TARGET: ubuntu CMD_BUILD: > uv run pyinstaller -F codecov_cli/main.py && - cp ./dist/main ./dist/codecovcli_linux + mv ./dist/main ./dist/codecovcli_linux OUT_FILE_NAME: codecovcli_linux ASSET_MIME: application/octet-stream @@ -62,7 +62,7 @@ jobs: TARGET: windows CMD_BUILD: > uv run pyinstaller -F codecov_cli\main.py && - Copy-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" + Move-Item -Path ".\dist\main.exe" -Destination ".\dist\codecovcli_windows.exe" OUT_FILE_NAME: codecovcli_windows.exe ASSET_MIME: application/vnd.microsoft.portable-executable