Compare commits

...

4 Commits

Author SHA1 Message Date
Taiki Endo
36ef4183e0 Release 2.59.0 2025-09-06 01:59:41 +09:00
Taiki Endo
f8160e318c Update changelog 2025-09-06 01:47:59 +09:00
Taiki Endo
ed177b998a Clean up alias-related code 2025-09-06 01:46:45 +09:00
arctic-alpaca
9d712fde38 Add taplo-cli alias (#1128) 2025-09-06 01:37:07 +09:00
4 changed files with 39 additions and 8 deletions

View File

@@ -141,6 +141,26 @@ jobs:
fi fi
if: matrix.bash != 'cygwin' && matrix.os != 'windows-11-arm' if: matrix.bash != 'cygwin' && matrix.os != 'windows-11-arm'
test-alias:
runs-on: ubuntu-latest
timeout-minutes: 60
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: env
- uses: ./
with:
tool: nextest,taplo-cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test bash
run: cargo-nextest nextest --version && taplo --version
shell: bash
- name: Test sh
run: cargo-nextest nextest --version && taplo --version
shell: sh
test-container: test-container:
strategy: strategy:
fail-fast: false fail-fast: false

View File

@@ -10,6 +10,10 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased] ## [Unreleased]
## [2.59.0] - 2025-09-05
- Accept `taplo-cli` as an alias for `taplo`. ([#1128](https://github.com/taiki-e/install-action/pull/1128), thanks @arctic-alpaca)
## [2.58.33] - 2025-09-05 ## [2.58.33] - 2025-09-05
- Update `wasm-bindgen@latest` to 0.2.101. - Update `wasm-bindgen@latest` to 0.2.101.
@@ -4404,7 +4408,8 @@ Note: This release is considered a breaking change because installing on version
Initial release Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.58.33...HEAD [Unreleased]: https://github.com/taiki-e/install-action/compare/v2.59.0...HEAD
[2.59.0]: https://github.com/taiki-e/install-action/compare/v2.58.33...v2.59.0
[2.58.33]: https://github.com/taiki-e/install-action/compare/v2.58.32...v2.58.33 [2.58.33]: https://github.com/taiki-e/install-action/compare/v2.58.32...v2.58.33
[2.58.32]: https://github.com/taiki-e/install-action/compare/v2.58.31...v2.58.32 [2.58.32]: https://github.com/taiki-e/install-action/compare/v2.58.31...v2.58.32
[2.58.31]: https://github.com/taiki-e/install-action/compare/v2.58.30...v2.58.31 [2.58.31]: https://github.com/taiki-e/install-action/compare/v2.58.30...v2.58.31

10
main.sh
View File

@@ -219,7 +219,7 @@ read_manifest() {
if [[ "${rust_crate}" != "null" ]]; then if [[ "${rust_crate}" != "null" ]]; then
# TODO: don't hardcode tool name and use 'immediate_yank_reflection' field in base manifest. # TODO: don't hardcode tool name and use 'immediate_yank_reflection' field in base manifest.
case "${tool}" in case "${tool}" in
cargo-nextest | nextest) cargo-nextest)
crate_info=$(curl -v --user-agent "${ACTION_USER_AGENT}" --proto '=https' --tlsv1.2 -fsSL --retry 10 "https://crates.io/api/v1/crates/${rust_crate}" || true) crate_info=$(curl -v --user-agent "${ACTION_USER_AGENT}" --proto '=https' --tlsv1.2 -fsSL --retry 10 "https://crates.io/api/v1/crates/${rust_crate}" || true)
if [[ -n "${crate_info}" ]]; then if [[ -n "${crate_info}" ]]; then
while true; do while true; do
@@ -258,7 +258,7 @@ read_manifest() {
elif [[ "${host_env}" == "gnu" ]]; then elif [[ "${host_env}" == "gnu" ]]; then
# TODO: don't hardcode tool name and use 'prefer_linux_gnu' field in base manifest. # TODO: don't hardcode tool name and use 'prefer_linux_gnu' field in base manifest.
case "${tool}" in case "${tool}" in
cargo-nextest | nextest) cargo-nextest)
# TODO: don't hardcode required glibc version # TODO: don't hardcode required glibc version
required_glibc_version=2.27 required_glibc_version=2.27
higher_glibc_version=$(LC_ALL=C sort -Vu <<<"${required_glibc_version}"$'\n'"${host_glibc_version}" | tail -1) higher_glibc_version=$(LC_ALL=C sort -Vu <<<"${required_glibc_version}"$'\n'"${host_glibc_version}" | tail -1)
@@ -743,9 +743,11 @@ for tool in "${tools[@]}"; do
continue continue
;; ;;
*) *)
# Handle aliases # Handle aliases.
# NB: Update alias list in tools/publish.rs.
case "${tool}" in case "${tool}" in
cargo-nextest | nextest) tool=cargo-nextest ;; nextest) tool=cargo-nextest ;;
taplo-cli) tool=taplo ;;
esac esac
# Use cargo-binstall fallback if tool is not available. # Use cargo-binstall fallback if tool is not available.

View File

@@ -133,9 +133,13 @@ for tool in tools/codegen/base/*.json; do
tool="${tool##*/}" tool="${tool##*/}"
tools+=("${tool%.*}") tools+=("${tool%.*}")
done done
# Alias # Aliases.
tools+=(nextest) # NB: Update case for aliases in main.rs.
# Not manifest-based tools+=(
nextest
taplo-cli
)
# Non-manifest-based tools.
tools+=(valgrind) tools+=(valgrind)
for tool in "${tools[@]}"; do for tool in "${tools[@]}"; do