Relax jq version requirement to 1.3

This commit is contained in:
Taiki Endo
2024-09-03 23:05:33 +09:00
parent 49249f98b2
commit e84c329a30
5 changed files with 9 additions and 24 deletions

View File

@@ -22,7 +22,6 @@ nextest
pluginconf
protoc
pwsh
QQSTRING
quickinstall
rclone
rdme

View File

@@ -147,18 +147,7 @@ jobs:
timeout-minutes: 60
container: ${{ matrix.container }}
steps:
- name: Install requirements (ubuntu:14.04)
run: |
set -CeEuxo pipefail
# ubuntu 14.04's jq is 1.3
# error: syntax error, unexpected QQSTRING_START, expecting $end
# https://github.com/jqlang/jq/issues/273
apt-get -o Acquire::Retries=10 -qq update
apt-get -o Acquire::Retries=10 -o Dpkg::Use-Pty=0 install -y --no-install-recommends ca-certificates curl
curl --proto '=https' --tlsv1.2 -fsSL --retry 10 -o /usr/local/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux64
chmod +x /usr/local/bin/jq
if: startsWith(matrix.container, 'ubuntu:14.04')
- name: Install requirements (debian:9)
- name: Install requirements (old debian)
run: |
set -CeEuxo pipefail
# In Debian, the old repositories is removed from the main mirrors some time after EoL.
@@ -182,12 +171,7 @@ jobs:
./configure --prefix=/usr/local --with-ssl
make
make install
# CentOS 6's jq is 1.3
# error: syntax error, unexpected QQSTRING_START, expecting $end
# https://github.com/jqlang/jq/issues/273
curl --proto '=https' --tlsv1.2 -fsSL --retry 10 -o /usr/local/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.5/jq-linux64
chmod +x /usr/local/bin/jq
# for checkout-action https://github.com/taiki-e/checkout-action/blob/87380fc33ed8e04e325b05d3576995b2253ab5ba/.github/workflows/ci.yml#L134-L142
# for checkout-action https://github.com/taiki-e/checkout-action/blob/v1.3.0/.github/workflows/ci.yml#L135-L143
yum install -y openssh-clients perl perl-Error perl-TermReadKey rsync
rpm -i \
https://vault.ius.io/el6/x86_64/packages/p/perl-Git18-1.8.5.5-4.ius.el6.noarch.rpm \

View File

@@ -12,6 +12,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
- Update `typos@latest` to 1.24.3.
- Relax jq version requirement for containers and self-hosted runners to 1.3 (no longer need to install the newer version of jq when using this action on Ubuntu 14.04/CentOS 6).
## [2.42.37] - 2024-08-30
- Update `cargo-make@latest` to 0.37.16.

View File

@@ -116,10 +116,10 @@ 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.5+
- jq 1.3+
- 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 jq 1.3, and Ubuntu 14.04 (EoL on 2019-04) using jq 1.3 (see "Install requirements" in [our CI config](https://github.com/taiki-e/install-action/blob/HEAD/.github/workflows/ci.yml) for example of workaround).
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).
## Related Projects

View File

@@ -187,7 +187,7 @@ read_manifest() {
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")
manifest=$(call_jq -r ".[\"${version}\"]" "${manifest_dir}/${tool}.json")
if [[ "${manifest}" == "null" ]]; then
download_info="null"
return 0
@@ -196,7 +196,7 @@ read_manifest() {
if [[ "${exact_version}" == "null" ]]; then
exact_version="${version}"
else
manifest=$(call_jq -r ".\"${exact_version}\"" "${manifest_dir}/${tool}.json")
manifest=$(call_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
@@ -213,7 +213,7 @@ read_manifest() {
fi
info "${tool}@${exact_version} is yanked; downgrade to ${previous_stable_version}"
exact_version="${previous_stable_version}"
manifest=$(jq -r ".\"${exact_version}\"" "${manifest_dir}/${tool}.json")
manifest=$(jq -r ".[\"${exact_version}\"]" "${manifest_dir}/${tool}.json")
done
;;
esac