Compare commits

...

7 Commits

Author SHA1 Message Date
Taiki Endo
76a1fec160 Release 2.47.31 2025-01-30 14:14:31 +09:00
Taiki Endo
78b9ec82a6 Update changelog 2025-01-30 14:14:11 +09:00
Taiki Endo
be22d29d34 Fix clippy::unnecessary_semicolon warning
```
error: unnecessary semicolon
   --> tools/codegen/src/main.rs:251:10
    |
251 |         };
    |          ^ help: remove
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_semicolon
    = note: `-D clippy::unnecessary-semicolon` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unnecessary_semicolon)]`
```
2025-01-30 14:03:36 +09:00
Taiki Endo
e466aa8e34 Update wash manifest 2025-01-30 06:14:20 +09:00
Taiki Endo
afbe5c1715 Release 2.47.30 2025-01-29 08:24:34 +09:00
Taiki Endo
6fde044d27 codegen: Address cargo-cyclonedx 0.5.1 asset change 2025-01-29 08:18:24 +09:00
Taiki Endo
544f616845 ci: Remove not triggered manifest_sync workflow 2025-01-29 08:17:10 +09:00
9 changed files with 270 additions and 106 deletions

View File

@@ -1,51 +0,0 @@
name: Manifest Synchronization
permissions:
contents: read
on:
release:
types: [published]
env:
WORKSPACE: /tmp/workspace
defaults:
run:
shell: bash --noprofile --norc -CeEuxo pipefail {0}
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Checkout manifest-schema branch
run: ./tools/ci/checkout-manifest-schema-branch.sh "${WORKSPACE}"
- name: Copy over schema
run: cp -- ./manifests/* "${WORKSPACE}"
- name: Stage changes
working-directory: ${{ env.WORKSPACE }}
run: git add .
- name: Show diff
working-directory: ${{ env.WORKSPACE }}
run: git diff HEAD
- name: Detect changes
id: changes
working-directory: ${{ env.WORKSPACE }}
run: |
# This output boolean tells us if the dependencies have actually changed
printf "count=%s\n" "$(git status --porcelain=v1 | wc -l)" >>"${GITHUB_OUTPUT}"
- name: Commit and push
# Only push if changes exist
if: steps.changes.outputs.count > 0
working-directory: ${{ env.WORKSPACE }}
run: |
git commit -m "Update manifest schema" && git push origin HEAD

View File

@@ -10,6 +10,18 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.47.31] - 2025-01-30
- Fix checksum error with `wash@0.38.0` on macOS. (They rebuilt binaries for some reason.)
## [2.47.30] - 2025-01-28
- Support `cargo-cyclonedx` on x86_64 Linux (musl).
- Support installing native binary for `cargo-cyclonedx` on AArch64 macOS. (Previously x86_64 macOS binary is used as fallback.)
- Update `cargo-cyclonedx@latest` to 0.5.7.
## [2.47.29] - 2025-01-28
- Support `cargo-semver-checks` on AArch64 Linux.
@@ -3422,7 +3434,9 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.47.29...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.47.31...HEAD
[2.47.31]: https://github.com/taiki-e/install-action/compare/v2.47.30...v2.47.31
[2.47.30]: https://github.com/taiki-e/install-action/compare/v2.47.29...v2.47.30
[2.47.29]: https://github.com/taiki-e/install-action/compare/v2.47.28...v2.47.29
[2.47.28]: https://github.com/taiki-e/install-action/compare/v2.47.27...v2.47.28
[2.47.27]: https://github.com/taiki-e/install-action/compare/v2.47.26...v2.47.27

View File

@@ -1,33 +1,208 @@
{
"rust_crate": "cargo-cyclonedx",
"template": {
"x86_64_linux_gnu": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-linux-amd64.tar.gz"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-Darwin-x86_64.tar.gz"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-${version}/cargo-cyclonedx-Win-x86_64.zip"
}
},
"template": null,
"license_markdown": "[Apache-2.0](https://github.com/CycloneDX/cyclonedx-rust-cargo/blob/main/LICENSE)",
"latest": {
"version": "0.5.0"
"version": "0.5.7"
},
"0.5": {
"version": "0.5.0"
"version": "0.5.7"
},
"0.5.7": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.7/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DD10E0A0B0BBB1",
"checksum": "8ffbc91fa29b82f0b0438939a0421a164a0297b5387208f6170c793bdd22a4c9",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.7/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DD10E0A03AD770",
"checksum": "f96401f427ec096162493f85ecf67d907ff2fc845d14de3e8fbf62660858afab",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.7/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DD10E0A0B6CF5E",
"checksum": "f9f39802660c25fa2a841ca098158462b36e59567ed3ea07a57b23bed63f6474",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.7/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DD10E0A0395289",
"checksum": "39ae80025f67a98974b4bd9e072ea09d42d3e11d05ef1375e6ff6b8345cf3cfe",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.6": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.6/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DCFF38D5B5ABE0",
"checksum": "2238e1be087623eb139fa03896271612f9bb5d0fe3c67bdc5bcdccae078d53a4",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.6/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DCFF38D55CA58A",
"checksum": "66d5b8550ccdc07161fa2052e64e63710717978a32ceefe3c780e17b9817d686",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.6/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DCFF38D5A5916F",
"checksum": "bdd6048a476edaa59e15902ff277f906f28ab74267b44b02b6019242e1ad7f50",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.6/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DCFF38D561F6C1",
"checksum": "77d1d014e9ef6a9b0e9481b80c35f4d22bf446ddabfbbc9ebd2e17b4167343f1",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.5": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.5/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DCB605BF2376BB",
"checksum": "e0a872a5a8e32b9621334636e9da444d70527fb138aa75380e0dc20db8b0714b",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.5/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DCB605BECCDE9E",
"checksum": "98beb669323396428b5c6c7003adc4235207442c7b025743366ee98759b2c3a6",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.5/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DCB605BF0BEA8D",
"checksum": "7b4507cb8fb260df35bed0ad59f675d569f9bde3423228e8b44c7c378876a410",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.5/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DCB605BEC91251",
"checksum": "c296b0821c02ad13cbea6a7173ba6c37fa777acc7d066c5ff8570a600aeb62a7",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.4": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.4/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DCA65134CEC9A1",
"checksum": "8a499153bf20c2e6c180b21404f0a0c8b229f4c254c4b5d1623ae15d130afe49",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.4/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DCA651345F6E35",
"checksum": "a88e604e696f806559b5a3ade35dccfe0baee885b4e5ad0ef34e280d7073c1c7",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.4/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DCA65134B6A1E2",
"checksum": "6f42f40bb0a7dd86337cdd3f9dc698167b601b077eaf199161a4e38d209f003a",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.4/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DCA65134508ADB",
"checksum": "e8751fb79e8dd33286e85acd3ac34af9ecc7a36e634c35720ed3b302b2a936b0",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.3": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.3/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DC84D1C05C733F",
"checksum": "d303058cfdd5151da7645cc642f0d64e9b4e6ce90cfb8e4955329c58c887114b",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.3/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DC84D1C1F0DBBC",
"checksum": "e7e19ae5d6f938912c87ea57e27d1549197c4f30ea9e5814ee7dc46d3004a945",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.3/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DC84D1C1809711",
"checksum": "abc9408ea8239f6a35be92c1ca34d759a12e6e2b804191fbd39e515450c7a104",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.3/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DC84D1C2D24E48",
"checksum": "7e3ebf1d9074d5b580561509e30c31bb5b80c6cd3b9df4516c49c1e1062c6391",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.2": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.2/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DC849208047BE6",
"checksum": "4018528cd125a8b0f4d1f990a06a67942a6091d6af519af4ada05918eeea70ef",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.2/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DC8492096A685B",
"checksum": "aae1a9127a1a7651ec8f648b6924b3139171d2e9faf6548df962feb89f161292",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.2/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DC849208F850B0",
"checksum": "f6961d56104fa7755bd16590bd98899822a3e06037a88c6899a56803507671c3",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.2/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DC84920A40EAD3",
"checksum": "f13ff16d6593395e0a18fc41e67cdba7bb2b2cab532b6e990d79e1be2e2a9222",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.1": {
"x86_64_linux_musl": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.1/cargo-cyclonedx-x86_64-unknown-linux-musl.tar.xz",
"etag": "0x8DC7B5D4ACF5327",
"checksum": "e061a15a7dedcea232acbe6de66a6e8494df0a3609ef5435432b06cf2c3a9cb3",
"bin": "cargo-cyclonedx-x86_64-unknown-linux-musl/cargo-cyclonedx"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.1/cargo-cyclonedx-x86_64-apple-darwin.tar.xz",
"etag": "0x8DC7B5D4C6CB2FB",
"checksum": "eedd73b2cf7a1a1f82e991541ea3ab3e15f8393d3267e6775dbcdc3529f04d5e",
"bin": "cargo-cyclonedx-x86_64-apple-darwin/cargo-cyclonedx"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.1/cargo-cyclonedx-x86_64-pc-windows-msvc.zip",
"etag": "0x8DC7B5D4BF0E261",
"checksum": "b0c772f9d0e99d89eab0e39955150b09665b4e0a2417a4a43638d5ad1753a96a",
"bin": "cargo-cyclonedx.exe"
},
"aarch64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.1/cargo-cyclonedx-aarch64-apple-darwin.tar.xz",
"etag": "0x8DC7B5D4D6A40F2",
"checksum": "bc3857a058cc01ef92a30071084acf20cf6067a23cf0d5569b629276a441e6ee",
"bin": "cargo-cyclonedx-aarch64-apple-darwin/cargo-cyclonedx"
}
},
"0.5.0": {
"x86_64_linux_gnu": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.0/cargo-cyclonedx-linux-amd64.tar.gz",
"etag": "0x8DC3A43C920B085",
"checksum": "7daa885e9b6f59bf7674a2972bf1f37d9e21ab7461c3e2f9c59e99a966ab6026"
},
"x86_64_macos": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.0/cargo-cyclonedx-Darwin-x86_64.tar.gz",
"etag": "0x8DC3A43C9165BEA",
"checksum": "70b197f8095fe2473baef1d96dd4409abb1aef20aeeea00f8a0cbebc25528ddb"
},
"x86_64_windows": {
"url": "https://github.com/CycloneDX/cyclonedx-rust-cargo/releases/download/cargo-cyclonedx-0.5.0/cargo-cyclonedx-Win-x86_64.zip",
"etag": "0x8DC3A43C95B54A5",
"checksum": "11e063c29bdd85ceb061b30aa11073238a8c93302b1ff3f5ac37e91ac90b425a"
}

8
manifests/wash.json generated
View File

@@ -30,8 +30,8 @@
"checksum": "8bba2463f4e121fdbbebc4046aabe1ade54aa3bd72ba70a57ad4b0e0e657bec2"
},
"x86_64_macos": {
"etag": "0x8DD3EEC2BF542B2",
"checksum": "edec0fa45d5ed437322d2813714b5b268d3882bf5ba93f857eefef26f068037b"
"etag": "0x8DD40984BD1ED53",
"checksum": "68b167bbadf17c3807f5b09d7b16287f543f4dc36557f998c307856c09d3aabb"
},
"x86_64_windows": {
"etag": "0x8DD3EEC2C069451",
@@ -42,8 +42,8 @@
"checksum": "bab4fad652eaa9bb1e890daa0478ec223aaf448fb72eb00e59014034a3bca345"
},
"aarch64_macos": {
"etag": "0x8DD3EEC2BD97591",
"checksum": "c2d0443264d064c3f975809e945d19fb4180a3a1d21944e43ea261f7c3050450"
"etag": "0x8DD40983E271249",
"checksum": "7fdac7caa9eb3ce8f54447d2e35b37f578555de3ab39b26b59b08eb59e01e4cb"
}
},
"0.37": {

View File

@@ -1,28 +0,0 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0 OR MIT
set -CeEuo pipefail
IFS=$'\n\t'
trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
cd -- "$(dirname -- "$0")"
version="$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "install-action-manifest-schema") | .version')"
if [[ "${version}" == "0."* ]]; then
schema_version="0.$(cut -d. -f2 <<<"${version}")"
else
schema_version="$(cut -d. -f1 <<<"${version}")"
fi
branch="manifest-schema-${schema_version}"
git worktree add --force "${1?}"
cd -- "$1"
if git fetch origin "${branch}"; then
git checkout "origin/${branch}" -B "${branch}"
elif ! git checkout "${branch}"; then
# New branch with no history. Credit: https://stackoverflow.com/a/13969482
git checkout --orphan "${branch}"
git rm -rf . || true
git config --local user.name github-actions
git config --local user.email github-actions@github.com
git commit -m 'Initial commit' --allow-empty
fi

View File

@@ -8,7 +8,6 @@ cd -- "$(dirname -- "$0")"/../..
# They don't provide prebuilt binaries for musl or old glibc host.
# version `GLIBC_2.34' not found
glibc_pre_2_34_incompat=(
cargo-cyclonedx
cargo-spellcheck
wait-for-them
xbuild
@@ -36,7 +35,7 @@ glibc_pre_2_27_incompat=(
# version `GLIBC_2.17' not found
glibc_pre_2_17_incompat=(
"${glibc_pre_2_27_incompat[@]}"
deepsource
deepsource # https://github.com/DeepSourceCorp/cli/issues/245
)
musl_incompat=(
"${glibc_pre_2_17_incompat[@]}"

View File

@@ -2,16 +2,30 @@
"repository": "https://github.com/CycloneDX/cyclonedx-rust-cargo",
"tag_prefix": "cargo-cyclonedx-",
"rust_crate": "${package}",
"bin": "${package}-${rust_target}/${package}${exe}",
"version_range": ">= 0.5.0",
"platform": {
"x86_64_macos": {
"asset_name": "${package}-Darwin-x86_64.tar.gz"
},
"x86_64_windows": {
"asset_name": "${package}-Win-x86_64.zip"
},
"x86_64_linux_gnu": {
"asset_name": "${package}-linux-amd64.tar.gz"
},
"x86_64_linux_musl": {
"asset_name": "${package}-${rust_target}.tar.xz"
},
"x86_64_macos": {
"asset_name": [
"${package}-${rust_target}.tar.xz",
"${package}-Darwin-x86_64.tar.gz"
]
},
"x86_64_windows": {
"asset_name": [
"${package}-${rust_target}.zip",
"${package}-Win-x86_64.zip"
],
"bin": "${package}${exe}"
},
"aarch64_macos": {
"asset_name": "${package}-${rust_target}.tar.xz"
}
}
}

View File

@@ -248,7 +248,7 @@ fn main() -> Result<()> {
if skip_existing_manifest_versions && existing_manifest.is_some() {
eprintln!("Skipping {semver_version} already in manifest");
continue;
};
}
let mut download_info = BTreeMap::new();
let mut pubkey = None;

View File

@@ -158,3 +158,44 @@ for tool in "${tools[@]}"; do
git checkout main
git branch -D "${tool}"
done
schema_workspace=/tmp/workspace
rm -rf -- "${schema_workspace}"
# Checkout manifest-schema branch
schema_version="$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "install-action-manifest-schema") | .version')"
if [[ "${schema_version}" == "0."* ]]; then
schema_version="0.$(cut -d. -f2 <<<"${schema_version}")"
else
schema_version="$(cut -d. -f1 <<<"${schema_version}")"
fi
schema_branch="manifest-schema-${schema_version}"
git worktree add --force "${schema_workspace}"
(
cd -- "${schema_workspace}"
if git fetch origin "${schema_branch}"; then
git checkout "origin/${schema_branch}" -B "${schema_branch}"
elif ! git checkout "${schema_branch}"; then
# New branch with no history. Credit: https://stackoverflow.com/a/13969482
git checkout --orphan "${schema_branch}"
git rm -rf -- . || true
git commit -m 'Initial commit' --allow-empty
fi
)
# Copy over schema
cp -- ./manifests/* "${schema_workspace}"
(
cd -- "${schema_workspace}"
# Stage changes
git add .
# Detect changes, then commit and push if changes exist
if [[ "$(git status --porcelain=v1 | wc -l)" != "0" ]]; then
git commit -m 'Update manifest schema'
git push origin HEAD
fi
)
rm -rf -- "${schema_workspace}"
git worktree prune