mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-26 17:10:48 +00:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2e9aff0dd | ||
|
|
cc0065f838 | ||
|
|
be9e3c2b45 | ||
|
|
e067f32759 | ||
|
|
98c0ece291 | ||
|
|
bee06ee963 | ||
|
|
daca891144 | ||
|
|
de09ec7413 | ||
|
|
20d06c5ef0 | ||
|
|
8fe89aa3e0 | ||
|
|
4666e04560 | ||
|
|
400052b460 | ||
|
|
f9f8058789 | ||
|
|
72827a9779 | ||
|
|
55ec4a4d53 | ||
|
|
dc9bc151a3 | ||
|
|
510b3ecd79 | ||
|
|
536c746821 | ||
|
|
0dfccb316f | ||
|
|
ceb86e31f0 | ||
|
|
33d49f65f5 | ||
|
|
1182afdbd1 | ||
|
|
bf0c8c6dfb | ||
|
|
ebb53fb1a9 | ||
|
|
0b0596dd1e | ||
|
|
65835784ac | ||
|
|
01f3d2d227 | ||
|
|
76a1fec160 | ||
|
|
78b9ec82a6 | ||
|
|
be22d29d34 | ||
|
|
e466aa8e34 | ||
|
|
afbe5c1715 | ||
|
|
6fde044d27 | ||
|
|
544f616845 |
15
.cspell.json
15
.cspell.json
@@ -27,24 +27,25 @@
|
||||
"ignoreRegExpList": [
|
||||
// Copyright notice
|
||||
"Copyright .*",
|
||||
"SPDX-(File|Snippet)CopyrightText: .*",
|
||||
// GHA actions/workflows
|
||||
"uses: .+@",
|
||||
"uses: .+@[\\w_.-]+",
|
||||
// GHA context (repo name, owner name, etc.)
|
||||
"github.\\w+ (=|!)= '.+'",
|
||||
"github.[\\w_.-]+ (=|!)= '[^']+'",
|
||||
// GH username
|
||||
"( |\\[)@[\\w_-]+",
|
||||
// Git config username
|
||||
"git config user.name .*",
|
||||
// Username in todo comment
|
||||
"git config( --[^ ]+)? user.name .*",
|
||||
// Username in TODO|FIXME comment
|
||||
"(TODO|FIXME)\\([\\w_., -]+\\)",
|
||||
// Cargo.toml authors
|
||||
"authors *= *\\[.*\\]",
|
||||
"\".* <[\\w_.+-]+@[\\w.-]+>\""
|
||||
"authors *= *\\[[^\\]]*\\]",
|
||||
"\"[^\"]* <[\\w_.+-]+@[\\w.-]+>\""
|
||||
],
|
||||
"languageSettings": [
|
||||
{
|
||||
"languageId": ["*"],
|
||||
"dictionaries": ["bash", "rust"]
|
||||
"dictionaries": ["bash", "cpp-refined", "rust"]
|
||||
}
|
||||
],
|
||||
"ignorePaths": []
|
||||
|
||||
@@ -11,12 +11,14 @@ indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{json,md,rb,sh,yml,yaml}]
|
||||
[*.{css,html,json,md,rb,sh,yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.{js,yml,yaml}]
|
||||
quote_type = single
|
||||
|
||||
[*.sh]
|
||||
# https://google.github.io/styleguide/shellguide.html#s5.3-pipelines
|
||||
binary_next_line = true
|
||||
# https://google.github.io/styleguide/shellguide.html#s5.5-case-statement
|
||||
switch_case_indent = true
|
||||
|
||||
2
.git-blame-ignore-revs
Normal file
2
.git-blame-ignore-revs
Normal file
@@ -0,0 +1,2 @@
|
||||
# Change indent size of shell script files to match scripts in CI config
|
||||
946918579413996845b77e146aa8eb3c6f40f7ab
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,3 +1,4 @@
|
||||
* text=auto eol=lf
|
||||
tools/tidy.sh linguist-detectable=false
|
||||
.github/.cspell/rust-dependencies.txt linguist-generated
|
||||
manifests/** linguist-generated
|
||||
|
||||
83
.github/workflows/ci.yml
vendored
83
.github/workflows/ci.yml
vendored
@@ -11,7 +11,7 @@ on:
|
||||
- dev
|
||||
- ci-*
|
||||
schedule:
|
||||
- cron: '0 0,3,6,9,12,15,18,21 * * *'
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
@@ -22,8 +22,6 @@ env:
|
||||
RUST_BACKTRACE: 1
|
||||
RUSTFLAGS: -D warnings
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
# NB: sync with miri job's --exclude option
|
||||
EXCLUDE: --exclude install-action-internal-codegen
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -37,13 +35,16 @@ jobs:
|
||||
miri:
|
||||
uses: taiki-e/github-actions/.github/workflows/miri.yml@main
|
||||
with:
|
||||
event_name: ${{ github.event_name }}
|
||||
# NB: sync with env.EXCLUDE
|
||||
# NB: sync with test job's --exclude option
|
||||
args: --exclude install-action-internal-codegen
|
||||
msrv:
|
||||
uses: taiki-e/github-actions/.github/workflows/msrv.yml@main
|
||||
test-manifest-schema:
|
||||
uses: taiki-e/github-actions/.github/workflows/test.yml@main
|
||||
with:
|
||||
event_name: ${{ github.event_name }}
|
||||
# NB: sync with miri job's --exclude option
|
||||
test-args: --exclude install-action-internal-codegen
|
||||
no-std: false
|
||||
tidy:
|
||||
uses: taiki-e/github-actions/.github/workflows/tidy.yml@main
|
||||
permissions:
|
||||
@@ -61,7 +62,7 @@ jobs:
|
||||
- os: ubuntu-22.04
|
||||
- os: ubuntu-22.04-arm
|
||||
- os: ubuntu-24.04
|
||||
- os: ubuntu-24.04-arm
|
||||
# - os: ubuntu-24.04-arm # TODO: re-enable when https://github.com/rust-lang/rust/issues/135867 solved
|
||||
- os: ubuntu-22.04
|
||||
tool: major.minor.patch
|
||||
- os: ubuntu-22.04
|
||||
@@ -231,71 +232,3 @@ jobs:
|
||||
shell: sh
|
||||
# TODO: OCI runtime exec failed: exec failed: unable to start container process: exec: "sh": executable file not found in $PATH: unknown
|
||||
if: (!startsWith(matrix.container, 'opensuse'))
|
||||
|
||||
manifest:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # for gh pr review --approve
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
- uses: taiki-e/github-actions/install-rust@stable
|
||||
- name: Generate Cargo.lock
|
||||
run: cargo update
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: 'true'
|
||||
- run: tools/manifest.sh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Handle diff
|
||||
id: diff
|
||||
run: tools/ci/manifest.sh
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
|
||||
- run: git add -N . && git diff --exit-code
|
||||
- id: create-pull-request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
title: Update manifest
|
||||
body: |
|
||||
Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request).
|
||||
|
||||
This will be auto-merged when CI has passed because this is an auto-generated PR in a defined format and is usually considered no additional review is required.
|
||||
branch: update-manifest
|
||||
token: ${{ secrets.CREATE_PR_TOKEN }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
|
||||
- name: Enable auto-merge for auto-generated PR
|
||||
run: gh pr merge --rebase --auto "${PR_NUMBER:?}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CREATE_PR_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && steps.create-pull-request.outputs.pull-request-operation == 'created'
|
||||
- name: Approve auto-generated PR for auto-merge
|
||||
run: gh pr review --approve "${PR_NUMBER:?}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && (steps.create-pull-request.outputs.pull-request-operation == 'created' || steps.create-pull-request.outputs.pull-request-operation == 'updated')
|
||||
|
||||
manifest-schema:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
rust:
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
- uses: taiki-e/github-actions/install-rust@main
|
||||
with:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
- uses: taiki-e/install-action@cargo-hack
|
||||
- uses: taiki-e/install-action@cargo-minimal-versions
|
||||
- run: cargo test --workspace --all-features ${EXCLUDE}
|
||||
- run: cargo hack build --workspace --no-private --feature-powerset --no-dev-deps
|
||||
- run: cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features
|
||||
- run: cargo minimal-versions build --workspace --no-private --detach-path-deps=skip-exact --all-features --direct
|
||||
|
||||
79
.github/workflows/manifest.yml
vendored
Normal file
79
.github/workflows/manifest.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
name: Manifest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
- ci-*
|
||||
schedule:
|
||||
- cron: '0 0,3,6,9,12,15,18,21 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
CARGO_NET_RETRY: 10
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
RUSTFLAGS: -D warnings
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash --noprofile --norc -CeEuxo pipefail {0}
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
manifest:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # for gh pr review --approve
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
- uses: taiki-e/github-actions/install-rust@stable
|
||||
- name: Generate Cargo.lock
|
||||
run: cargo update
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: 'true'
|
||||
- run: tools/manifest.sh
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Handle diff
|
||||
id: diff
|
||||
run: tools/ci/manifest.sh
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main')
|
||||
- run: git add -N . && git diff --exit-code
|
||||
- id: create-pull-request
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
with:
|
||||
title: Update manifest
|
||||
body: |
|
||||
Auto-generated by CI using [create-pull-request](https://github.com/peter-evans/create-pull-request).
|
||||
|
||||
This will be auto-merged when CI has passed because this is an auto-generated PR in a defined format and is usually considered no additional review is required.
|
||||
branch: update-manifest
|
||||
token: ${{ secrets.CREATE_PR_TOKEN }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false'
|
||||
- name: Enable auto-merge for auto-generated PR
|
||||
run: gh pr merge --rebase --auto "${PR_NUMBER:?}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CREATE_PR_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && steps.create-pull-request.outputs.pull-request-operation == 'created'
|
||||
- name: Approve auto-generated PR for auto-merge
|
||||
run: gh pr review --approve "${PR_NUMBER:?}"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
|
||||
if: github.repository_owner == 'taiki-e' && (github.event_name == 'schedule' || github.event_name == 'push' && github.ref == 'refs/heads/main') && steps.diff.outputs.success == 'false' && (steps.create-pull-request.outputs.pull-request-operation == 'created' || steps.create-pull-request.outputs.pull-request-operation == 'updated')
|
||||
51
.github/workflows/manifest_sync.yml
vendored
51
.github/workflows/manifest_sync.yml
vendored
@@ -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
|
||||
@@ -2,7 +2,7 @@
|
||||
config:
|
||||
line-length: false # MD013
|
||||
no-duplicate-heading: false # MD024
|
||||
no-blanks-blockquote: false # MD028
|
||||
no-blanks-blockquote: false # MD028 (this warns valid GFM alerts usage)
|
||||
no-inline-html: false # MD033
|
||||
no-emphasis-as-heading: false # MD036
|
||||
|
||||
|
||||
@@ -2,13 +2,34 @@
|
||||
# https://github.com/koalaman/shellcheck/blob/HEAD/shellcheck.1.md#rc-files
|
||||
|
||||
# See also:
|
||||
# https://www.shellcheck.net/wiki/Optional
|
||||
# https://github.com/koalaman/shellcheck/wiki/Optional
|
||||
# https://google.github.io/styleguide/shellguide.html
|
||||
|
||||
# https://www.shellcheck.net/wiki/SC2292
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2249
|
||||
# enable=add-default-case
|
||||
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2244
|
||||
enable=avoid-nullary-conditions
|
||||
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2312
|
||||
# enable=check-extra-masked-returns
|
||||
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2310
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2311
|
||||
# enable=check-set-e-suppressed
|
||||
|
||||
# enable=check-unassigned-uppercase
|
||||
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2230
|
||||
enable=deprecate-which
|
||||
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2248
|
||||
enable=quote-safe-variables
|
||||
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2292
|
||||
# https://google.github.io/styleguide/shellguide.html#s6.3-tests
|
||||
enable=require-double-brackets
|
||||
|
||||
# https://www.shellcheck.net/wiki/SC2250
|
||||
# https://github.com/koalaman/shellcheck/wiki/SC2250
|
||||
# https://google.github.io/styleguide/shellguide.html#s5.6-variable-expansion
|
||||
enable=require-variable-braces
|
||||
|
||||
42
CHANGELOG.md
42
CHANGELOG.md
@@ -10,6 +10,40 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.48.2] - 2025-02-09
|
||||
|
||||
- Update `release-plz@latest` to 0.3.118.
|
||||
|
||||
- Update `parse-dockerfile@latest` to 0.1.1.
|
||||
|
||||
- Update `parse-changelog@latest` to 0.6.12.
|
||||
|
||||
## [2.48.1] - 2025-02-02
|
||||
|
||||
- Update `dprint@latest` to 0.49.0.
|
||||
|
||||
## [2.48.0] - 2025-02-01
|
||||
|
||||
- Support `parse-dockerfile`. ([#838](https://github.com/taiki-e/install-action/pull/838))
|
||||
|
||||
- Update `release-plz@latest` to 0.3.116.
|
||||
|
||||
## [2.47.32] - 2025-01-31
|
||||
|
||||
- Update `typos@latest` to 1.29.5.
|
||||
|
||||
## [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 +3456,13 @@ 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.48.2...HEAD
|
||||
[2.48.2]: https://github.com/taiki-e/install-action/compare/v2.48.1...v2.48.2
|
||||
[2.48.1]: https://github.com/taiki-e/install-action/compare/v2.48.0...v2.48.1
|
||||
[2.48.0]: https://github.com/taiki-e/install-action/compare/v2.47.32...v2.48.0
|
||||
[2.47.32]: https://github.com/taiki-e/install-action/compare/v2.47.31...v2.47.32
|
||||
[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
|
||||
|
||||
@@ -3,7 +3,7 @@ resolver = "2"
|
||||
members = ["tools/codegen", "tools/manifest-schema"]
|
||||
|
||||
# This table is shared by projects under github.com/taiki-e.
|
||||
# It is not intended for manual editing.
|
||||
# Expect for unexpected_cfgs.check-cfg, it is not intended for manual editing.
|
||||
[workspace.lints.rust]
|
||||
deprecated_safe = "warn"
|
||||
improper_ctypes = "warn"
|
||||
|
||||
@@ -116,7 +116,7 @@ On Linux, if any required tools are missing, this action will attempt to install
|
||||
On other platforms, at least the following tools are required:
|
||||
|
||||
- bash 3.2+
|
||||
- jq 1.3+
|
||||
- jq 1.3+ (only on non-Windows platforms)
|
||||
- curl 7.34+ (or RHEL7/CentOS7's patched curl 7.29)
|
||||
|
||||
Known environments affected by the above version requirements are CentOS 6 (EoL on 2020-11) using curl 7.19, and Ubuntu 12.04 (EoL on 2017-04) using curl 7.22 (see "Install requirements" in [our CI config](https://github.com/taiki-e/install-action/blob/HEAD/.github/workflows/ci.yml) for example of workaround).
|
||||
|
||||
1
TOOLS.md
1
TOOLS.md
@@ -52,6 +52,7 @@ See the [Supported tools section in README.md](README.md#supported-tools) for ho
|
||||
| [**mdbook-linkcheck**](https://github.com/Michael-F-Bryan/mdbook-linkcheck) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases) | Linux, macOS, Windows | [MIT](https://github.com/Michael-F-Bryan/mdbook-linkcheck/blob/master/LICENSE) |
|
||||
| [**osv-scanner**](https://github.com/google/osv-scanner) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/google/osv-scanner/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/google/osv-scanner/blob/main/LICENSE) |
|
||||
| [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/parse-changelog/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-MIT) |
|
||||
| [**parse-dockerfile**](https://github.com/taiki-e/parse-dockerfile) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/taiki-e/parse-dockerfile/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-dockerfile/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-dockerfile/blob/main/LICENSE-MIT) |
|
||||
| [**protoc**](https://github.com/protocolbuffers/protobuf) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/protocolbuffers/protobuf/releases) | Linux, macOS, Windows | [BSD-3-Clause](https://github.com/protocolbuffers/protobuf/blob/HEAD/LICENSE) |
|
||||
| [**rclone**](https://github.com/rclone/rclone) | `$HOME/.install-action/bin` | [GitHub Releases](https://github.com/rclone/rclone/releases) | Linux, macOS, Windows | [MIT](https://github.com/rclone/rclone/blob/master/COPYING) |
|
||||
| [**release-plz**](https://release-plz.dev/) | `$CARGO_HOME/bin` | [GitHub Releases](https://github.com/release-plz/release-plz/releases) | Linux, macOS, Windows | [MIT](https://github.com/release-plz/release-plz/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/release-plz/release-plz/blob/main/LICENSE-APACHE) |
|
||||
|
||||
@@ -40,14 +40,8 @@ runs:
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
|
||||
shell: sh
|
||||
env:
|
||||
INPUT_TOOL: ${{ inputs.tool }}
|
||||
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
||||
INPUT_FALLBACK: ${{ inputs.fallback }}
|
||||
DEFAULT_GITHUB_TOKEN: ${{ github.token }}
|
||||
if: runner.os != 'Windows'
|
||||
if: runner.os == 'Linux'
|
||||
- run: bash --noprofile --norc "${GITHUB_ACTION_PATH:?}/main.sh"
|
||||
shell: bash
|
||||
env:
|
||||
@@ -55,4 +49,3 @@ runs:
|
||||
INPUT_CHECKSUM: ${{ inputs.checksum }}
|
||||
INPUT_FALLBACK: ${{ inputs.fallback }}
|
||||
DEFAULT_GITHUB_TOKEN: ${{ github.token }}
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
299
main.sh
299
main.sh
@@ -1,14 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
set -eEuo pipefail
|
||||
set -CeEuo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
rx() {
|
||||
local cmd="$1"
|
||||
shift
|
||||
(
|
||||
set -x
|
||||
"${cmd}" "$@"
|
||||
"$@"
|
||||
)
|
||||
}
|
||||
retry() {
|
||||
@@ -22,17 +20,17 @@ retry() {
|
||||
"$@"
|
||||
}
|
||||
bail() {
|
||||
echo "::error::$*"
|
||||
printf '::error::%s\n' "$*"
|
||||
exit 1
|
||||
}
|
||||
warn() {
|
||||
echo "::warning::$*"
|
||||
printf '::warning::%s\n' "$*"
|
||||
}
|
||||
info() {
|
||||
echo "info: $*"
|
||||
printf >&2 'info: %s\n' "$*"
|
||||
}
|
||||
_sudo() {
|
||||
if type -P sudo &>/dev/null; then
|
||||
if type -P sudo >/dev/null; then
|
||||
sudo "$@"
|
||||
else
|
||||
"$@"
|
||||
@@ -42,15 +40,15 @@ download_and_checksum() {
|
||||
local url="$1"
|
||||
local checksum="$2"
|
||||
if [[ -z "${enable_checksum}" ]]; then
|
||||
checksum=""
|
||||
checksum=''
|
||||
fi
|
||||
info "downloading ${url}"
|
||||
retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 "${url}" -o tmp
|
||||
if [[ -n "${checksum}" ]]; then
|
||||
info "verifying sha256 checksum for $(basename "${url}")"
|
||||
if type -P sha256sum &>/dev/null; then
|
||||
info "verifying sha256 checksum for $(basename -- "${url}")"
|
||||
if type -P sha256sum >/dev/null; then
|
||||
sha256sum -c - >/dev/null <<<"${checksum} *tmp"
|
||||
elif type -P shasum &>/dev/null; then
|
||||
elif type -P shasum >/dev/null; then
|
||||
# GitHub-hosted macOS runner does not install GNU Coreutils by default.
|
||||
# https://github.com/actions/runner-images/issues/90
|
||||
shasum -a 256 -c - >/dev/null <<<"${checksum} *tmp"
|
||||
@@ -80,7 +78,7 @@ download_and_extract() {
|
||||
editorconfig-checker) installed_bin=("${bin_dir}/${tool}${exe}") ;;
|
||||
*)
|
||||
for tmp in "${bin_in_archive[@]}"; do
|
||||
installed_bin+=("${bin_dir}/$(basename "${tmp}")")
|
||||
installed_bin+=("${bin_dir}/$(basename -- "${tmp}")")
|
||||
done
|
||||
;;
|
||||
esac
|
||||
@@ -88,70 +86,70 @@ download_and_extract() {
|
||||
local tar_args=()
|
||||
case "${url}" in
|
||||
*.tar.gz | *.tgz)
|
||||
tar_args+=("xzf")
|
||||
if ! type -P gzip &>/dev/null; then
|
||||
tar_args+=('xzf')
|
||||
if ! type -P gzip >/dev/null; then
|
||||
case "${base_distro}" in
|
||||
debian | fedora | suse | arch | alpine)
|
||||
echo "::group::Install packages required for installation (gzip)"
|
||||
printf '::group::Install packages required for installation (gzip)\n'
|
||||
sys_install gzip
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*.tar.bz2 | *.tbz2)
|
||||
tar_args+=("xjf")
|
||||
if ! type -P bzip2 &>/dev/null; then
|
||||
tar_args+=('xjf')
|
||||
if ! type -P bzip2 >/dev/null; then
|
||||
case "${base_distro}" in
|
||||
debian | fedora | suse | arch | alpine)
|
||||
echo "::group::Install packages required for installation (bzip2)"
|
||||
printf '::group::Install packages required for installation (bzip2)\n'
|
||||
sys_install bzip2
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*.tar.xz | *.txz)
|
||||
tar_args+=("xJf")
|
||||
if ! type -P xz &>/dev/null; then
|
||||
tar_args+=('xJf')
|
||||
if ! type -P xz >/dev/null; then
|
||||
case "${base_distro}" in
|
||||
debian)
|
||||
echo "::group::Install packages required for installation (xz-utils)"
|
||||
printf '::group::Install packages required for installation (xz-utils)\n'
|
||||
sys_install xz-utils
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
fedora | suse | arch | alpine)
|
||||
echo "::group::Install packages required for installation (xz)"
|
||||
printf '::group::Install packages required for installation (xz)\n'
|
||||
sys_install xz
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*.zip)
|
||||
if ! type -P unzip &>/dev/null; then
|
||||
if ! type -P unzip >/dev/null; then
|
||||
case "${base_distro}" in
|
||||
debian | fedora | suse | arch | alpine)
|
||||
echo "::group::Install packages required for installation (unzip)"
|
||||
printf '::group::Install packages required for installation (unzip)\n'
|
||||
sys_install unzip
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
mkdir -p "${tmp_dir}"
|
||||
mkdir -p -- "${tmp_dir}"
|
||||
(
|
||||
cd "${tmp_dir}"
|
||||
cd -- "${tmp_dir}"
|
||||
download_and_checksum "${url}" "${checksum}"
|
||||
if [[ ${#tar_args[@]} -gt 0 ]]; then
|
||||
tar_args+=("tmp")
|
||||
tar "${tar_args[@]}"
|
||||
for tmp in "${bin_in_archive[@]}"; do
|
||||
case "${tool}" in
|
||||
editorconfig-checker) mv "${tmp}" "${bin_dir}/${tool}${exe}" ;;
|
||||
*) mv "${tmp}" "${bin_dir}/" ;;
|
||||
editorconfig-checker) mv -- "${tmp}" "${bin_dir}/${tool}${exe}" ;;
|
||||
*) mv -- "${tmp}" "${bin_dir}/" ;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
@@ -160,20 +158,20 @@ download_and_extract() {
|
||||
unzip -q tmp "${bin_in_archive#\./}"
|
||||
for tmp in "${bin_in_archive[@]}"; do
|
||||
case "${tool}" in
|
||||
editorconfig-checker) mv "${tmp}" "${bin_dir}/${tool}${exe}" ;;
|
||||
*) mv "${tmp}" "${bin_dir}/" ;;
|
||||
editorconfig-checker) mv -- "${tmp}" "${bin_dir}/${tool}${exe}" ;;
|
||||
*) mv -- "${tmp}" "${bin_dir}/" ;;
|
||||
esac
|
||||
done
|
||||
;;
|
||||
*)
|
||||
for tmp in "${installed_bin[@]}"; do
|
||||
mv tmp "${tmp}"
|
||||
mv -- tmp "${tmp}"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
)
|
||||
rm -rf "${tmp_dir}"
|
||||
rm -rf -- "${tmp_dir}"
|
||||
|
||||
case "${host_os}" in
|
||||
linux | macos)
|
||||
@@ -189,28 +187,28 @@ read_manifest() {
|
||||
local tool="$1"
|
||||
local version="$2"
|
||||
local manifest
|
||||
rust_crate=$(call_jq -r ".rust_crate" "${manifest_dir}/${tool}.json")
|
||||
manifest=$(call_jq -r ".[\"${version}\"]" "${manifest_dir}/${tool}.json")
|
||||
rust_crate=$(jq -r '.rust_crate' "${manifest_dir}/${tool}.json")
|
||||
manifest=$(jq -r ".[\"${version}\"]" "${manifest_dir}/${tool}.json")
|
||||
if [[ "${manifest}" == "null" ]]; then
|
||||
download_info="null"
|
||||
return 0
|
||||
fi
|
||||
exact_version=$(call_jq <<<"${manifest}" -r '.version')
|
||||
exact_version=$(jq -r '.version' <<<"${manifest}")
|
||||
if [[ "${exact_version}" == "null" ]]; then
|
||||
exact_version="${version}"
|
||||
else
|
||||
manifest=$(call_jq -r ".[\"${exact_version}\"]" "${manifest_dir}/${tool}.json")
|
||||
manifest=$(jq -r ".[\"${exact_version}\"]" "${manifest_dir}/${tool}.json")
|
||||
if [[ "${rust_crate}" != "null" ]]; then
|
||||
# TODO: don't hardcode tool name and use 'immediate_yank_reflection' field in base manifest.
|
||||
case "${tool}" in
|
||||
cargo-nextest | nextest)
|
||||
crate_info=$(retry curl --proto '=https' --tlsv1.2 -fsSL --retry 10 "https://crates.io/api/v1/crates/${rust_crate}")
|
||||
while true; do
|
||||
yanked=$(jq <<<"${crate_info}" -r ".versions[] | select(.num == \"${exact_version}\") | .yanked")
|
||||
yanked=$(jq -r ".versions[] | select(.num == \"${exact_version}\") | .yanked" <<<"${crate_info}")
|
||||
if [[ "${yanked}" != "true" ]]; then
|
||||
break
|
||||
fi
|
||||
previous_stable_version=$(jq <<<"${manifest}" -r '.previous_stable_version')
|
||||
previous_stable_version=$(jq -r '.previous_stable_version' <<<"${manifest}")
|
||||
if [[ "${previous_stable_version}" == "null" ]]; then
|
||||
break
|
||||
fi
|
||||
@@ -229,26 +227,26 @@ read_manifest() {
|
||||
# usually preferred over linux-gnu binaries because they can avoid glibc version issues.
|
||||
# (rustc enables statically linking for linux-musl by default, except for mips.)
|
||||
host_platform="${host_arch}_linux_musl"
|
||||
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
|
||||
download_info=$(jq -r ".${host_platform}" <<<"${manifest}")
|
||||
if [[ "${download_info}" == "null" ]]; then
|
||||
# Even if host_env is musl, we won't issue an error here because it seems that in
|
||||
# some cases linux-gnu binaries will work on linux-musl hosts.
|
||||
# https://wiki.alpinelinux.org/wiki/Running_glibc_programs
|
||||
# TODO: However, a warning may make sense.
|
||||
host_platform="${host_arch}_linux_gnu"
|
||||
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
|
||||
download_info=$(jq -r ".${host_platform}" <<<"${manifest}")
|
||||
elif [[ "${host_env}" == "gnu" ]]; then
|
||||
# TODO: don't hardcode tool name and use 'prefer_linux_gnu' field in base manifest.
|
||||
case "${tool}" in
|
||||
cargo-nextest | nextest)
|
||||
# TODO: don't hardcode required glibc version
|
||||
required_glibc_version=2.27
|
||||
higher_glibc_version=$(sort <<<"${required_glibc_version}"$'\n'"${host_glibc_version}" -Vu | tail -1)
|
||||
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"${required_glibc_version}"$'\n'"${host_glibc_version}" | tail -1)
|
||||
if [[ "${higher_glibc_version}" == "${host_glibc_version}" ]]; then
|
||||
# musl build of nextest is slow, so use glibc build if host_env is gnu.
|
||||
# https://github.com/taiki-e/install-action/issues/13
|
||||
host_platform="${host_arch}_linux_gnu"
|
||||
download_info=$(jq <<<"${manifest}" -r ".${host_platform}")
|
||||
download_info=$(jq -r ".${host_platform}" <<<"${manifest}")
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -258,10 +256,10 @@ read_manifest() {
|
||||
# Binaries compiled for x86_64 macOS will usually also work on AArch64 macOS.
|
||||
# Binaries compiled for x86_64 Windows will usually also work on AArch64 Windows 11+.
|
||||
host_platform="${host_arch}_${host_os}"
|
||||
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
|
||||
download_info=$(jq -r ".${host_platform}" <<<"${manifest}")
|
||||
if [[ "${download_info}" == "null" ]] && [[ "${host_arch}" != "x86_64" ]]; then
|
||||
host_platform="x86_64_${host_os}"
|
||||
download_info=$(call_jq <<<"${manifest}" -r ".${host_platform}")
|
||||
download_info=$(jq -r ".${host_platform}" <<<"${manifest}")
|
||||
fi
|
||||
;;
|
||||
*) bail "unsupported OS type '${host_os}' for ${tool}" ;;
|
||||
@@ -273,25 +271,25 @@ read_download_info() {
|
||||
if [[ "${download_info}" == "null" ]]; then
|
||||
bail "${tool}@${version} for '${host_os}' is not supported"
|
||||
fi
|
||||
checksum=$(call_jq <<<"${download_info}" -r '.checksum')
|
||||
url=$(call_jq <<<"${download_info}" -r '.url')
|
||||
checksum=$(jq -r '.checksum' <<<"${download_info}")
|
||||
url=$(jq -r '.url' <<<"${download_info}")
|
||||
local tmp
|
||||
bin_in_archive=()
|
||||
if [[ "${url}" == "null" ]]; then
|
||||
local template
|
||||
template=$(call_jq -r ".template.${host_platform}" "${manifest_dir}/${tool}.json")
|
||||
url=$(call_jq <<<"${template}" -r '.url')
|
||||
template=$(jq -r ".template.${host_platform}" "${manifest_dir}/${tool}.json")
|
||||
url=$(jq -r '.url' <<<"${template}")
|
||||
url="${url//\$\{version\}/${exact_version}}"
|
||||
tmp=$(call_jq <<<"${template}" -r '.bin' | sed -E "s/\\$\\{version\\}/${exact_version}/g")
|
||||
tmp=$(jq -r '.bin' <<<"${template}" | sed -E "s/\\$\\{version\\}/${exact_version}/g")
|
||||
if [[ "${tmp}" == *"["* ]]; then
|
||||
# shellcheck disable=SC2207
|
||||
bin_in_archive=($(call_jq <<<"${template}" -r '.bin[]' | sed -E "s/\\$\\{version\\}/${exact_version}/g"))
|
||||
bin_in_archive=($(jq -r '.bin[]' <<<"${template}" | sed -E "s/\\$\\{version\\}/${exact_version}/g"))
|
||||
fi
|
||||
else
|
||||
tmp=$(call_jq <<<"${download_info}" -r '.bin')
|
||||
tmp=$(jq -r '.bin' <<<"${download_info}")
|
||||
if [[ "${tmp}" == *"["* ]]; then
|
||||
# shellcheck disable=SC2207
|
||||
bin_in_archive=($(call_jq <<<"${download_info}" -r '.bin[]'))
|
||||
bin_in_archive=($(jq -r '.bin[]' <<<"${download_info}"))
|
||||
fi
|
||||
fi
|
||||
if [[ ${#bin_in_archive[@]} -eq 0 ]]; then
|
||||
@@ -318,23 +316,23 @@ download_from_download_info() {
|
||||
}
|
||||
install_cargo_binstall() {
|
||||
local binstall_version
|
||||
binstall_version=$(call_jq -r '.latest.version' "${manifest_dir}/cargo-binstall.json")
|
||||
local install_binstall='1'
|
||||
_binstall_version=$("cargo-binstall${exe}" binstall -V 2>/dev/null || echo "")
|
||||
binstall_version=$(jq -r '.latest.version' "${manifest_dir}/cargo-binstall.json")
|
||||
local install_binstall=1
|
||||
_binstall_version=$("cargo-binstall${exe}" binstall -V 2>/dev/null || true)
|
||||
if [[ -n "${_binstall_version}" ]]; then
|
||||
if [[ "${_binstall_version}" == "${binstall_version}" ]]; then
|
||||
info "cargo-binstall already installed at ${cargo_bin}/cargo-binstall${exe}"
|
||||
install_binstall=''
|
||||
else
|
||||
info "cargo-binstall already installed at ${cargo_bin}/cargo-binstall${exe}, but is not compatible version with install-action, upgrading"
|
||||
rm "${cargo_bin}/cargo-binstall${exe}"
|
||||
rm -- "${cargo_bin}/cargo-binstall${exe}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "${install_binstall}" ]]; then
|
||||
info "installing cargo-binstall@latest (${binstall_version})"
|
||||
download_from_manifest "cargo-binstall" "latest"
|
||||
installed_at=$(type -P "cargo-binstall${exe}" || echo "")
|
||||
installed_at=$(type -P "cargo-binstall${exe}" || true)
|
||||
if [[ -n "${installed_at}" ]]; then
|
||||
info "cargo-binstall installed at ${installed_at}"
|
||||
else
|
||||
@@ -369,9 +367,9 @@ pacman_install() {
|
||||
retry _sudo pacman -Sy --noconfirm "$@"
|
||||
}
|
||||
apk_install() {
|
||||
if type -P sudo &>/dev/null; then
|
||||
if type -P sudo >/dev/null; then
|
||||
retry sudo apk --no-cache add "$@"
|
||||
elif type -P doas &>/dev/null; then
|
||||
elif type -P doas >/dev/null; then
|
||||
retry doas apk --no-cache add "$@"
|
||||
else
|
||||
retry apk --no-cache add "$@"
|
||||
@@ -389,19 +387,19 @@ sys_install() {
|
||||
init_install_action_bin_dir() {
|
||||
if [[ -z "${init_install_action_bin:-}" ]]; then
|
||||
init_install_action_bin=1
|
||||
mkdir -p "${bin_dir}"
|
||||
mkdir -p -- "${bin_dir}"
|
||||
export PATH="${PATH}:${bin_dir}"
|
||||
local _bin_dir
|
||||
_bin_dir=$(canonicalize_windows_path "${bin_dir}")
|
||||
# TODO: avoid this when already added
|
||||
info "adding '${_bin_dir}' to PATH"
|
||||
echo "${_bin_dir}" >>"${GITHUB_PATH}"
|
||||
printf '%s\n' "${_bin_dir}" >>"${GITHUB_PATH}"
|
||||
fi
|
||||
}
|
||||
canonicalize_windows_path() {
|
||||
case "${host_os}" in
|
||||
windows) sed <<<"$1" 's/^\/cygdrive\//\//; s/^\/c\//C:\\/; s/\//\\/g' ;;
|
||||
*) echo "$1" ;;
|
||||
windows) sed -E 's/^\/cygdrive\//\//; s/^\/c\//C:\\/; s/\//\\/g' <<<"$1" ;;
|
||||
*) printf '%s\n' "$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -415,7 +413,7 @@ if [[ $# -gt 0 ]]; then
|
||||
fi
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
manifest_dir="$(dirname "$0")/manifests"
|
||||
manifest_dir="$(dirname -- "$0")/manifests"
|
||||
|
||||
# Inputs
|
||||
tool="${INPUT_TOOL:-}"
|
||||
@@ -446,17 +444,17 @@ case "${fallback}" in
|
||||
esac
|
||||
|
||||
# Refs: https://github.com/rust-lang/rustup/blob/HEAD/rustup-init.sh
|
||||
base_distro=""
|
||||
exe=""
|
||||
base_distro=''
|
||||
exe=''
|
||||
case "$(uname -s)" in
|
||||
Linux)
|
||||
host_os=linux
|
||||
ldd_version=$(ldd --version 2>&1 || true)
|
||||
if grep <<<"${ldd_version}" -q 'musl'; then
|
||||
host_env="musl"
|
||||
if grep -Fq musl <<<"${ldd_version}"; then
|
||||
host_env=musl
|
||||
else
|
||||
host_env="gnu"
|
||||
host_glibc_version=$(grep <<<"${ldd_version}" -E "GLIBC|GNU libc" | sed "s/.* //g")
|
||||
host_env=gnu
|
||||
host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}" | sed -E "s/.* //g")
|
||||
fi
|
||||
if [[ -e /etc/os-release ]]; then
|
||||
if grep -Eq '^ID_LIKE=' /etc/os-release; then
|
||||
@@ -471,14 +469,19 @@ case "$(uname -s)" in
|
||||
else
|
||||
base_distro=$(grep -E '^ID=' /etc/os-release | cut -d= -f2)
|
||||
fi
|
||||
base_distro="${base_distro//\"/}"
|
||||
elif [[ -e /etc/redhat-release ]]; then
|
||||
# /etc/os-release is available on RHEL/CentOS 7+
|
||||
base_distro=fedora
|
||||
elif [[ -e /etc/debian_version ]]; then
|
||||
# /etc/os-release is available on Debian 7+
|
||||
base_distro=debian
|
||||
fi
|
||||
case "${base_distro}" in
|
||||
fedora)
|
||||
dnf=dnf
|
||||
if ! type -P dnf &>/dev/null; then
|
||||
if type -P microdnf &>/dev/null; then
|
||||
if ! type -P dnf >/dev/null; then
|
||||
if type -P microdnf >/dev/null; then
|
||||
# fedora-based distributions have "minimal" images that
|
||||
# use microdnf instead of dnf.
|
||||
dnf=microdnf
|
||||
@@ -495,12 +498,12 @@ case "$(uname -s)" in
|
||||
Darwin) host_os=macos ;;
|
||||
MINGW* | MSYS* | CYGWIN* | Windows_NT)
|
||||
host_os=windows
|
||||
exe=".exe"
|
||||
exe=.exe
|
||||
;;
|
||||
*) bail "unrecognized OS type '$(uname -s)'" ;;
|
||||
esac
|
||||
case "$(uname -m)" in
|
||||
aarch64 | arm64) host_arch="aarch64" ;;
|
||||
aarch64 | arm64) host_arch=aarch64 ;;
|
||||
xscale | arm | armv*l)
|
||||
# Ignore Arm for now, as we need to consider the version and whether hard-float is supported.
|
||||
# https://github.com/rust-lang/rustup/pull/593
|
||||
@@ -515,19 +518,19 @@ case "$(uname -m)" in
|
||||
# https://github.com/actions/runner/blob/v2.321.0/.github/workflows/build.yml#L21
|
||||
# https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#supported-architectures-and-operating-systems-for-self-hosted-runners
|
||||
# So we can assume x86_64 unless it is AArch64 or Arm.
|
||||
*) host_arch="x86_64" ;;
|
||||
*) host_arch=x86_64 ;;
|
||||
esac
|
||||
info "host platform: ${host_arch}_${host_os}"
|
||||
|
||||
home="${HOME}"
|
||||
if [[ "${host_os}" == "windows" ]]; then
|
||||
if [[ "${home}" == "/home/"* ]]; then
|
||||
if [[ -d "${home/\/home\//\/c\/Users\/}" ]]; then
|
||||
if [[ -d "${home/\/home\///c/Users/}" ]]; then
|
||||
# MSYS2 https://github.com/taiki-e/install-action/pull/518#issuecomment-2160736760
|
||||
home="${home/\/home\//\/c\/Users\/}"
|
||||
elif [[ -d "${home/\/home\//\/cygdrive\/c\/Users\/}" ]]; then
|
||||
home="${home/\/home\///c/Users/}"
|
||||
elif [[ -d "${home/\/home\///cygdrive/c/Users/}" ]]; then
|
||||
# Cygwin https://github.com/taiki-e/install-action/issues/224#issuecomment-1720196288
|
||||
home="${home/\/home\//\/cygdrive\/c\/Users\/}"
|
||||
home="${home/\/home\///cygdrive/c/Users/}"
|
||||
else
|
||||
warn "\$HOME starting /home/ (${home}) on Windows bash is usually fake path, this may cause installation issue"
|
||||
fi
|
||||
@@ -540,37 +543,36 @@ cargo_bin="${CARGO_HOME:-"${home}/.cargo"}/bin"
|
||||
# is used ($CARGO_HOME/bin is most likely not included in the PATH), fallback to
|
||||
# $install_action_dir/bin.
|
||||
if [[ "${host_os}" == "windows" ]]; then
|
||||
if type -P cargo &>/dev/null; then
|
||||
if type -P cargo >/dev/null; then
|
||||
info "cargo is located at $(type -P cargo)"
|
||||
cargo_bin=$(dirname "$(type -P cargo)")
|
||||
cargo_bin=$(dirname -- "$(type -P cargo)")
|
||||
else
|
||||
cargo_bin="${install_action_dir}/bin"
|
||||
fi
|
||||
elif [[ ! -e "${cargo_bin}" ]] || [[ "$(type -P cargo || true)" != "${cargo_bin}/cargo"* ]]; then
|
||||
if type -P cargo &>/dev/null; then
|
||||
if type -P cargo >/dev/null; then
|
||||
info "cargo is located at $(type -P cargo)"
|
||||
fi
|
||||
# Moving files to /usr/local/bin requires sudo in some environments, so do not use it: https://github.com/taiki-e/install-action/issues/543
|
||||
cargo_bin="${install_action_dir}/bin"
|
||||
fi
|
||||
|
||||
jq_use_b=''
|
||||
case "${host_os}" in
|
||||
linux)
|
||||
if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null || ! type -P tar &>/dev/null; then
|
||||
if ! type -P jq >/dev/null || ! type -P curl >/dev/null || ! type -P tar >/dev/null; then
|
||||
case "${base_distro}" in
|
||||
debian | fedora | suse | arch | alpine)
|
||||
echo "::group::Install packages required for installation (jq, curl, and/or tar)"
|
||||
printf '::group::Install packages required for installation (jq, curl, and/or tar)\n'
|
||||
sys_packages=()
|
||||
if ! type -P curl &>/dev/null; then
|
||||
if ! type -P curl >/dev/null; then
|
||||
sys_packages+=(ca-certificates curl)
|
||||
fi
|
||||
if ! type -P tar &>/dev/null; then
|
||||
if ! type -P tar >/dev/null; then
|
||||
sys_packages+=(tar)
|
||||
fi
|
||||
if [[ "${dnf:-}" == "yum" ]]; then
|
||||
# On RHEL7-based distribution jq requires EPEL
|
||||
if ! type -P jq &>/dev/null; then
|
||||
if ! type -P jq >/dev/null; then
|
||||
sys_packages+=(epel-release)
|
||||
sys_install "${sys_packages[@]}"
|
||||
sys_install jq --enablerepo=epel
|
||||
@@ -578,7 +580,7 @@ case "${host_os}" in
|
||||
sys_install "${sys_packages[@]}"
|
||||
fi
|
||||
else
|
||||
if ! type -P jq &>/dev/null; then
|
||||
if ! type -P jq >/dev/null; then
|
||||
# https://github.com/taiki-e/install-action/issues/521
|
||||
if [[ "${base_distro}" == "arch" ]]; then
|
||||
sys_packages+=(glibc)
|
||||
@@ -587,59 +589,50 @@ case "${host_os}" in
|
||||
fi
|
||||
sys_install "${sys_packages[@]}"
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
*) warn "install-action requires at least jq and curl on non-Debian/Fedora/SUSE/Arch/Alpine-based Linux" ;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
macos)
|
||||
if ! type -P jq &>/dev/null || ! type -P curl &>/dev/null; then
|
||||
if ! type -P jq >/dev/null || ! type -P curl >/dev/null; then
|
||||
warn "install-action requires at least jq and curl on macOS"
|
||||
fi
|
||||
;;
|
||||
windows)
|
||||
if ! type -P curl &>/dev/null; then
|
||||
if ! type -P curl >/dev/null; then
|
||||
warn "install-action requires at least curl on Windows"
|
||||
fi
|
||||
# https://github.com/jqlang/jq/issues/1854
|
||||
jq_use_b=1
|
||||
jq="${install_action_dir}/jq/bin/jq.exe"
|
||||
if [[ ! -f "${jq}" ]]; then
|
||||
jq_version=$(jq --version || echo "")
|
||||
case "${jq_version}" in
|
||||
jq-1.[7-9]* | jq-1.[1-9][0-9]*) jq='' ;;
|
||||
*)
|
||||
_tmp=$(jq <<<"{}" -r .a || echo "")
|
||||
if [[ "${_tmp}" == "null" ]]; then
|
||||
jq=''
|
||||
jq_use_b=''
|
||||
else
|
||||
info "old jq (${jq_version}) has bug on Windows; downloading jq 1.7 (will not be added to PATH)"
|
||||
mkdir -p "${install_action_dir}/jq/bin"
|
||||
url='https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe'
|
||||
checksum='7451fbbf37feffb9bf262bd97c54f0da558c63f0748e64152dd87b0a07b6d6ab'
|
||||
(
|
||||
cd "${install_action_dir}/jq/bin"
|
||||
download_and_checksum "${url}" "${checksum}"
|
||||
mv tmp jq.exe
|
||||
)
|
||||
echo
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if [[ -f "${install_action_dir}/jq/bin/jq.exe" ]]; then
|
||||
jq() { "${install_action_dir}/jq/bin/jq.exe" -b "$@"; }
|
||||
elif type -P jq >/dev/null; then
|
||||
# https://github.com/jqlang/jq/issues/1854
|
||||
_tmp=$(jq -r .a <<<'{}')
|
||||
if [[ "${_tmp}" != "null" ]]; then
|
||||
_tmp=$(jq -b -r .a 2>/dev/null <<<'{}' || true)
|
||||
if [[ "${_tmp}" == "null" ]]; then
|
||||
jq() { command jq -b "$@"; }
|
||||
else
|
||||
jq() { command jq "$@" | tr -d '\r'; }
|
||||
fi
|
||||
fi
|
||||
else
|
||||
printf '::group::Install packages required for installation (jq)\n'
|
||||
mkdir -p -- "${install_action_dir}/jq/bin"
|
||||
url='https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-windows-amd64.exe'
|
||||
checksum='7451fbbf37feffb9bf262bd97c54f0da558c63f0748e64152dd87b0a07b6d6ab'
|
||||
(
|
||||
cd -- "${install_action_dir}/jq/bin"
|
||||
download_and_checksum "${url}" "${checksum}"
|
||||
mv -- tmp jq.exe
|
||||
)
|
||||
printf '::endgroup::\n'
|
||||
jq() { "${install_action_dir}/jq/bin/jq.exe" -b "$@"; }
|
||||
fi
|
||||
;;
|
||||
*) bail "unsupported host OS '${host_os}'" ;;
|
||||
esac
|
||||
call_jq() {
|
||||
# https://github.com/jqlang/jq/issues/1854
|
||||
if [[ -n "${jq_use_b}" ]]; then
|
||||
"${jq:-jq}" -b "$@"
|
||||
else
|
||||
"${jq:-jq}" "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
unsupported_tools=()
|
||||
for tool in "${tools[@]}"; do
|
||||
@@ -653,7 +646,7 @@ for tool in "${tools[@]}"; do
|
||||
bail "install-action v2 does not support semver pre-release and build-metadata: '${version}'; if you need these supports again, please submit an issue at <https://github.com/taiki-e/install-action>"
|
||||
fi
|
||||
else
|
||||
version="latest"
|
||||
version=latest
|
||||
fi
|
||||
installed_bin=()
|
||||
case "${tool}" in
|
||||
@@ -666,32 +659,32 @@ for tool in "${tools[@]}"; do
|
||||
include_dir="${install_action_dir}/include"
|
||||
init_install_action_bin_dir
|
||||
if [[ ! -e "${include_dir}" ]]; then
|
||||
mkdir -p "${include_dir}"
|
||||
mkdir -p -- "${include_dir}"
|
||||
fi
|
||||
if ! type -P unzip &>/dev/null; then
|
||||
if ! type -P unzip >/dev/null; then
|
||||
case "${base_distro}" in
|
||||
debian | fedora | suse | arch | alpine)
|
||||
echo "::group::Install packages required for installation (unzip)"
|
||||
printf '::group::Install packages required for installation (unzip)\n'
|
||||
sys_install unzip
|
||||
echo "::endgroup::"
|
||||
printf '::endgroup::\n'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
mkdir -p "${tmp_dir}"
|
||||
mkdir -p -- "${tmp_dir}"
|
||||
(
|
||||
cd "${tmp_dir}"
|
||||
cd -- "${tmp_dir}"
|
||||
download_and_checksum "${url}" "${checksum}"
|
||||
unzip -q tmp
|
||||
mv "bin/protoc${exe}" "${bin_dir}/"
|
||||
mkdir -p "${include_dir}/"
|
||||
cp -r include/. "${include_dir}/"
|
||||
mv -- "bin/protoc${exe}" "${bin_dir}/"
|
||||
mkdir -p -- "${include_dir}/"
|
||||
cp -r -- include/. "${include_dir}/"
|
||||
if [[ -z "${PROTOC:-}" ]]; then
|
||||
_bin_dir=$(canonicalize_windows_path "${bin_dir}")
|
||||
info "setting PROTOC environment variable to '${_bin_dir}/protoc${exe}'"
|
||||
echo "PROTOC=${_bin_dir}/protoc${exe}" >>"${GITHUB_ENV}"
|
||||
printf '%s\n' "PROTOC=${_bin_dir}/protoc${exe}" >>"${GITHUB_ENV}"
|
||||
fi
|
||||
)
|
||||
rm -rf "${tmp_dir}"
|
||||
rm -rf -- "${tmp_dir}"
|
||||
installed_bin=("${tool}${exe}")
|
||||
;;
|
||||
valgrind)
|
||||
@@ -702,7 +695,7 @@ for tool in "${tools[@]}"; do
|
||||
esac
|
||||
case "${host_os}" in
|
||||
linux) ;;
|
||||
macos | windows) bail "${tool} for non-linux is not supported yet by this action" ;;
|
||||
macos | windows) bail "${tool} for non-Linux is not supported yet by this action" ;;
|
||||
*) bail "unsupported host OS '${host_os}' for ${tool}" ;;
|
||||
esac
|
||||
# libc6-dbg is needed to run Valgrind
|
||||
@@ -718,13 +711,13 @@ for tool in "${tools[@]}"; do
|
||||
*) warn "specifying the version of ${tool} is not supported by this action" ;;
|
||||
esac
|
||||
install_cargo_binstall
|
||||
echo
|
||||
printf '\n'
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
# Handle aliases
|
||||
case "${tool}" in
|
||||
cargo-nextest | nextest) tool="cargo-nextest" ;;
|
||||
cargo-nextest | nextest) tool=cargo-nextest ;;
|
||||
esac
|
||||
|
||||
# Use cargo-binstall fallback if tool is not available.
|
||||
@@ -757,7 +750,7 @@ for tool in "${tools[@]}"; do
|
||||
shellcheck)
|
||||
case "${host_os}" in
|
||||
linux)
|
||||
if type -P shellcheck &>/dev/null; then
|
||||
if type -P shellcheck >/dev/null; then
|
||||
apt_remove -y shellcheck
|
||||
fi
|
||||
;;
|
||||
@@ -771,12 +764,12 @@ for tool in "${tools[@]}"; do
|
||||
|
||||
tool_bin_stems=()
|
||||
for tool_bin in "${installed_bin[@]}"; do
|
||||
tool_bin=$(basename "${tool_bin}")
|
||||
tool_bin=$(basename -- "${tool_bin}")
|
||||
tool_bin_stem="${tool_bin%.exe}"
|
||||
installed_at=$(type -P "${tool_bin}" || echo "")
|
||||
installed_at=$(type -P "${tool_bin}" || true)
|
||||
if [[ -z "${installed_at}" ]]; then
|
||||
tool_bin="${tool_bin_stem}"
|
||||
installed_at=$(type -P "${tool_bin}" || echo "")
|
||||
installed_at=$(type -P "${tool_bin}" || true)
|
||||
fi
|
||||
if [[ -n "${installed_at}" ]]; then
|
||||
info "${tool_bin_stem} installed at ${installed_at}"
|
||||
@@ -818,7 +811,7 @@ for tool in "${tools[@]}"; do
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo
|
||||
printf '\n'
|
||||
done
|
||||
|
||||
if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
|
||||
@@ -840,6 +833,6 @@ if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
|
||||
_bin_dir=$(canonicalize_windows_path "${home}/.cargo/bin")
|
||||
# TODO: avoid this when already added
|
||||
info "adding '${_bin_dir}' to PATH"
|
||||
echo "${_bin_dir}" >>"${GITHUB_PATH}"
|
||||
printf '%s\n' "${_bin_dir}" >>"${GITHUB_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
201
manifests/cargo-cyclonedx.json
generated
201
manifests/cargo-cyclonedx.json
generated
@@ -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"
|
||||
}
|
||||
|
||||
27
manifests/dprint.json
generated
27
manifests/dprint.json
generated
@@ -25,7 +25,32 @@
|
||||
},
|
||||
"license_markdown": "[MIT](https://github.com/dprint/dprint/blob/main/LICENSE)",
|
||||
"latest": {
|
||||
"version": "0.48.0"
|
||||
"version": "0.49.0"
|
||||
},
|
||||
"0.49": {
|
||||
"version": "0.49.0"
|
||||
},
|
||||
"0.49.0": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD4320D522D8E0",
|
||||
"checksum": "0ff81f810da037e6fff7d326daf196eac82c72953bc10c9ae3673b2f45367763"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD4320D511873C",
|
||||
"checksum": "56e99ab1da9f8b2424830e8f7220f6a125b784556871cbe689d1d351ad57258f"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD4320D510EBA2",
|
||||
"checksum": "6aaf465e4b34e4da1f2fd54297bc31e64d6a2ec93a30dbad8ebd3a6f4f16974c"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD4320D51A56F1",
|
||||
"checksum": "53e98e812cf1bc0cca7e0e48cc0346217f064d8d45d6c53daf6eb0d83fa47f83"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD4320D520B868",
|
||||
"checksum": "6772b452179a7142710860a8da8d8ec112b84c1b4dd5a7e4458c759c44b76751"
|
||||
}
|
||||
},
|
||||
"0.48": {
|
||||
"version": "0.48.0"
|
||||
|
||||
36
manifests/parse-changelog.json
generated
36
manifests/parse-changelog.json
generated
@@ -3,10 +3,42 @@
|
||||
"template": null,
|
||||
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/main/LICENSE-MIT)",
|
||||
"latest": {
|
||||
"version": "0.6.11"
|
||||
"version": "0.6.12"
|
||||
},
|
||||
"0.6": {
|
||||
"version": "0.6.11"
|
||||
"version": "0.6.12"
|
||||
},
|
||||
"0.6.12": {
|
||||
"x86_64_linux_musl": {
|
||||
"url": "https://github.com/taiki-e/parse-changelog/releases/download/v0.6.12/parse-changelog-x86_64-unknown-linux-musl.tar.gz",
|
||||
"etag": "0x8DD4697ED565D46",
|
||||
"checksum": "619b7512735e294e9f758df6ed6d85a562d126460d71d3349d9f08e667a29225"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"url": "https://github.com/taiki-e/parse-changelog/releases/download/v0.6.12/parse-changelog-x86_64-apple-darwin.tar.gz",
|
||||
"etag": "0x8DD46982CC23D64",
|
||||
"checksum": "d88b967f24eee717a34126bd1104a8eeeb561894693d9a2e760b6cf1c0edfbc9"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"url": "https://github.com/taiki-e/parse-changelog/releases/download/v0.6.12/parse-changelog-x86_64-pc-windows-msvc.tar.gz",
|
||||
"etag": "0x8DD469835945C2B",
|
||||
"checksum": "29527cf19d1bbc772dcbc9776ec09c28e6e5f75c36c0eeea60ab631d6f2b8c62"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"url": "https://github.com/taiki-e/parse-changelog/releases/download/v0.6.12/parse-changelog-aarch64-unknown-linux-musl.tar.gz",
|
||||
"etag": "0x8DD4697EDCABBF6",
|
||||
"checksum": "6cfb4707d0b90a8cf9f2c3b4d3e161d50333f4f4d180bf1e775786eec69c7820"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"url": "https://github.com/taiki-e/parse-changelog/releases/download/v0.6.12/parse-changelog-aarch64-apple-darwin.tar.gz",
|
||||
"etag": "0x8DD469811E4DFFC",
|
||||
"checksum": "cad9f0ced004adf49f217da98a28e0a2e8aa720ad082f1a64fa9b3b507405b78"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"url": "https://github.com/taiki-e/parse-changelog/releases/download/v0.6.12/parse-changelog-aarch64-pc-windows-msvc.tar.gz",
|
||||
"etag": "0x8DD4698242B5DF1",
|
||||
"checksum": "aa3fca8305d2aa21246dbcb0a080574bc3b43efe2e71117545a688a15f9e24e7"
|
||||
}
|
||||
},
|
||||
"0.6.11": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
82
manifests/parse-dockerfile.json
generated
Normal file
82
manifests/parse-dockerfile.json
generated
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"rust_crate": "parse-dockerfile",
|
||||
"template": {
|
||||
"x86_64_linux_musl": {
|
||||
"url": "https://github.com/taiki-e/parse-dockerfile/releases/download/v${version}/parse-dockerfile-x86_64-unknown-linux-musl.tar.gz"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"url": "https://github.com/taiki-e/parse-dockerfile/releases/download/v${version}/parse-dockerfile-x86_64-apple-darwin.tar.gz"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"url": "https://github.com/taiki-e/parse-dockerfile/releases/download/v${version}/parse-dockerfile-x86_64-pc-windows-msvc.tar.gz"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"url": "https://github.com/taiki-e/parse-dockerfile/releases/download/v${version}/parse-dockerfile-aarch64-unknown-linux-musl.tar.gz"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"url": "https://github.com/taiki-e/parse-dockerfile/releases/download/v${version}/parse-dockerfile-aarch64-apple-darwin.tar.gz"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"url": "https://github.com/taiki-e/parse-dockerfile/releases/download/v${version}/parse-dockerfile-aarch64-pc-windows-msvc.tar.gz"
|
||||
}
|
||||
},
|
||||
"license_markdown": "[Apache-2.0](https://github.com/taiki-e/parse-dockerfile/blob/main/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-dockerfile/blob/main/LICENSE-MIT)",
|
||||
"latest": {
|
||||
"version": "0.1.1"
|
||||
},
|
||||
"0.1": {
|
||||
"version": "0.1.1"
|
||||
},
|
||||
"0.1.1": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD46980448F328",
|
||||
"checksum": "b72138691c67e48d77b1c69c726bf9815edc9554144fc6eb513c2df02d31ffc9"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD469864E107C5",
|
||||
"checksum": "d0f2192e66a9ac52f1624f0ff0543f701c6c8e5a690f63f21c481b5b3e3748eb"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD46983232CEF8",
|
||||
"checksum": "c2e8e5da8e377a13eb9e8692dd0ac6793700f43240f4cc49d00aa9831d3d561f"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD469805997397",
|
||||
"checksum": "29c0a71340eb1bcc8033ae1f3e6e77afe921f8c5c3d6b2919c50c1d5eaab22b6"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD46984CFFA486",
|
||||
"checksum": "c91b6512ef18a51486065164cfd31d0acd5de1e47db94ef447b6d4f24e670ea6"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"etag": "0x8DD46983C64A17B",
|
||||
"checksum": "f664f395e639dd6d269c96a3443ca003c46e387701334be9bb527795e4f77234"
|
||||
}
|
||||
},
|
||||
"0.1.0": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD42FBF89625FB",
|
||||
"checksum": "9619a5811b9cc3cfa109135860469f4557de42cef776bc4b22b9459121ec6149"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD42FBFE2FF6FD",
|
||||
"checksum": "b50e59f1e232d64ae568bac1bf5ddd8f80bcd783b1d322373b5d603d63bce66c"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD42FC0E0FA8E5",
|
||||
"checksum": "265d4ca8a6c268177dd2e25472247be6b1cf5294005cfa16250bcaf2be9d0d84"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD42FBFD9C4C90",
|
||||
"checksum": "68b4822d75300feab0a56d52a3a798ac447319a015e4c2e2de0d353979a109da"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD42FC022D9F9B",
|
||||
"checksum": "c4eaff6be100426f2c36a08bc2aa0e3c323880b03fdf88e94c469eedcc9a276d"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"etag": "0x8DD42FC11EF8AB9",
|
||||
"checksum": "e8fa1b845c79fa3b478c0c19e34d508ad73b6924ab6ba84c83139d0d318efdf2"
|
||||
}
|
||||
}
|
||||
}
|
||||
108
manifests/release-plz.json
generated
108
manifests/release-plz.json
generated
@@ -22,10 +22,114 @@
|
||||
},
|
||||
"license_markdown": "[MIT](https://github.com/release-plz/release-plz/blob/main/LICENSE-MIT) OR [Apache-2.0](https://github.com/release-plz/release-plz/blob/main/LICENSE-APACHE)",
|
||||
"latest": {
|
||||
"version": "0.3.114"
|
||||
"version": "0.3.118"
|
||||
},
|
||||
"0.3": {
|
||||
"version": "0.3.114"
|
||||
"version": "0.3.118"
|
||||
},
|
||||
"0.3.118": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD488F61EDB29B",
|
||||
"checksum": "f751266da808ec38b0426abce0e68387221f3dc323b96400113e040fff0bb130"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD4890279C0CCC",
|
||||
"checksum": "2f1ea887591575c3c6e73f9697f030c54d2ba2c90cfc19e7989f16d77e2df010"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD489048364449",
|
||||
"checksum": "bcdcb79e2015c1cb73634b8ea797b7e9124332630fda096f5a924c203adb351f"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD488F7BD66E21",
|
||||
"checksum": "b9ef712f8946d6522f0052bafd769a28e885ff7b20970aa1a8eea5085fecf80e"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD488FD9BD6C14",
|
||||
"checksum": "7eaffdcfebb772b9bff42af2c53102d19f285307df14b061620cafc32f8ab167"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"etag": "0x8DD489056222AB7",
|
||||
"checksum": "87850153a0a917c36b6ecf404a952e9a88443872c313a79896131a28e0b56685"
|
||||
}
|
||||
},
|
||||
"0.3.117": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD48765324E4A3",
|
||||
"checksum": "5cc9089077c1e0f097d9687afacbba241f2ad5a816debf834a45e0f539d6d2ec"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD48772F752763",
|
||||
"checksum": "162022c86d213f3ec4cf5aba07dfaae3cae84d0cc89baab02e0856f189e3d99a"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD487743DFFA65",
|
||||
"checksum": "cf221437eaa5248685ed4e1b464300af5f132bbe91889a74986a919ed99acb64"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD48765BCE51C3",
|
||||
"checksum": "21e4007f9b180fda271ff7ea8f6bd34363b3890eff055fac5cc6b7c0db2db71e"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD4876A58DECD0",
|
||||
"checksum": "8c0f638037005a7b8e231dec717846324b7e3f8dd7cb0cdc85feeb59746d5254"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"etag": "0x8DD48770B3846CE",
|
||||
"checksum": "7bd493f496c0b55b68600af36b4b9c2225f75db693665832b943526b8253e38f"
|
||||
}
|
||||
},
|
||||
"0.3.116": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD42DE5F06AD6B",
|
||||
"checksum": "478cd61804a0f680194e087e61f8efeff8f9d4336c6677f6dbf7857caa1bd277"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD42DEDA2BEEC8",
|
||||
"checksum": "090475722ef7aaf583fdcc33b9dbb39779859226dab569a243ccc26df5d71adc"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD42DF1BAAF799",
|
||||
"checksum": "bd356a00f8d8accc6599edc44847b7501fc0df3b03c1efb3fb6292265ab8c044"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD42DE7BC7EF8B",
|
||||
"checksum": "0d346b05dfa6aed484d701343ac1cf5b4686f9a53de67b7514e0f93475640701"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD42DF056C6C3B",
|
||||
"checksum": "c79a30c44b15643ff569270b2c7de9b4416784624f50a6d03f49519b2f247a55"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"etag": "0x8DD42DF27182C76",
|
||||
"checksum": "29f933fd59d05ca0be99493d0e3cfa6e1134b2b3c3b02cc32eb63ceb17841894"
|
||||
}
|
||||
},
|
||||
"0.3.115": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD42D7BC589A24",
|
||||
"checksum": "aafca01db66ae647d95b6383300bf966cafe1176655cf40109c4362a7c107812"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD42D80E66C940",
|
||||
"checksum": "586542b06db56a82b94741f14b2953a36b2d9129e0678cf71dab1c9d9fda6c4b"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD42D87237BFB4",
|
||||
"checksum": "90cf663d1b20240badcc5ef7d1ecb41e51856157412fc0a8565f0d4f1bc7ebe2"
|
||||
},
|
||||
"aarch64_linux_musl": {
|
||||
"etag": "0x8DD42D7C9D3E797",
|
||||
"checksum": "886eb3d7290c5a46658de62930c7b4377558c8cd27bb7e0c2b20c295f8b1804e"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD42D804B2C109",
|
||||
"checksum": "f8ab95bda2f46ba84374120a01baa07e6ccc7962db8d24a682a852d3eca70013"
|
||||
},
|
||||
"aarch64_windows": {
|
||||
"etag": "0x8DD42D88EAB51A1",
|
||||
"checksum": "2922a0548329847aec6816c06472271be7f27946cd0017b811b3d0e2e3adc95f"
|
||||
}
|
||||
},
|
||||
"0.3.114": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
24
manifests/typos.json
generated
24
manifests/typos.json
generated
@@ -16,13 +16,31 @@
|
||||
},
|
||||
"license_markdown": "[MIT](https://github.com/crate-ci/typos/blob/master/LICENSE-MIT) OR [Apache-2.0](https://github.com/crate-ci/typos/blob/master/LICENSE-APACHE)",
|
||||
"latest": {
|
||||
"version": "1.29.4"
|
||||
"version": "1.29.5"
|
||||
},
|
||||
"1": {
|
||||
"version": "1.29.4"
|
||||
"version": "1.29.5"
|
||||
},
|
||||
"1.29": {
|
||||
"version": "1.29.4"
|
||||
"version": "1.29.5"
|
||||
},
|
||||
"1.29.5": {
|
||||
"x86_64_linux_musl": {
|
||||
"etag": "0x8DD417A6CB2709D",
|
||||
"checksum": "e4101f822065efd864d09e1c684038cfec8b2805039ba8e1d8e911d1386eac46"
|
||||
},
|
||||
"x86_64_macos": {
|
||||
"etag": "0x8DD417ACDB64ACA",
|
||||
"checksum": "b2204510baaeb8e7186155c7b38d0ffc146d75e08dd14d300d887a87a4d30669"
|
||||
},
|
||||
"x86_64_windows": {
|
||||
"etag": "0x8DD417AC3813FC9",
|
||||
"checksum": "804d887c804b13ff26ab46677eb534fc912538c59c049ebaffe133e7f0e70456"
|
||||
},
|
||||
"aarch64_macos": {
|
||||
"etag": "0x8DD417AD33699BA",
|
||||
"checksum": "ef9eb9a9ec7cfeaba3909b154cc01edcbee4b5c370acd6b70508cd4d4d19c20c"
|
||||
}
|
||||
},
|
||||
"1.29.4": {
|
||||
"x86_64_linux_musl": {
|
||||
|
||||
8
manifests/wash.json
generated
8
manifests/wash.json
generated
@@ -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": {
|
||||
|
||||
@@ -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
|
||||
@@ -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[@]}"
|
||||
@@ -68,15 +67,15 @@ case "$(uname -s)" in
|
||||
incompat_tools+=("${musl_incompat[@]}")
|
||||
else
|
||||
host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}" | sed "s/.* //g")
|
||||
higher_glibc_version=$(sort -Vu <<<"2.34"$'\n'"${host_glibc_version}" | tail -1)
|
||||
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.34"$'\n'"${host_glibc_version}" | tail -1)
|
||||
if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then
|
||||
higher_glibc_version=$(sort -Vu <<<"2.31"$'\n'"${host_glibc_version}" | tail -1)
|
||||
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.31"$'\n'"${host_glibc_version}" | tail -1)
|
||||
if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then
|
||||
higher_glibc_version=$(sort -Vu <<<"2.28"$'\n'"${host_glibc_version}" | tail -1)
|
||||
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.28"$'\n'"${host_glibc_version}" | tail -1)
|
||||
if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then
|
||||
higher_glibc_version=$(sort -Vu <<<"2.27"$'\n'"${host_glibc_version}" | tail -1)
|
||||
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.27"$'\n'"${host_glibc_version}" | tail -1)
|
||||
if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then
|
||||
higher_glibc_version=$(sort -Vu <<<"2.17"$'\n'"${host_glibc_version}" | tail -1)
|
||||
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"2.17"$'\n'"${host_glibc_version}" | tail -1)
|
||||
if [[ "${higher_glibc_version}" != "${host_glibc_version}" ]]; then
|
||||
incompat_tools+=("${glibc_pre_2_17_incompat[@]}")
|
||||
else
|
||||
|
||||
@@ -18,7 +18,7 @@ spdx = "0.10"
|
||||
tar = "0.4"
|
||||
toml_edit = { version = "0.22", default-features = false, features = ["parse", "serde"] }
|
||||
# TODO: call curl command instead of using ureq?
|
||||
ureq = { version = "2", features = ["json"] }
|
||||
ureq = { version = "3", features = ["json"] }
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
14
tools/codegen/base/parse-dockerfile.json
Normal file
14
tools/codegen/base/parse-dockerfile.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"repository": "https://github.com/taiki-e/parse-dockerfile",
|
||||
"tag_prefix": "v",
|
||||
"rust_crate": "${package}",
|
||||
"asset_name": "${package}-${rust_target}.tar.gz",
|
||||
"platform": {
|
||||
"x86_64_linux_musl": {},
|
||||
"x86_64_macos": {},
|
||||
"x86_64_windows": {},
|
||||
"aarch64_linux_musl": {},
|
||||
"aarch64_macos": {},
|
||||
"aarch64_windows": {}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ use install_action_internal_codegen::{
|
||||
};
|
||||
use sha2::{Digest as _, Sha256};
|
||||
use spdx::expression::{ExprNode, ExpressionReq, Operator};
|
||||
use ureq::http::header;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let args: Vec<_> = env::args().skip(1).collect();
|
||||
@@ -52,7 +53,7 @@ fn main() -> Result<()> {
|
||||
|
||||
eprintln!("downloading metadata from https://api.github.com/repos/{repo}");
|
||||
let repo_info: github::RepoMetadata =
|
||||
download(&format!("https://api.github.com/repos/{repo}"))?.into_json()?;
|
||||
download(&format!("https://api.github.com/repos/{repo}"))?.body_mut().read_json()?;
|
||||
|
||||
eprintln!("downloading releases from https://api.github.com/repos/{repo}/releases");
|
||||
let mut releases: github::Releases = vec![];
|
||||
@@ -63,7 +64,8 @@ fn main() -> Result<()> {
|
||||
let mut r: github::Releases = download(&format!(
|
||||
"https://api.github.com/repos/{repo}/releases?per_page={per_page}&page={page}"
|
||||
))?
|
||||
.into_json()?;
|
||||
.body_mut()
|
||||
.read_json()?;
|
||||
// If version_req is latest, it is usually sufficient to look at the latest 100 releases.
|
||||
if r.len() < per_page || version_req.is_some_and(|req| req == "latest") {
|
||||
releases.append(&mut r);
|
||||
@@ -98,11 +100,13 @@ fn main() -> Result<()> {
|
||||
if let Some(crate_name) = &base_info.rust_crate {
|
||||
eprintln!("downloading crate info from https://crates.io/api/v1/crates/{crate_name}");
|
||||
let info = download(&format!("https://crates.io/api/v1/crates/{crate_name}"))?
|
||||
.into_json::<crates_io::Crate>()?;
|
||||
.body_mut()
|
||||
.read_json::<crates_io::Crate>()?;
|
||||
let latest_version = &info.versions[0].num;
|
||||
crates_io_version_detail = Some(
|
||||
download(&format!("https://crates.io/api/v1/crates/{crate_name}/{latest_version}"))?
|
||||
.into_json::<crates_io::VersionMetadata>()?
|
||||
.body_mut()
|
||||
.read_json::<crates_io::VersionMetadata>()?
|
||||
.version,
|
||||
);
|
||||
|
||||
@@ -248,7 +252,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;
|
||||
@@ -292,8 +296,13 @@ fn main() -> Result<()> {
|
||||
Path::new(&url).file_name().unwrap().to_str().unwrap()
|
||||
));
|
||||
let response = download(&url)?;
|
||||
let etag =
|
||||
response.header("etag").expect("binary should have an etag").replace('\"', "");
|
||||
let etag = response
|
||||
.headers()
|
||||
.get("etag")
|
||||
.expect("binary should have an etag")
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.replace('\"', "");
|
||||
|
||||
if let Some(ManifestRef::Real(ref manifest)) = existing_manifest {
|
||||
if let Some(entry) = manifest.download_info.get(&platform) {
|
||||
@@ -312,7 +321,7 @@ fn main() -> Result<()> {
|
||||
eprintln!("already downloaded");
|
||||
fs::File::open(download_cache)?.read_to_end(&mut buf)?;
|
||||
} else {
|
||||
response.into_reader().read_to_end(&mut buf)?;
|
||||
response.into_body().into_reader().read_to_end(&mut buf)?;
|
||||
eprintln!("download complete");
|
||||
fs::write(download_cache, &buf)?;
|
||||
}
|
||||
@@ -335,7 +344,7 @@ fn main() -> Result<()> {
|
||||
eprintln!("already downloaded");
|
||||
minisign_verify::Signature::from_file(sig_download_cache)?
|
||||
} else {
|
||||
let buf = download(&url)?.into_string()?;
|
||||
let buf = download(&url)?.body_mut().read_to_string()?;
|
||||
eprintln!("download complete");
|
||||
fs::write(sig_download_cache, &buf)?;
|
||||
minisign_verify::Signature::decode(&buf)?
|
||||
@@ -353,7 +362,7 @@ fn main() -> Result<()> {
|
||||
if crate_download_cache.is_file() {
|
||||
eprintln!("already downloaded");
|
||||
} else {
|
||||
download(&url)?.into_reader().read_to_end(&mut buf2)?;
|
||||
download(&url)?.into_body().into_reader().read_to_end(&mut buf2)?;
|
||||
let hash = Sha256::digest(&buf2);
|
||||
if format!("{hash:x}") != v.checksum {
|
||||
bail!("checksum mismatch for {url}");
|
||||
@@ -682,7 +691,7 @@ static GITHUB_TOKENS: LazyLock<GitHubTokens> = LazyLock::new(|| {
|
||||
}
|
||||
});
|
||||
|
||||
fn download(url: &str) -> Result<ureq::Response> {
|
||||
fn download(url: &str) -> Result<ureq::http::Response<ureq::Body>> {
|
||||
let mut token = GITHUB_TOKENS.get(url);
|
||||
let mut retry = 0;
|
||||
let mut retry_time = 0;
|
||||
@@ -694,7 +703,7 @@ fn download(url: &str) -> Result<ureq::Response> {
|
||||
loop {
|
||||
let mut req = ureq::get(url);
|
||||
if let Some(token) = &token {
|
||||
req = req.set("Authorization", &format!("Bearer {token}"));
|
||||
req = req.header(header::AUTHORIZATION, &format!("Bearer {token}"));
|
||||
}
|
||||
match req.call() {
|
||||
Ok(res) => return Ok(res),
|
||||
@@ -730,12 +739,12 @@ fn github_head(url: &str) -> Result<()> {
|
||||
loop {
|
||||
let mut req = ureq::head(url);
|
||||
if let Some(token) = &token {
|
||||
req = req.set("Authorization", &format!("Bearer {token}"));
|
||||
req = req.header(header::AUTHORIZATION, &format!("Bearer {token}"));
|
||||
}
|
||||
match req.call() {
|
||||
Ok(_) => return Ok(()),
|
||||
// rate limit
|
||||
Err(e @ ureq::Error::Status(403, _)) => last_error = Some(e),
|
||||
Err(e @ ureq::Error::StatusCode(403)) => last_error = Some(e),
|
||||
Err(e) => return Err(e.into()),
|
||||
}
|
||||
retry_time += 1;
|
||||
|
||||
@@ -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
|
||||
|
||||
1209
tools/tidy.sh
1209
tools/tidy.sh
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user