Compare commits

...

16 Commits

Author SHA1 Message Date
Taiki Endo
a779dafd49 Release 2.47.6 2025-01-03 12:22:08 +09:00
Taiki Endo
2a650b8687 Update typos@latest to 1.29.3 2025-01-03 06:13:25 +09:00
Taiki Endo
656b4969d3 Release 2.47.5 2025-01-03 01:17:30 +09:00
Taiki Endo
52b84660a3 Update typos@latest to 1.29.1 2025-01-03 01:00:37 +09:00
Taiki Endo
84ccb7b697 ci: Clean up scripts 2025-01-03 00:54:42 +09:00
Taiki Endo
63d5217a35 ci: Test windows-2025 2025-01-03 00:50:49 +09:00
Taiki Endo
cf1be1a00f Release 2.47.4 2025-01-03 00:39:03 +09:00
Taiki Endo
444e3608dd Update xh@latest to 0.23.1 2025-01-02 21:15:31 +09:00
Taiki Endo
716fb8f756 Release 2.47.3 2025-01-02 13:08:16 +09:00
Taiki Endo
870e4de1b5 Update knope@latest to 0.18.2 2025-01-02 12:56:50 +09:00
Taiki Endo
dbc32cd892 Release 2.47.2 2025-01-01 03:16:54 +09:00
Taiki Endo
82750cbcb9 Update typos@latest to 1.29.0 2025-01-01 03:15:13 +09:00
Taiki Endo
77b010ce78 Release 2.47.1 2024-12-31 21:16:18 +09:00
Taiki Endo
00beeed3bd Update cargo-tarpaulin@latest to 0.31.4 2024-12-31 21:15:34 +09:00
Taiki Endo
3ab44cd9ab Update cargo-binstall@latest to 1.10.18 2024-12-28 15:13:22 +09:00
Taiki Endo
8cec5c3000 codegen: Ignore clippy::literal_string_with_formatting_args lint
```
error: this looks like a formatting argument but it is not part of a formatting macro
   --> tools/codegen/src/main.rs:142:65
    |
142 | ...                   d.url = Some(template.url.replace("${version}", version));
    |                                                           ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args
    = note: `-D clippy::literal-string-with-formatting-args` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::literal_string_with_formatting_args)]`

error: this looks like a formatting argument but it is not part of a formatting macro
   --> tools/codegen/src/main.rs:146:64
    |
146 | ...                   .map(|s| s.map(|s| s.replace("${version}", version)));
    |                                                      ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args

error: this looks like a formatting argument but it is not part of a formatting macro
   --> tools/codegen/src/main.rs:567:73
    |
567 |             let template_url = d.url.take().unwrap().replace(version, "${version}");
    |                                                                         ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args

error: this looks like a formatting argument but it is not part of a formatting macro
   --> tools/codegen/src/main.rs:568:84
    |
568 |             let template_bin = d.bin.take().map(|s| s.map(|s| s.replace(version, "${version}")));
    |                                                                                    ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args

error: this looks like a formatting argument but it is not part of a formatting macro
   --> tools/codegen/src/main.rs:615:29
    |
615 |     let mut s = s.replace("${package}", package).replace("${tool}", package);
    |                             ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args

error: this looks like a formatting argument but it is not part of a formatting macro
   --> tools/codegen/src/main.rs:625:25
    |
625 |         s = s.replace("${version}", version);
    |                         ^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#literal_string_with_formatting_args
```
2024-12-27 10:57:03 +09:00
12 changed files with 230 additions and 48 deletions

View File

@@ -24,6 +24,7 @@ protoc
pwsh
quickinstall
rclone
rootfs
sccache
syft
udeps

View File

@@ -25,7 +25,7 @@ env:
defaults:
run:
shell: bash
shell: bash --noprofile --norc -CeEuxo pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -68,6 +68,11 @@ jobs:
bash: msys64
- os: windows-2022
bash: cygwin
- os: windows-2025
- os: windows-2025
bash: msys64
- os: windows-2025
bash: cygwin
- os: windows-2022
tool: major.minor.patch
- os: windows-2022
@@ -79,7 +84,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
# cross attempts to install rust-src when Cargo.toml is available even if `cross --version`
- run: rm Cargo.toml
- run: rm -- Cargo.toml
- name: Generate tool list
id: tool-list
run: tools/ci/tool-list.sh "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.bash }}" >>"${GITHUB_OUTPUT}"
@@ -154,13 +159,13 @@ jobs:
- opensuse/tumbleweed:latest # glibc 2.39 (as of 2024-07-19)
- archlinux:latest # glibc 2.39 (as of 2024-07-19)
- alpine:latest # musl 1.2.5 (as of alpine 3.20)
# - openwrt/rootfs:x86-64-openwrt-24.10 # musl 1.2.5
runs-on: ubuntu-latest
timeout-minutes: 60
container: ${{ matrix.container }}
steps:
- name: Install requirements (old debian)
run: |
set -CeEuxo pipefail
# In Debian, the old repositories is removed from the main mirrors some time after EoL.
sed -i /etc/apt/sources.list -e 's/deb.debian.org/archive.debian.org/g' \
-e 's|security.debian.org|archive.debian.org/|g' \
@@ -168,7 +173,6 @@ jobs:
if: startsWith(matrix.container, 'debian:9')
- name: Install requirements (centos)
run: |
set -CeEuxo pipefail
# In CentOS, the old repositories is removed from the main mirrors just after EoL.
# https://github.com/rust-lang/rust/pull/126352
sed -i /etc/yum.repos.d/*.repo -e 's!^mirrorlist!#mirrorlist!' \
@@ -191,7 +195,7 @@ jobs:
if: startsWith(matrix.container, 'centos')
- uses: taiki-e/checkout-action@v1
# cross attempts to install rust-src when Cargo.toml is available even if `cross --version`
- run: rm Cargo.toml
- run: rm -- Cargo.toml
- name: Generate tool list
id: tool-list
run: tools/ci/tool-list.sh >>"${GITHUB_OUTPUT}"
@@ -204,6 +208,16 @@ jobs:
tool: ${{ steps.tool-list.outputs.tool }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test bash
run: just --version && shfmt --version
shell: bash
# TODO: OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown
if: (!startsWith(matrix.container, 'opensuse'))
- name: Test sh
run: just --version && shfmt --version
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

View File

@@ -10,7 +10,7 @@ on:
defaults:
run:
shell: bash
shell: bash --noprofile --norc -CeEuxo pipefail {0}
jobs:
create-release:

View File

@@ -10,6 +10,32 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [2.47.6] - 2025-01-03
- Update `typos@latest` to 1.29.3.
## [2.47.5] - 2025-01-02
- Update `typos@latest` to 1.29.1.
## [2.47.4] - 2025-01-02
- Update `xh@latest` to 0.23.1.
## [2.47.3] - 2025-01-02
- Update `knope@latest` to 0.18.2.
## [2.47.2] - 2024-12-31
- Update `typos@latest` to 1.29.0.
## [2.47.1] - 2024-12-31
- Update `cargo-tarpaulin@latest` to 0.31.4.
- Update `cargo-binstall@latest` to 1.10.18.
## [2.47.0] - 2024-12-27
- Support `wash`. ([#794](https://github.com/taiki-e/install-action/pull/794), thanks @joonas)
@@ -3264,7 +3290,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.0...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.47.6...HEAD
[2.47.6]: https://github.com/taiki-e/install-action/compare/v2.47.5...v2.47.6
[2.47.5]: https://github.com/taiki-e/install-action/compare/v2.47.4...v2.47.5
[2.47.4]: https://github.com/taiki-e/install-action/compare/v2.47.3...v2.47.4
[2.47.3]: https://github.com/taiki-e/install-action/compare/v2.47.2...v2.47.3
[2.47.2]: https://github.com/taiki-e/install-action/compare/v2.47.1...v2.47.2
[2.47.1]: https://github.com/taiki-e/install-action/compare/v2.47.0...v2.47.1
[2.47.0]: https://github.com/taiki-e/install-action/compare/v2.46.20...v2.47.0
[2.46.20]: https://github.com/taiki-e/install-action/compare/v2.46.19...v2.46.20
[2.46.19]: https://github.com/taiki-e/install-action/compare/v2.46.18...v2.46.19

View File

@@ -22,32 +22,32 @@
},
"license_markdown": "[GPL-3.0](https://github.com/cargo-bins/cargo-binstall/blob/HEAD/crates/bin/LICENSE)",
"latest": {
"version": "1.10.17"
"version": "1.10.18"
},
"1.10.17": {
"1.10.18": {
"x86_64_linux_musl": {
"etag": "0x8DD1C1188E2154D",
"checksum": "d073d4e8901e176b0f625845f9a0bbd926a063017991d7cc0c863e6b884d2d59"
"etag": "0x8DD2701DB5E5F3C",
"checksum": "3cee9a0e3074a9ed397b33de8d6f73c1bc591a041af3b57c4e9f5aa9939a5c21"
},
"x86_64_macos": {
"etag": "0x8DD1C1106A79811",
"checksum": "16d557e8ea929d3ff310e7a3958a2d3b8c7d88005709dc46aebe57e4675d4be7"
"etag": "0x8DD270174067A5B",
"checksum": "7ae2edf8c057b4da57374de604047125d6ffcff36c13e1481912707c016245c1"
},
"x86_64_windows": {
"etag": "0x8DD1C1262D55EBB",
"checksum": "3866b6c93534147c2382b2360b6d84681b3ff7ef623919d9bd08e53817df8c50"
"etag": "0x8DD27029B083B68",
"checksum": "b0fde17b48f0a43b57d218388e58ce89689b3b91d8e272500ed85789656510b5"
},
"aarch64_linux_musl": {
"etag": "0x8DD1C111D1C3CE8",
"checksum": "7250d4973167bbb0633773af98351fda151e7077efd0b582c149916d409dec75"
"etag": "0x8DD270186728539",
"checksum": "f9d1c2cc5f703eebf4e15260298ac7d644dc25d5691b23413b2337da340787dc"
},
"aarch64_macos": {
"etag": "0x8DD1C115B3B3306",
"checksum": "81abb7de75ef130844bb58965bdb93969afadd0821cf5e1e1bd0517e48963199"
"etag": "0x8DD2701C1E5AD95",
"checksum": "cdd82130ba1c98ca4db63c44087881d6ae92ba642ba6361654987a707040aabd"
},
"aarch64_windows": {
"etag": "0x8DD1C1232EE4057",
"checksum": "c5ae6543a4b97372a163444468720984e41a6cd3eecd82fdf75c65528ec3f806"
"etag": "0x8DD270271851C1E",
"checksum": "e8c206865a9bac281e44939968f53d53c31c466f8b15e2cf7ac293c793a0da46"
}
}
}

View File

@@ -19,10 +19,32 @@
},
"license_markdown": "[MIT](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-MIT) OR [Apache-2.0](https://github.com/xd009642/tarpaulin/blob/develop/LICENSE-APACHE)",
"latest": {
"version": "0.31.3"
"version": "0.31.4"
},
"0.31": {
"version": "0.31.3"
"version": "0.31.4"
},
"0.31.4": {
"x86_64_linux_musl": {
"etag": "0x8DD2989345D8F62",
"checksum": "94a47da7a7a1e659c3f72d09e97e27962107d5cc9cb6c10f6725e1ed2ae2c145"
},
"x86_64_macos": {
"etag": "0x8DD2988DAFD48B6",
"checksum": "ea4eb1a57b259e6c7062790072e679dab78dea5e053141d67f5741805ba315e4"
},
"x86_64_windows": {
"etag": "0x8DD29894A932EA9",
"checksum": "10f7e7fe8bf81b9272ef983ff5d84c7c51c1492caca851234efbe093f01e246c"
},
"aarch64_linux_musl": {
"etag": "0x8DD2988FF72D12E",
"checksum": "1a646b57c6060c96c04c753aefa8f5696b6e97aa3ae1fb32a7239929f1245bbf"
},
"aarch64_macos": {
"etag": "0x8DD2988CB3EFCE4",
"checksum": "5214123555d1ccd3f5a3c7911e0556cb8d0a1161b645948dfa0ecc7a07b43357"
}
},
"0.31.3": {
"x86_64_linux_musl": {

30
manifests/knope.json generated
View File

@@ -3,10 +3,36 @@
"template": null,
"license_markdown": "[MIT](https://github.com/knope-dev/knope/blob/main/LICENSE)",
"latest": {
"version": "0.18.1"
"version": "0.18.2"
},
"0.18": {
"version": "0.18.1"
"version": "0.18.2"
},
"0.18.2": {
"x86_64_linux_musl": {
"url": "https://github.com/knope-dev/knope/releases/download/knope/v0.18.2/knope-x86_64-unknown-linux-musl.tgz",
"etag": "0x8DD2ACDFF5567F8",
"checksum": "c43e040643cc16f14a70444d79dcf4e9c4eaa896664f598005386637c2534e6f",
"bin": "knope-x86_64-unknown-linux-musl/knope"
},
"x86_64_macos": {
"url": "https://github.com/knope-dev/knope/releases/download/knope/v0.18.2/knope-x86_64-apple-darwin.tgz",
"etag": "0x8DD2ACDFF51C290",
"checksum": "f9cc757233467e192a0904f2e9c2ef5aa1a7e715235b98520af33fd986d115f2",
"bin": "knope-x86_64-apple-darwin/knope"
},
"x86_64_windows": {
"url": "https://github.com/knope-dev/knope/releases/download/knope/v0.18.2/knope-x86_64-pc-windows-msvc.tgz",
"etag": "0x8DD2ACDFF558EDB",
"checksum": "0e5775244e10a7e9de89be4f0f485e23bfa6c98ad008b85d54a1235b4e7bd123",
"bin": "knope-x86_64-pc-windows-msvc/knope.exe"
},
"aarch64_macos": {
"url": "https://github.com/knope-dev/knope/releases/download/knope/v0.18.2/knope-aarch64-apple-darwin.tgz",
"etag": "0x8DD2ACDFF4E6AFA",
"checksum": "ff35f72455a498e9a407b483c1d6ddb962f6ae31b1989db6dfc09e88da270b3b",
"bin": "knope-aarch64-apple-darwin/knope"
}
},
"0.18.1": {
"x86_64_linux_musl": {

61
manifests/typos.json generated
View File

@@ -16,10 +16,67 @@
},
"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.28.4"
"version": "1.29.3"
},
"1": {
"version": "1.28.4"
"version": "1.29.3"
},
"1.29": {
"version": "1.29.3"
},
"1.29.3": {
"x86_64_linux_musl": {
"etag": "0x8DD2B6BB018B914",
"checksum": "bf8f18721055483eae9420c424ae28fe11b8881278ac060e65566f3b65cdcfa8"
},
"x86_64_macos": {
"etag": "0x8DD2B6C237CC2A5",
"checksum": "5e5f52a23c36e4ff06194f690c874a52a8a07d113f2b906ad29424614057c1a5"
},
"x86_64_windows": {
"etag": "0x8DD2B6C6C818914",
"checksum": "462bf6b62a49c65860ae57a11c332f8dbaeaddc0384c5f5f8225af31c83dbd5b"
},
"aarch64_macos": {
"etag": "0x8DD2B6BF6D405F3",
"checksum": "fb1ad842dcd06a79048ff6a6d3be64e79729a9a14b954638d709f759431d6df6"
}
},
"1.29.1": {
"x86_64_linux_musl": {
"etag": "0x8DD2B44978440AE",
"checksum": "f4d9630c51bdf9398ebcd70bee485302eb14b9e4ddf1f8101deab8d30621ffda"
},
"x86_64_macos": {
"etag": "0x8DD2B44B0A26BB5",
"checksum": "33002029990b5645fe9a541fa321a2bb053894b776f57435b6a75ad1854ad007"
},
"x86_64_windows": {
"etag": "0x8DD2B4504BFD839",
"checksum": "35829b5ce8c5194aa3bdc93ccfe86b70555dffa6074174c85c21f5569361ce11"
},
"aarch64_macos": {
"etag": "0x8DD2B44B4B50C21",
"checksum": "264ceb033679b7a5c8d5647f3b1c0f0c5cdb8fbf0454dd83bdb94f2fd0e03d5e"
}
},
"1.29.0": {
"x86_64_linux_musl": {
"etag": "0x8DD29B260A3C957",
"checksum": "d936bdd241fd7e5cf30802ad60d942169f6e2f4197444824ccb8bd7bdebb1245"
},
"x86_64_macos": {
"etag": "0x8DD29B249212B90",
"checksum": "7ad39f41dc23e1c3c8470ba3f8c0c1457928c668af6552b07f74a77b65585515"
},
"x86_64_windows": {
"etag": "0x8DD29B2A7AF8080",
"checksum": "1216d4e9c353132045f53e84977003f8c29af8f1131045df5b69daf39ef02b48"
},
"aarch64_macos": {
"etag": "0x8DD29B27BAFFF8A",
"checksum": "a5e204a4b2c2cd920772a5404a425ad15a39793d6359340790e8ebeb5eb62b9a"
}
},
"1.28": {
"version": "1.28.4"

26
manifests/xh.json generated
View File

@@ -24,10 +24,32 @@
},
"license_markdown": "[MIT](https://github.com/ducaale/xh/blob/master/LICENSE)",
"latest": {
"version": "0.23.0"
"version": "0.23.1"
},
"0.23": {
"version": "0.23.0"
"version": "0.23.1"
},
"0.23.1": {
"x86_64_linux_musl": {
"etag": "0x8DD2B233BDE1B21",
"checksum": "a29ed6afcabf2c575c24499397fa3a840047dffc4a68e4a1a886f22584712946"
},
"x86_64_macos": {
"etag": "0x8DD2B2368C2662C",
"checksum": "e9e0f97e16095d2afb7e9247e6d250c95673dc3305a05539aafc2506ab59ad0a"
},
"x86_64_windows": {
"etag": "0x8DD2B2378B25C5D",
"checksum": "ea2da950b69c1093c1c2f7293fa1bc75cd7ae5719ff23397ee985bf1995a8014"
},
"aarch64_linux_musl": {
"etag": "0x8DD2B2336F9AF21",
"checksum": "52654b727a7a9dd712afaa40f4b6d3127079b9d95c24ee7a96e477941e5ca751"
},
"aarch64_macos": {
"etag": "0x8DD2B230558D457",
"checksum": "849841ce3c05cd64405d6282298869185a806b4f008ab5c6809fb8700e985f01"
}
},
"0.23.0": {
"x86_64_linux_musl": {

View File

@@ -1,11 +1,12 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0 OR MIT
set -eEuo pipefail
set -CeEuo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/../..
trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
cd -- "$(dirname -- "$0")"/../..
bail() {
echo >&2 "error: $*"
printf >&2 'error: %s\n' "$*"
exit 1
}
@@ -13,15 +14,17 @@ if [[ -z "${CI:-}" ]]; then
bail "this script is intended to call from release workflow on CI"
fi
git config user.name "Taiki Endo"
git config user.email "te316e89@gmail.com"
git config user.name 'Taiki Endo'
git config user.email 'te316e89@gmail.com'
set -x
has_update=''
for manifest in manifests/*.json; do
git add -N "${manifest}"
if ! git diff --exit-code -- "${manifest}"; then
name=$(basename "${manifest%.*}")
name="${manifest##*/}"
name="${name%.*}"
git stash
old_version=$(jq -r '.latest.version' "${manifest}")
git stash pop
@@ -29,7 +32,7 @@ for manifest in manifests/*.json; do
if [[ "${old_version}" != "${new_version}" ]]; then
# TODO: If there is a line about updating the same tool in the "Unreleased" section, replace it.
msg="Update \`${name}@latest\` to ${new_version}"
sed -i "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n- ${msg}./" CHANGELOG.md
sed -Ei "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n- ${msg}./" CHANGELOG.md
git add "${manifest}" CHANGELOG.md
else
msg="Update ${name} manifest"
@@ -40,6 +43,6 @@ for manifest in manifests/*.json; do
fi
done
if [[ -n "${has_update:-}" ]] && [[ -n "${GITHUB_OUTPUT:-}" ]]; then
echo "success=false" >>"${GITHUB_OUTPUT}"
if [[ -n "${has_update}" ]] && [[ -n "${GITHUB_OUTPUT:-}" ]]; then
printf 'success=false\n' >>"${GITHUB_OUTPUT}"
fi

View File

@@ -1,8 +1,9 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0 OR MIT
set -eEuo pipefail
set -CeEuo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/../..
trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
cd -- "$(dirname -- "$0")"/../..
# They don't provide prebuilt binaries for musl or old glibc host.
# version `GLIBC_2.34' not found
@@ -53,7 +54,7 @@ case "${1:-}" in
incompat_tools+=(valgrind cargo-binstall)
;;
*)
echo "tool=$1"
printf 'tool=%s\n', "$1"
exit 1
;;
esac
@@ -63,7 +64,7 @@ case "$(uname -s)" in
Linux)
host_os=linux
ldd_version=$(ldd --version 2>&1 || true)
if grep <<<"${ldd_version}" -q 'musl'; then
if grep -Fq musl <<<"${ldd_version}"; then
incompat_tools+=("${musl_incompat[@]}")
else
host_glibc_version=$(grep -E "GLIBC|GNU libc" <<<"${ldd_version}" | sed "s/.* //g")
@@ -92,7 +93,7 @@ case "$(uname -s)" in
fi
fi
fi
if ! type -P snap &>/dev/null; then
if ! type -P snap >/dev/null; then
incompat_tools+=(valgrind)
fi
;;
@@ -112,9 +113,10 @@ esac
tools=()
for manifest in tools/codegen/base/*.json; do
tool_name=$(basename "${manifest%.*}")
tool_name="${manifest##*/}"
tool_name="${tool_name%.*}"
# cross -V requires rustc
if [[ "${tool_name}" == "cross" ]] && ! type -P rustc &>/dev/null; then
if [[ "${tool_name}" == "cross" ]] && ! type -P rustc >/dev/null; then
continue
fi
case "${host_os}" in
@@ -133,7 +135,7 @@ for manifest in tools/codegen/base/*.json; do
done
if [[ -n "${tool_name}" ]]; then
if [[ "${version}" != "latest" ]]; then
latest_version=$(jq -r ".latest.version" "manifests/${tool_name}.json")
latest_version=$(jq -r '.latest.version' "manifests/${tool_name}.json")
case "${version}" in
major.minor.patch) tool_name+="@${latest_version}" ;;
major.minor) tool_name+="@${latest_version%.*}" ;;
@@ -159,7 +161,7 @@ case "${host_os}" in
linux*)
# Installing snap to container is difficult...
# Specifying the version of valgrind is not supported.
if type -P snap &>/dev/null && [[ "${version}" == "latest" ]]; then
if type -P snap >/dev/null && [[ "${version}" == "latest" ]]; then
tools+=(valgrind)
fi
;;
@@ -181,5 +183,5 @@ IFS=$'\n\t'
# TODO: inject random space before/after of tool name for testing https://github.com/taiki-e/install-action/issues/115.
IFS=','
echo "tool=${tools[*]}"
printf 'tool=%s\n' "${tools[*]}"
IFS=$'\n\t'

View File

@@ -137,6 +137,7 @@ fn main() -> Result<()> {
};
let version = &*k.0.to_string();
if let Some(template) = &manifests.template {
#[allow(clippy::literal_string_with_formatting_args)]
for (platform, d) in &mut manifest.download_info {
let template = &template.download_info[platform];
d.url = Some(template.url.replace("${version}", version));
@@ -563,6 +564,7 @@ fn main() -> Result<()> {
};
let version = &*version.0.to_string();
let t = template.as_mut().unwrap();
#[allow(clippy::literal_string_with_formatting_args)]
for (platform, d) in &mut manifest.download_info {
let template_url = d.url.take().unwrap().replace(version, "${version}");
let template_bin = d.bin.take().map(|s| s.map(|s| s.replace(version, "${version}")));
@@ -600,6 +602,7 @@ fn write_manifests(manifest_path: &Path, manifests: &Manifests) -> Result<()> {
Ok(())
}
#[allow(clippy::literal_string_with_formatting_args)]
fn replace_vars(
s: &str,
package: &str,