diff --git a/.cargo/config.toml b/.cargo/config.toml index d748b7e..31b4342 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -12,3 +12,9 @@ rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-self-contained=yes", ] + +[target.aarch64-unknown-linux-musl] +rustflags = [ + "-C", "target-feature=+crt-static", + "-C", "link-self-contained=yes", +] diff --git a/.copier-answers.yml b/.copier-answers.yml new file mode 100644 index 0000000..8b129e3 --- /dev/null +++ b/.copier-answers.yml @@ -0,0 +1,5 @@ +# Changes here will be overwritten by Copier +_commit: v1.6.1 +_src_path: https://github.com/DeveloperC286/template +project_name: conventional_commits_next_version +uses_git: true diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 351cef7..945c8ab 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,23 +4,18 @@ "config:best-practices" ], "automerge": true, - "dockerfile": { - "managerFilePatterns": [ - "/(^|/|\\.)Dockerfile$/", - "/(^|/)Dockerfile[^/]*$/" - ] + "github-actions": { + "enabled": false + }, + "nix": { + "enabled": true, + "lockFileMaintenance": { + "enabled": true, + "commitMessageAction": "update", + "commitMessageTopic": "Nix flake lock" + } }, "customManagers": [ - { - "customType": "regex", - "managerFilePatterns": [ - "/(^|/|\\.)Dockerfile$/", - "/(^|/)Dockerfile[^/]*$/" - ], - "matchStrings": [ - "# renovate: datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\s.+_VERSION=\"(?.*?)\"\\s" - ] - }, { "customType": "regex", "managerFilePatterns": [ @@ -36,18 +31,6 @@ "datasourceTemplate": "repology", "depNameTemplate": "alpine_{{alpineMajor}}_{{alpineMinor}}/{{name}}", "versioningTemplate": "loose" - }, - { - "customType": "regex", - "managerFilePatterns": [ - "/(^|/|\\.)Makefile$/", - "/(^|/)Makefile[^/]*$/" - ], - "matchStrings": [ - "# renovate: depName=(?.*?)\\s.+_VERSION=(?[a-z0-9.-]+)(?:@(?sha256:[a-f0-9]+))?" - ], - "datasourceTemplate": "docker", - "versioningTemplate": "docker" } ] } diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 17dabb5..139361e 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -12,39 +12,78 @@ permissions: jobs: publish-binary: name: Publish Binary - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Publish binary. - run: make publish-binary RELEASE="${GITHUB_REF_NAME}" + run: nix develop -c make publish-binary RELEASE="${GITHUB_REF_NAME}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by GitHub Actions. publish-crate: name: Publish Crate - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Publish crate. - run: make publish-crate + run: nix develop -c make publish-crate env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - publish-docker: - name: Publish Docker Image - runs-on: ubuntu-latest + publish-docker-image: + name: Publish Docker Image (${{ matrix.platform }}) + runs-on: ${{ matrix.runner }} + needs: [publish-binary] + strategy: + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-24.04 + target: x86_64-unknown-linux-musl + suffix: amd64 + - platform: linux/arm64 + runner: ubuntu-24.04-arm + target: aarch64-unknown-linux-musl + suffix: arm64 steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3 + uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 - name: Login to GitHub Container Registry - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Publish Docker Image - run: make publish-docker RELEASE="${GITHUB_REF_NAME}" + run: make publish-docker-image RELEASE="${GITHUB_REF_NAME}" PLATFORM="${{ matrix.platform }}" TARGET="${{ matrix.target }}" SUFFIX="${{ matrix.suffix }}" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-docker-manifest: + name: Publish Docker Manifest + runs-on: ubuntu-24.04 + needs: [publish-docker-image] + steps: + - name: Checkout code. + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 + - name: Login to GitHub Container Registry + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Publish Docker Manifest + run: make publish-docker-manifest RELEASE="${GITHUB_REF_NAME}" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3b56cc7..73b4fb6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -8,47 +8,84 @@ permissions: jobs: formatting: name: Formatting - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} strategy: matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] language: [rust, shell, python] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Check formatting. - run: make check-${{ matrix.language }}-formatting + run: nix develop -c make check-${{ matrix.language }}-formatting + linting: name: Linting - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} strategy: matrix: - language: [rust] + architecture: [ubuntu-24.04, ubuntu-24.04-arm] + language: [rust, shell] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Check linting. - run: make check-${{ matrix.language }}-linting + run: nix develop -c make check-${{ matrix.language }}-linting + + scripts-permissions: + name: Scripts Permissions + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] + steps: + - name: Checkout code. + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Check scripts permissions. + run: make check-scripts-permissions + compile: name: Compile - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Compile. - run: make compile + run: nix develop -c make compile + unit-test: name: Unit Test - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Unit test. - run: make unit-test + run: nix develop -c make unit-test + end-to-end-test: name: End to End Test - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: End to End test. - run: make end-to-end-test + run: nix develop -c make end-to-end-test diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml index 158f6f7..56eb9a6 100644 --- a/.github/workflows/conventional-commits.yml +++ b/.github/workflows/conventional-commits.yml @@ -8,7 +8,9 @@ permissions: jobs: linting: name: Linting - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + container: + image: ghcr.io/developerc286/conventional_commits_linter:0.17.0@sha256:d6fb0dfd79c2e06897692bc3f0dc62bcb7ce90a92030c81a3137935516d525d7 steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -16,4 +18,4 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Check Conventional Commits linting. - run: make check-conventional-commits-linting FROM="origin/${{ github.base_ref }}" + run: conventional_commits_linter --type angular "origin/${{ github.base_ref }}" diff --git a/.github/workflows/dogfood.yml b/.github/workflows/dogfood.yml index c1ed58f..707f9ae 100644 --- a/.github/workflows/dogfood.yml +++ b/.github/workflows/dogfood.yml @@ -8,12 +8,17 @@ permissions: jobs: docker: name: Docker - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - - name: Dogfooding Docker - run: make dogfood-docker FROM="origin/${{ github.base_ref }}" + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 + - name: Dogfooding Docker. + run: nix develop -c make dogfood-docker FROM="origin/${{ github.base_ref }}" diff --git a/.github/workflows/git-history.yml b/.github/workflows/git-history.yml index 2745514..476fc11 100644 --- a/.github/workflows/git-history.yml +++ b/.github/workflows/git-history.yml @@ -8,7 +8,9 @@ permissions: jobs: clean: name: Clean - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + container: + image: ghcr.io/developerc286/clean_git_history:1.1.5@sha256:b1374591d48393f6b5fcc888f6bc7da05f7d218961f7850112130b1cad78186a steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -16,4 +18,4 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Check clean Git history. - run: make check-clean-git-history FROM="origin/${{ github.base_ref }}" + run: clean_git_history "origin/${{ github.base_ref }}" diff --git a/.github/workflows/github-actions-workflows.yml b/.github/workflows/github-actions-workflows.yml index 8553364..31d7778 100644 --- a/.github/workflows/github-actions-workflows.yml +++ b/.github/workflows/github-actions-workflows.yml @@ -6,19 +6,30 @@ permissions: contents: read jobs: - linting: - name: Linting - runs-on: ubuntu-latest - steps: - - name: Checkout code. - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - name: Check GitHub Actions workflows linting. - run: make check-github-actions-workflows-linting formatting: name: Formatting - runs-on: ubuntu-latest + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] steps: - name: Checkout code. uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Check formatting. - run: make check-yaml-formatting + run: nix develop -c make check-yaml-formatting + + linting: + name: Linting + runs-on: ${{ matrix.architecture }} + strategy: + matrix: + architecture: [ubuntu-24.04, ubuntu-24.04-arm] + steps: + - name: Checkout code. + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Setup Nix. + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 + - name: Check GitHub Actions workflows linting. + run: nix develop -c make check-github-actions-workflows-linting diff --git a/.github/workflows/mirroring.yml b/.github/workflows/mirroring.yml index 8654b8f..b816fa2 100644 --- a/.github/workflows/mirroring.yml +++ b/.github/workflows/mirroring.yml @@ -9,8 +9,9 @@ concurrency: group: ${{ github.workflow }} jobs: - GitLab: - runs-on: ubuntu-latest + gitlab: + name: GitLab + runs-on: ubuntu-24.04 steps: - name: Checkout code. run: git clone --mirror "https://github.com/${GITHUB_REPOSITORY}.git" "${GITHUB_WORKSPACE}" diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index b183a88..29397dd 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -12,7 +12,7 @@ permissions: jobs: release-please: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 with: diff --git a/.gitignore b/.gitignore index 093d8bd..97a06e3 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ proptest-regressions/ # Generated by IntelliJ IDEA .idea/ + +# Generated by direnv & Nix. +.direnv/ diff --git a/Cargo.lock b/Cargo.lock index 774c0e5..828bde1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 4 [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -28,35 +28,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ "windows-sys", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", + "once_cell_polyfill", "windows-sys", ] @@ -66,33 +67,29 @@ version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - [[package]] name = "bitflags" -version = "2.4.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "cc" -version = "1.0.83" +version = "1.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" dependencies = [ + "find-msvc-tools", "jobserver", "libc", + "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "clap" @@ -130,15 +127,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "conventional_commits_next_version" @@ -170,9 +167,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -183,25 +180,21 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] -name = "errno" -version = "0.3.7" +name = "find-msvc-tools" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" -dependencies = [ - "libc", - "windows-sys", -] +checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -249,6 +242,18 @@ dependencies = [ "slab", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", +] + [[package]] name = "git2" version = "0.20.3" @@ -264,15 +269,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "heck" @@ -282,33 +287,34 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "humantime" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -317,104 +323,66 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", + "icu_locale_core", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -423,9 +391,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -433,9 +401,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.6.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", "hashbrown", @@ -443,27 +411,28 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.9" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi", - "rustix", + "libc", "windows-sys", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ + "getrandom", "libc", ] @@ -475,9 +444,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.179" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "c5a2d376baa530d1238d133232d15e239abad80d05838b4b59354e5268af431f" [[package]] name = "libgit2-sys" @@ -493,9 +462,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.12" +version = "1.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" +checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" dependencies = [ "cc", "libc", @@ -503,17 +472,11 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linux-raw-sys" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" - [[package]] name = "litemap" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "log" @@ -523,21 +486,27 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -547,9 +516,18 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] [[package]] name = "pretty_env_logger" @@ -563,31 +541,37 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "regex" version = "1.12.2" @@ -602,9 +586,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722166aa0d7438abbaa4d5cc2c649dac844e8c56d82fb3d33e9c34b5cd268fc6" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -613,9 +597,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "relative-path" @@ -661,19 +645,6 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.38.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "semver" version = "1.0.27" @@ -682,44 +653,57 @@ checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "stable_deref_trait" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "strsim" @@ -747,9 +731,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "678faa00651c9eb72dd2020cbdf275d92eccb2400d568e419efdd64838145cb4" dependencies = [ "proc-macro2", "quote", @@ -758,9 +742,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", @@ -769,18 +753,18 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "tinystr" -version = "0.7.6" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -788,44 +772,52 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ "indexmap", "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +dependencies = [ "winnow", ] [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -834,9 +826,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vcpkg" @@ -845,130 +837,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "winapi" -version = "0.3.9" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "wit-bindgen", ] -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "winapi", + "windows-sys", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows-link", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "winnow" -version = "0.6.20" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] [[package]] -name = "write16" -version = "1.0.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -976,9 +903,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", @@ -1007,11 +934,22 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + [[package]] name = "zerovec" -version = "0.10.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -1020,9 +958,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", diff --git a/Dockerfile b/Dockerfile index b365cf4..9c148fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ -FROM alpine:3.22.2@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 +FROM alpine:3.23.2@sha256:865b95f46d98cf867a156fe4a135ad3fe50d2056aa3f25ed31662dff6da4eb62 RUN apk add --no-cache \ - git=2.49.1-r0 + git=2.52.0-r0 && \ + git config --system --add safe.directory '*' -COPY ./target/x86_64-unknown-linux-musl/release/conventional_commits_next_version /usr/local/bin/ +ARG TARGET +COPY ./target/${TARGET}/release/conventional_commits_next_version /usr/local/bin/ WORKDIR /workspace diff --git a/Makefile b/Makefile index 3fb736f..9792a52 100644 --- a/Makefile +++ b/Makefile @@ -1,115 +1,99 @@ -DOCKER_RUN_OPTS := --rm -v $(PWD):/workspace -w /workspace +# Auto-detect musl target for static binaries (Linux only) +MUSL_TARGET := $(shell uname -m | sed 's/^x86_64$$/x86_64-unknown-linux-musl/;s/^aarch64$$/aarch64-unknown-linux-musl/') +ifeq ($(filter %unknown-linux-musl,$(MUSL_TARGET)),) + $(error Unsupported architecture: $(shell uname -m). Static musl builds only supported on Linux x86_64 and aarch64) +endif -UID := $(shell id -u) -GID := $(shell id -g) -DOCKER_RUN_WRITE_OPTS := $(DOCKER_RUN_OPTS) -u $(UID):$(GID) +# Use --locked in CI to ensure reproducible builds +CARGO_LOCKED := $(if $(CI),--locked,) .PHONY: default default: compile -# renovate: depName=ghcr.io/developerc286/clean_git_history -CLEAN_GIT_HISTORY_VERSION=1.1.5@sha256:b1374591d48393f6b5fcc888f6bc7da05f7d218961f7850112130b1cad78186a - -.PHONY: check-clean-git-history -check-clean-git-history: - docker run $(DOCKER_RUN_WRITE_OPTS) ghcr.io/developerc286/clean_git_history:$(CLEAN_GIT_HISTORY_VERSION) $(FROM) - -# renovate: depName=ghcr.io/developerc286/conventional_commits_linter -CONVENTIONAL_COMMITS_LINTER_VERSION=0.17.0@sha256:d6fb0dfd79c2e06897692bc3f0dc62bcb7ce90a92030c81a3137935516d525d7 - -.PHONY: check-conventional-commits-linting -check-conventional-commits-linting: - docker run $(DOCKER_RUN_WRITE_OPTS) ghcr.io/developerc286/conventional_commits_linter:$(CONVENTIONAL_COMMITS_LINTER_VERSION) --type angular $(FROM) - .PHONY: check-rust-formatting check-rust-formatting: - docker build -t check-rust-formatting -f ci/check-rust-formatting.Dockerfile . - docker run $(DOCKER_RUN_OPTS) check-rust-formatting - -# renovate: depName=mvdan/shfmt -SHFMT_VERSION=v3.12.0-alpine@sha256:204a4d2d876123342ad394bd9a28fb91e165abc03868790d4b39cfa73233f150 + cargo fmt --all -- --check --config=group_imports=StdExternalCrate .PHONY: check-shell-formatting check-shell-formatting: - docker run $(DOCKER_RUN_OPTS) mvdan/shfmt:$(SHFMT_VERSION) --simplify --diff ci/* + shfmt --simplify --diff ci/* .PHONY: check-python-formatting check-python-formatting: - docker build -t check-python-formatting -f ci/check-python-formatting.Dockerfile . - docker run $(DOCKER_RUN_OPTS) check-python-formatting - -# renovate: depName=ghcr.io/google/yamlfmt -YAMLFMT_VERSION=0.20.0@sha256:cd11483ba1119371593a7d55386d082da518e27dd932ee00db32e5fb6f3a58c0 + autopep8 --exit-code --diff --aggressive --aggressive --max-line-length 120 --recursive end-to-end-tests/ .PHONY: check-yaml-formatting check-yaml-formatting: - docker run $(DOCKER_RUN_OPTS) ghcr.io/google/yamlfmt:$(YAMLFMT_VERSION) -verbose -lint -dstar .github/workflows/* + yamlfmt -verbose -lint -dstar .github/workflows/* .PHONY: fix-rust-formatting fix-rust-formatting: - docker build -t fix-rust-formatting -f ci/fix-rust-formatting.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) fix-rust-formatting + cargo fmt --all -- --config=group_imports=StdExternalCrate .PHONY: fix-shell-formatting fix-shell-formatting: - docker run $(DOCKER_RUN_WRITE_OPTS) mvdan/shfmt:$(SHFMT_VERSION) --simplify --write ci/* + shfmt --simplify --write ci/* .PHONY: fix-python-formatting fix-python-formatting: - docker build -t fix-python-formatting -f ci/fix-python-formatting.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) fix-python-formatting + autopep8 --in-place --aggressive --aggressive --max-line-length 120 --recursive end-to-end-tests/ .PHONY: fix-yaml-formatting fix-yaml-formatting: - docker run $(DOCKER_RUN_WRITE_OPTS) ghcr.io/google/yamlfmt:$(YAMLFMT_VERSION) -verbose -dstar .github/workflows/* + yamlfmt -verbose -dstar .github/workflows/* .PHONY: check-rust-linting check-rust-linting: - docker build -t check-rust-linting -f ci/check-rust-linting.Dockerfile . - docker run $(DOCKER_RUN_OPTS) check-rust-linting + cargo clippy --verbose $(CARGO_LOCKED) -- -D warnings -# renovate: depName=rhysd/actionlint -ACTIONLINT_VERSION=1.7.10@sha256:ef8299f97635c4c30e2298f48f30763ab782a4ad2c95b744649439a039421e36 +.PHONY: check-shell-linting +check-shell-linting: + shellcheck ci/*.sh .PHONY: check-github-actions-workflows-linting check-github-actions-workflows-linting: - docker run $(DOCKER_RUN_WRITE_OPTS) rhysd/actionlint:$(ACTIONLINT_VERSION) -verbose -color + actionlint -verbose -color + +.PHONY: check-scripts-permissions +check-scripts-permissions: + ./ci/check-scripts-permissions.sh .PHONY: compile compile: - docker build -t compile -f ci/compile.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) compile + cargo build --verbose $(CARGO_LOCKED) .PHONY: unit-test unit-test: - docker build -t unit-test -f ci/unit-test.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) unit-test + cargo test --verbose $(CARGO_LOCKED) .PHONY: end-to-end-test end-to-end-test: compile - docker build -t end-to-end-test -f ci/end-to-end-test.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) -w /workspace/end-to-end-tests end-to-end-test + cd end-to-end-tests/ && behave .PHONY: release release: - docker build -t compile -f ci/compile.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) compile --release + cargo build --release --target=$(MUSL_TARGET) --locked --verbose .PHONY: publish-binary publish-binary: release - docker build -t publish-binary -f ci/publish-binary.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) -e GH_TOKEN publish-binary $(RELEASE) + ./ci/publish-binary.sh ${RELEASE} $(MUSL_TARGET) .PHONY: publish-crate publish-crate: - docker build -t publish-crate -f ci/publish-crate.Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) -e CARGO_REGISTRY_TOKEN publish-crate + cargo publish --verbose + +# Emulate GitHub Actions CI environment for testing +GITHUB_ACTIONS_ENV := --env HOME=/github/home --env GITHUB_ACTIONS=true --env CI=true .PHONY: dogfood-docker dogfood-docker: release - docker build -t conventional_commits_next_version -f Dockerfile . - docker run $(DOCKER_RUN_WRITE_OPTS) conventional_commits_next_version --from-version v1.0.0 $(FROM) + docker build --build-arg TARGET=$(MUSL_TARGET) --tag conventional_commits_next_version --file Dockerfile . + docker run --rm --volume $(PWD):/workspace --workdir /workspace $(GITHUB_ACTIONS_ENV) conventional_commits_next_version --verbose --from-version v1.0.0 $(FROM) + +.PHONY: publish-docker-image +publish-docker-image: + ./ci/publish-docker-image.sh ${RELEASE} ${PLATFORM} ${TARGET} ${SUFFIX} -.PHONY: publish-docker -publish-docker: release - ./ci/publish-docker.sh ${RELEASE} +.PHONY: publish-docker-manifest +publish-docker-manifest: + ./ci/publish-docker-manifest.sh ${RELEASE} diff --git a/ci/check-python-formatting.Dockerfile b/ci/check-python-formatting.Dockerfile deleted file mode 100644 index 7e9779d..0000000 --- a/ci/check-python-formatting.Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM python:3.14.1-alpine3.21@sha256:fd8407cacb1028c803566276ae25eb7c2a00fbaa210a0a5670994f6866e29278 -RUN apk add --no-cache \ - py3-autopep8=2.1.0-r1 - -ENTRYPOINT ["autopep8", "--exit-code", "--diff", "--aggressive", "--aggressive", "--max-line-length", "120", "--recursive"] -CMD ["."] diff --git a/ci/check-rust-formatting.Dockerfile b/ci/check-rust-formatting.Dockerfile deleted file mode 100644 index 1d285ca..0000000 --- a/ci/check-rust-formatting.Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM rust:1.92.0-alpine3.21@sha256:82e772a24cfceaea095cc3f36b7bdeab048fc4f1164e0948939ee7a3f070ddbb -RUN rustup component add rustfmt - -ENTRYPOINT ["cargo", "fmt", "--all", "--", "--check", "--config=group_imports=StdExternalCrate"] diff --git a/ci/check-rust-linting.Dockerfile b/ci/check-rust-linting.Dockerfile deleted file mode 100644 index 040c7e6..0000000 --- a/ci/check-rust-linting.Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM rust:1.92.0-alpine3.21@sha256:82e772a24cfceaea095cc3f36b7bdeab048fc4f1164e0948939ee7a3f070ddbb -RUN apk add --no-cache \ - musl-dev=1.2.5-r9 -RUN rustup component add clippy - -ENTRYPOINT ["cargo", "clippy", "--verbose", "--target=x86_64-unknown-linux-musl", "--locked", "--", "-D", "warnings"] diff --git a/ci/check-scripts-permissions.sh b/ci/check-scripts-permissions.sh new file mode 100755 index 0000000..67821de --- /dev/null +++ b/ci/check-scripts-permissions.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +set -o errexit +set -o xtrace + +exit_code=0 +for script in ci/*.sh; do + if [ -f "$script" ] && [ ! -x "$script" ]; then + exit_code=1 + fi +done + +exit $exit_code diff --git a/ci/compile.Dockerfile b/ci/compile.Dockerfile deleted file mode 100644 index 1357901..0000000 --- a/ci/compile.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM rust:1.92.0-alpine3.21@sha256:82e772a24cfceaea095cc3f36b7bdeab048fc4f1164e0948939ee7a3f070ddbb -RUN apk add --no-cache \ - musl-dev=1.2.5-r9 - -ENTRYPOINT ["cargo", "build", "--target=x86_64-unknown-linux-musl", "--locked"] diff --git a/ci/end-to-end-test.Dockerfile b/ci/end-to-end-test.Dockerfile deleted file mode 100644 index bbdf4aa..0000000 --- a/ci/end-to-end-test.Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM python:3.14.1-alpine3.21@sha256:fd8407cacb1028c803566276ae25eb7c2a00fbaa210a0a5670994f6866e29278 -RUN apk add --no-cache \ - git=2.47.3-r0 - -COPY end-to-end-tests/requirements.txt ./ -RUN pip3 install -r requirements.txt - -ENTRYPOINT ["behave"] diff --git a/ci/fix-python-formatting.Dockerfile b/ci/fix-python-formatting.Dockerfile deleted file mode 100644 index 37c5594..0000000 --- a/ci/fix-python-formatting.Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM python:3.14.1-alpine3.21@sha256:fd8407cacb1028c803566276ae25eb7c2a00fbaa210a0a5670994f6866e29278 -RUN apk add --no-cache \ - py3-autopep8=2.1.0-r1 - -ENTRYPOINT ["autopep8", "--in-place", "--aggressive", "--aggressive", "--max-line-length", "120", "--recursive"] -CMD ["."] diff --git a/ci/fix-rust-formatting.Dockerfile b/ci/fix-rust-formatting.Dockerfile deleted file mode 100644 index 0125465..0000000 --- a/ci/fix-rust-formatting.Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM rust:1.92.0-alpine3.21@sha256:82e772a24cfceaea095cc3f36b7bdeab048fc4f1164e0948939ee7a3f070ddbb -RUN rustup component add rustfmt - -ENTRYPOINT ["cargo", "fmt", "--all", "--", "--config=group_imports=StdExternalCrate"] diff --git a/ci/publish-binary.Dockerfile b/ci/publish-binary.Dockerfile deleted file mode 100644 index 033b06d..0000000 --- a/ci/publish-binary.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412 -RUN apk add --no-cache \ - github-cli=2.72.0-r5 - -ENTRYPOINT ["/workspace/ci/publish-binary.sh"] diff --git a/ci/publish-binary.sh b/ci/publish-binary.sh index 11724f6..62ef111 100755 --- a/ci/publish-binary.sh +++ b/ci/publish-binary.sh @@ -3,15 +3,15 @@ set -o errexit set -o xtrace -if [ "$#" -ne 1 ]; then - echo "Usage: $0 RELEASE_TAG" +if [ "$#" -ne 2 ]; then + echo "Usage: $0 RELEASE_TAG TARGET" echo "$#" exit 1 fi RELEASE="$1" +TARGET="$2" -target="x86_64-unknown-linux-musl" -tar -czvf "${target}.tar.gz" -C "target/${target}/release" "conventional_commits_next_version" -gh release upload "${RELEASE}" "${target}.tar.gz" -rm "${target}.tar.gz" +tar -czvf "${TARGET}.tar.gz" -C "target/${TARGET}/release" "conventional_commits_next_version" +gh release upload "${RELEASE}" "${TARGET}.tar.gz" +rm "${TARGET}.tar.gz" diff --git a/ci/publish-crate.Dockerfile b/ci/publish-crate.Dockerfile deleted file mode 100644 index 031f4d6..0000000 --- a/ci/publish-crate.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM rust:1.92.0-alpine3.21@sha256:82e772a24cfceaea095cc3f36b7bdeab048fc4f1164e0948939ee7a3f070ddbb -RUN apk add --no-cache \ - musl-dev=1.2.5-r9 - -ENTRYPOINT ["cargo", "publish", "--verbose", "--target=x86_64-unknown-linux-musl", "--locked"] diff --git a/ci/publish-docker-image.sh b/ci/publish-docker-image.sh new file mode 100755 index 0000000..a078c21 --- /dev/null +++ b/ci/publish-docker-image.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env sh + +set -o errexit +set -o xtrace + +if [ $# -ne 4 ]; then + echo "Usage: $0 " + exit 1 +fi + +RELEASE="$1" +PLATFORM="$2" +TARGET="$3" +SUFFIX="$4" + +REPOSITORY="$(basename "$(git rev-parse --show-toplevel)")" +IMAGE="ghcr.io/developerc286/${REPOSITORY}" + +# Download and extract pre-built binary from the GitHub release for this architecture. +gh release download "${RELEASE}" --pattern "${TARGET}.tar.gz" +mkdir -p "target/${TARGET}/release" +tar -xzf "${TARGET}.tar.gz" -C "target/${TARGET}/release" + +# Build and push the Docker image for this architecture natively (no QEMU emulation). +docker buildx build --platform "${PLATFORM}" --build-arg TARGET="${TARGET}" --tag "${IMAGE}:${RELEASE}-${SUFFIX}" --file Dockerfile . --push diff --git a/ci/publish-docker-manifest.sh b/ci/publish-docker-manifest.sh new file mode 100755 index 0000000..7c203c5 --- /dev/null +++ b/ci/publish-docker-manifest.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env sh + +set -o errexit +set -o xtrace + +if [ $# -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +RELEASE="$1" +REPOSITORY="$(basename "$(git rev-parse --show-toplevel)")" +IMAGE="ghcr.io/developerc286/${REPOSITORY}" + +# Create and push the multi-architecture manifest. +docker buildx imagetools create --tag "${IMAGE}:${RELEASE}" \ + "${IMAGE}:${RELEASE}-amd64" \ + "${IMAGE}:${RELEASE}-arm64" + +# Create alternate version tag (with/without 'v' prefix). +if [ "${RELEASE#v}" != "${RELEASE}" ]; then + # Release has 'v' prefix (v1.2.3), also create version without 'v' prefix (1.2.3). + docker buildx imagetools create --tag "${IMAGE}:${RELEASE#v}" "${IMAGE}:${RELEASE}" +else + # Release has no 'v' prefix (1.2.3), also create version with 'v' prefix (v1.2.3). + docker buildx imagetools create --tag "${IMAGE}:v${RELEASE}" "${IMAGE}:${RELEASE}" +fi diff --git a/ci/publish-docker.sh b/ci/publish-docker.sh deleted file mode 100755 index 4170a69..0000000 --- a/ci/publish-docker.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env sh - -set -o errexit -set -o xtrace - -if [ $# -eq 0 ]; then - echo "Usage: $0 " - exit 1 -fi - -RELEASE="$1" -REPOSITORY="$(basename $(git rev-parse --show-toplevel))" -IMAGE="ghcr.io/developerc286/${REPOSITORY}" - -docker build --tag "${IMAGE}:${RELEASE}" --file Dockerfile . -docker push "${IMAGE}:${RELEASE}" - -if [ "${RELEASE#v}" != "${RELEASE}" ]; then - docker tag "${IMAGE}:${RELEASE}" "${IMAGE}:${RELEASE#v}" - docker push "${IMAGE}:${RELEASE#v}" -fi diff --git a/ci/unit-test.Dockerfile b/ci/unit-test.Dockerfile deleted file mode 100644 index 52d752b..0000000 --- a/ci/unit-test.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM rust:1.92.0-alpine3.21@sha256:82e772a24cfceaea095cc3f36b7bdeab048fc4f1164e0948939ee7a3f070ddbb -RUN apk add --no-cache \ - musl-dev=1.2.5-r9 - -ENTRYPOINT ["cargo", "test", "--verbose", "--target=x86_64-unknown-linux-musl", "--locked"] diff --git a/end-to-end-tests/autopep8.requirements.txt b/end-to-end-tests/autopep8.requirements.txt deleted file mode 100644 index 42d48a9..0000000 --- a/end-to-end-tests/autopep8.requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -autopep8==2.0.4 -pycodestyle==2.11.0 diff --git a/end-to-end-tests/features/steps/given.py b/end-to-end-tests/features/steps/given.py index 4698fc1..054a26c 100644 --- a/end-to-end-tests/features/steps/given.py +++ b/end-to-end-tests/features/steps/given.py @@ -18,7 +18,7 @@ def reset_context(context): context.remote_repository_cache = os.getcwd() context.pre_command = "" - context.conventional_commits_next_version_path = f"{context.behave_directory}/../target/x86_64-unknown-linux-musl/debug/conventional_commits_next_version" # fmt: off + context.conventional_commits_next_version_path = f"{context.behave_directory}/../target/debug/conventional_commits_next_version" # fmt: off reset_arguments(context) if "GIT_DIR" in os.environ: diff --git a/end-to-end-tests/requirements.txt b/end-to-end-tests/requirements.txt deleted file mode 100644 index b4d5f8d..0000000 --- a/end-to-end-tests/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -behave==1.3.3 -parse==1.20.2 -parse-type==0.6.6 -six==1.17.0 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c8db83a --- /dev/null +++ b/flake.lock @@ -0,0 +1,82 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1767364772, + "narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "16c7794d0a28b5a37904d55bcca36003b9109aaa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767408057, + "narHash": "sha256-0TD2PNTt6olOonFgcvZJcNGiU3x5cX+RMzrfWfHB9Jw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "294198315a13d6d130565ad08e97685df7b0d458", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9fcad95 --- /dev/null +++ b/flake.nix @@ -0,0 +1,60 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, rust-overlay, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + + # Architecture-specific target + rustTarget = if pkgs.stdenv.isAarch64 + then "aarch64-unknown-linux-musl" + else "x86_64-unknown-linux-musl"; + + rustWithTargets = pkgs.rust-bin.stable.latest.default.override { + targets = [ rustTarget ]; + }; + in + { + devShells.default = pkgs.mkShell { + # Disable all Nix hardening flags to prevent interference with Cargo builds. + # These flags are designed for C/C++ and can cause issues with: + # - MUSL builds (fortify adds glibc-specific functions) + # - Crates that vendor C libraries (e.g., git2 vendoring libgit2) + # Rust already provides memory safety, so these hardening flags provide + # minimal benefit while causing build problems. + hardeningDisable = [ "all" ]; + + buildInputs = [ + # Rust with cross-compilation targets built-in. + rustWithTargets + # Shell scripts. + pkgs.shfmt + pkgs.shellcheck + # GitHub Action Workflows. + pkgs.yamlfmt + pkgs.actionlint + # End to end tests. + pkgs.python313 + pkgs.python313Packages.autopep8 + pkgs.python313Packages.behave + pkgs.git + # Deploying. + pkgs.gh + ]; + }; + } + ); +}