Compare commits

...

3 Commits

Author SHA1 Message Date
Taiki Endo
99774fec7f Release 2.32.17 2024-04-13 21:34:01 +09:00
Taiki Endo
c009cf7230 Simplify *_install helpers 2024-04-13 21:29:09 +09:00
Taiki Endo
4c0366722b Update cargo-tarpaulin@latest to 0.28.0 2024-04-13 21:12:48 +09:00
3 changed files with 39 additions and 27 deletions

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]
## [2.32.17] - 2024-04-13
- Update `cargo-tarpaulin@latest` to 0.28.0.
## [2.32.16] - 2024-04-13
- Update `typos@latest` to 1.20.8.
@@ -2053,7 +2057,8 @@ Note: This release is considered a breaking change because installing on version
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.32.16...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.32.17...HEAD
[2.32.17]: https://github.com/taiki-e/install-action/compare/v2.32.16...v2.32.17
[2.32.16]: https://github.com/taiki-e/install-action/compare/v2.32.15...v2.32.16
[2.32.15]: https://github.com/taiki-e/install-action/compare/v2.32.14...v2.32.15
[2.32.14]: https://github.com/taiki-e/install-action/compare/v2.32.13...v2.32.14

37
main.sh
View File

@@ -31,6 +31,13 @@ warn() {
info() {
echo "info: $*"
}
_sudo() {
if type -P sudo &>/dev/null; then
sudo "$@"
else
"$@"
fi
}
download_and_checksum() {
local url="$1"
local checksum="$2"
@@ -289,36 +296,20 @@ install_cargo_binstall() {
fi
}
apt_update() {
if type -P sudo &>/dev/null; then
retry sudo apt-get -o Acquire::Retries=10 -qq update
else
retry apt-get -o Acquire::Retries=10 -qq update
fi
retry _sudo apt-get -o Acquire::Retries=10 -qq update
apt_updated=1
}
apt_install() {
if [[ -z "${apt_updated:-}" ]]; then
apt_update
fi
if type -P sudo &>/dev/null; then
retry sudo apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends "$@"
else
retry apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends "$@"
fi
retry _sudo apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends "$@"
}
apt_remove() {
if type -P sudo &>/dev/null; then
sudo apt-get -qq -o Dpkg::Use-Pty=0 remove -y "$@"
else
apt-get -qq -o Dpkg::Use-Pty=0 remove -y "$@"
fi
_sudo apt-get -qq -o Dpkg::Use-Pty=0 remove -y "$@"
}
snap_install() {
if type -P sudo &>/dev/null; then
retry sudo snap install "$@"
else
retry snap install "$@"
fi
retry _sudo snap install "$@"
}
apk_install() {
if type -P sudo &>/dev/null; then
@@ -330,11 +321,7 @@ apk_install() {
fi
}
dnf_install() {
if type -P sudo &>/dev/null; then
retry sudo "${dnf}" install -y "$@"
else
retry "${dnf}" install -y "$@"
fi
retry _sudo "${dnf}" install -y "$@"
}
sys_install() {
case "${base_distro}" in

View File

@@ -18,7 +18,27 @@
}
},
"latest": {
"version": "0.27.3"
"version": "0.28.0"
},
"0.28": {
"version": "0.28.0"
},
"0.28.0": {
"x86_64_linux_musl": {
"checksum": "c86810ef9638219f70db16e9e272584b1365c2edfb63fe0e03f7254954c0a717"
},
"x86_64_macos": {
"checksum": "6bc2f349c837042fc90b3841d9ff5e657c7f5d9ebb2a15a4ba70ab5040587bf7"
},
"x86_64_windows": {
"checksum": "6ae64d9ebb91fe26bd8e2cb61c0a3604c0aa53c080d99921cc95d05d31e866f9"
},
"aarch64_linux_musl": {
"checksum": "6c023e176798e78c81cc4ba15d66c5f4f4f21c8000e69d469075b5927a1a8644"
},
"aarch64_macos": {
"checksum": "b2fee8ce9cb93cab5b467459cf4b63dd80ea372dac36c98fccc35660dd454fd5"
}
},
"0.27": {
"version": "0.27.3"