diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5be73db0..20ec8586 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,7 +70,7 @@ jobs: strategy: matrix: version: [ 20, 22, 24, 25 ] - os: [ "fedora:41", "amazonlinux:2023", "rockylinux:9", "rockylinux:8", "redhat/ubi9:latest" ] + os: [ "fedora:41", "amazonlinux:2023", "rockylinux:9", "rockylinux:8", "redhat/ubi9:latest", "tencentos/tencentos4:latest" ] container: image: ${{ matrix.os }} defaults: @@ -126,7 +126,7 @@ jobs: strategy: matrix: version: [ 20, 22, 24, 25] - os: [ "rockylinux:9-minimal", "rockylinux:8-minimal", "redhat/ubi9-minimal:latest" ] + os: [ "rockylinux:9-minimal", "rockylinux:8-minimal", "redhat/ubi9-minimal:latest", "tencentos/tencentos4-minimal:latest", "opencloudos/opencloudos9-minimal:latest" ] container: image: ${{ matrix.os }} defaults: diff --git a/scripts/rpm/script_generator/base_script.sh b/scripts/rpm/script_generator/base_script.sh index 7971a73d..5ebd2f68 100644 --- a/scripts/rpm/script_generator/base_script.sh +++ b/scripts/rpm/script_generator/base_script.sh @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_16.x b/scripts/rpm/setup_16.x index 82a0817f..c57aa4d2 100755 --- a/scripts/rpm/setup_16.x +++ b/scripts/rpm/setup_16.x @@ -66,11 +66,11 @@ print_bold \ Use the installation script that corresponds to the version of Node.js you wish to install. e.g. - * ${red}https://rpm.nodesource.com/setup_16.x — Node.js 16 \"Gallium\" ${bold}(deprecated)${normal} - * ${green}https://rpm.nodesource.com/setup_18.x — Node.js 18 \"Hydrogen\" (Maintenance)${normal} - * ${red}https://rpm.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\" ${bold}(deprecated)${normal} - * ${bold}${green}https://rpm.nodesource.com/setup_20.x — Node.js 20 LTS \"Iron\" (recommended)${normal} - * ${green}https://rpm.nodesource.com/setup_21.x — Node.js 21 \"Iron\" (current)${normal} + * ${red}https://rpm.nodesource.com/setup_16.x - Node.js 16 \"Gallium\" ${bold}(deprecated)${normal} + * ${green}https://rpm.nodesource.com/setup_18.x - Node.js 18 \"Hydrogen\" (Maintenance)${normal} + * ${red}https://rpm.nodesource.com/setup_19.x - Node.js 19 \"Nineteen\" ${bold}(deprecated)${normal} + * ${bold}${green}https://rpm.nodesource.com/setup_20.x - Node.js 20 LTS \"Iron\" (recommended)${normal} + * ${green}https://rpm.nodesource.com/setup_21.x - Node.js 21 \"Iron\" (current)${normal} @@ -104,7 +104,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi node_deprecation_warning diff --git a/scripts/rpm/setup_18.x b/scripts/rpm/setup_18.x index fe8b3ee5..2b1be9b1 100755 --- a/scripts/rpm/setup_18.x +++ b/scripts/rpm/setup_18.x @@ -58,7 +58,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_20.x b/scripts/rpm/setup_20.x index 55c7a438..93fa142b 100755 --- a/scripts/rpm/setup_20.x +++ b/scripts/rpm/setup_20.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_21.x b/scripts/rpm/setup_21.x index 1b759296..da94f059 100755 --- a/scripts/rpm/setup_21.x +++ b/scripts/rpm/setup_21.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_22.x b/scripts/rpm/setup_22.x index dc3fe43e..ac1dbe65 100755 --- a/scripts/rpm/setup_22.x +++ b/scripts/rpm/setup_22.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_23.x b/scripts/rpm/setup_23.x index f30fa5da..580669a7 100755 --- a/scripts/rpm/setup_23.x +++ b/scripts/rpm/setup_23.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_24.x b/scripts/rpm/setup_24.x index 98112b59..ee45d878 100755 --- a/scripts/rpm/setup_24.x +++ b/scripts/rpm/setup_24.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_25.x b/scripts/rpm/setup_25.x index 95bc3bd8..2b085d97 100755 --- a/scripts/rpm/setup_25.x +++ b/scripts/rpm/setup_25.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_current.x b/scripts/rpm/setup_current.x index 95bc3bd8..2b085d97 100755 --- a/scripts/rpm/setup_current.x +++ b/scripts/rpm/setup_current.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi diff --git a/scripts/rpm/setup_lts.x b/scripts/rpm/setup_lts.x index 98112b59..ee45d878 100755 --- a/scripts/rpm/setup_lts.x +++ b/scripts/rpm/setup_lts.x @@ -32,7 +32,10 @@ command_exists() { } # Check if we are on an RPM-based system -if ! [ -f /etc/redhat-release ] && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null; then +if ! [ -f /etc/redhat-release ] \ + && ! grep -q "Amazon Linux" /etc/system-release 2>/dev/null \ + && ! grep -qi "TencentOS" /etc/system-release 2>/dev/null \ + && ! grep -qi "OpenCloudOS" /etc/system-release 2>/dev/null; then handle_error 1 "This script is intended for RPM-based systems. Please run it on an RPM-based system." fi