From a68120fc4ce4cbc72e5a2bf04b3258d84535d0e8 Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Fri, 5 Jan 2024 11:54:50 +0100 Subject: [PATCH] Fix ruby version check in plugin test Before $ if ["${ruby}" = '2.7']; then echo yay; fi bash: [2.7: command not found After $ if [ "${ruby}" = '2.7' ]; then echo yay; fi yay Fixes: f164a3f291045dd45fac4dd560421f243af1fbc3 --- theforeman.org/scripts/test/test_develop.sh | 2 +- .../scripts/test/test_hammer_cli_foreman_discovery.sh | 2 +- .../scripts/test/test_hammer_cli_foreman_pull_request.sh | 2 +- theforeman.org/scripts/test/test_hammer_cli_pull_request.sh | 2 +- theforeman.org/scripts/test/test_katello.sh | 2 +- theforeman.org/scripts/test/test_plugin.sh | 2 +- theforeman.org/yaml/builders/foreman-plugins-pull-request.yaml | 2 +- theforeman.org/yaml/builders/smart-proxy-plugin.yaml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/theforeman.org/scripts/test/test_develop.sh b/theforeman.org/scripts/test/test_develop.sh index 6462df1b..703f1b49 100644 --- a/theforeman.org/scripts/test/test_develop.sh +++ b/theforeman.org/scripts/test/test_develop.sh @@ -15,7 +15,7 @@ rvm use ruby-${ruby}@${gemset} --create rvm gemset empty --force set -x -if ["${ruby}" = '2.7'] +if [ "${ruby}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/scripts/test/test_hammer_cli_foreman_discovery.sh b/theforeman.org/scripts/test/test_hammer_cli_foreman_discovery.sh index 049b87d4..89d47c63 100644 --- a/theforeman.org/scripts/test/test_hammer_cli_foreman_discovery.sh +++ b/theforeman.org/scripts/test/test_hammer_cli_foreman_discovery.sh @@ -7,7 +7,7 @@ gemset=$(echo ${JOB_NAME} | cut -d/ -f1)-${EXECUTOR_NUMBER} rvm use ruby-${ruby}@${gemset} --create rvm gemset empty --force -if ["${ruby}" = '2.7'] +if [ "${ruby}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/scripts/test/test_hammer_cli_foreman_pull_request.sh b/theforeman.org/scripts/test/test_hammer_cli_foreman_pull_request.sh index 76823919..635b6cd4 100644 --- a/theforeman.org/scripts/test/test_hammer_cli_foreman_pull_request.sh +++ b/theforeman.org/scripts/test/test_hammer_cli_foreman_pull_request.sh @@ -10,7 +10,7 @@ rvm use ruby-${ruby}@${gemset} --create rvm gemset empty --force set -x -if ["${ruby}" = '2.7'] +if [ "${ruby}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/scripts/test/test_hammer_cli_pull_request.sh b/theforeman.org/scripts/test/test_hammer_cli_pull_request.sh index 2993d946..1e67ed4b 100644 --- a/theforeman.org/scripts/test/test_hammer_cli_pull_request.sh +++ b/theforeman.org/scripts/test/test_hammer_cli_pull_request.sh @@ -10,7 +10,7 @@ rvm use ruby-${ruby}@${gemset} --create rvm gemset empty --force set -x -if ["${ruby}" = '2.7'] +if [ "${ruby}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/scripts/test/test_katello.sh b/theforeman.org/scripts/test/test_katello.sh index 0da15183..842186fc 100644 --- a/theforeman.org/scripts/test/test_katello.sh +++ b/theforeman.org/scripts/test/test_katello.sh @@ -40,7 +40,7 @@ rvm use ruby-${ruby}@${gemset} --create rvm gemset empty --force set -x -if ["${ruby}" = '2.7'] +if [ "${ruby}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/scripts/test/test_plugin.sh b/theforeman.org/scripts/test/test_plugin.sh index 4d426866..4854830d 100644 --- a/theforeman.org/scripts/test/test_plugin.sh +++ b/theforeman.org/scripts/test/test_plugin.sh @@ -23,7 +23,7 @@ rvm gemset empty --force set -x -if ["${ruby}" = '2.7'] +if [ "${ruby}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/yaml/builders/foreman-plugins-pull-request.yaml b/theforeman.org/yaml/builders/foreman-plugins-pull-request.yaml index f5f7187e..424e5a1a 100644 --- a/theforeman.org/yaml/builders/foreman-plugins-pull-request.yaml +++ b/theforeman.org/yaml/builders/foreman-plugins-pull-request.yaml @@ -29,7 +29,7 @@ rvm use ruby-${{ruby}}@${{gemset}} --create rvm gemset empty --force - if ["${{ruby}}" = '2.7'] + if [ "${{ruby}}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else diff --git a/theforeman.org/yaml/builders/smart-proxy-plugin.yaml b/theforeman.org/yaml/builders/smart-proxy-plugin.yaml index 05bd4d71..944db158 100644 --- a/theforeman.org/yaml/builders/smart-proxy-plugin.yaml +++ b/theforeman.org/yaml/builders/smart-proxy-plugin.yaml @@ -13,7 +13,7 @@ rvm gemset empty --force set -x - if ["${{ruby}}" = '2.7'] + if [ "${{ruby}}" = '2.7' ] then gem install bundler -v 2.4.22 --no-document else