diff --git a/jenkins/scripts/common_translation_update.sh b/jenkins/scripts/common_translation_update.sh index 06215236df..40f4856df1 100644 --- a/jenkins/scripts/common_translation_update.sh +++ b/jenkins/scripts/common_translation_update.sh @@ -206,10 +206,10 @@ EOF # 3) no -2 by reviewers # 4) no Workflow -1 (WIP) # - if `echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"1"'` \ - && ! `echo $change_info|grep -q '{"type":"Verified","description":"Verified","value":"-[12]","grantedOn":[0-9]*,"by":{"name":"Jenkins","username":"jenkins"}}'` \ - && ! `echo $change_info|grep -q '{"type":"Code-Review","description":"Code-Review","value":"-2"'` \ - && ! `echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"-1"'` ; then + if echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"1"' \ + && ! echo $change_info|grep -q '{"type":"Verified","description":"Verified","value":"-[12]","grantedOn":[0-9]*,"by":{"name":"Jenkins","username":"jenkins"}}' \ + && ! echo $change_info|grep -q '{"type":"Code-Review","description":"Code-Review","value":"-2"' \ + && ! echo $change_info|grep -q '{"type":"Workflow","description":"Workflow","value":"-1"' ; then echo "Job already approved, exiting" exit 0 fi diff --git a/jenkins/scripts/run-docs.sh b/jenkins/scripts/run-docs.sh index 8bd4104dc8..7f833770bb 100755 --- a/jenkins/scripts/run-docs.sh +++ b/jenkins/scripts/run-docs.sh @@ -23,7 +23,7 @@ echo "======================================================================" if [ -z "$ZUUL_REFNAME" ] || [ "$ZUUL_REFNAME" == "master" ] ; then : # Leave the docs where they are. -elif `echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null` ; then +elif echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null ; then # Put tagged releases in proper location. All tagged builds get copied to # BUILD_DIR/tagname. If this is the latest tagged release the copy of files # at BUILD_DIR remains. When Jenkins copies this file the root developer @@ -52,7 +52,7 @@ elif `echo $ZUUL_REFNAME | grep refs/tags/ >/dev/null` ; then mv doc/build/$TAG doc/build/html/$TAG fi fi -elif `echo $ZUUL_REFNAME | grep stable/ >/dev/null` ; then +elif echo $ZUUL_REFNAME | grep stable/ >/dev/null ; then # Put stable release changes in dir named after stable release under the # build dir. When Jenkins copies these files they will be accessible under # the developer docs root using the stable release's name. diff --git a/jenkins/scripts/upstream_translation_django_openstack_auth.sh b/jenkins/scripts/upstream_translation_django_openstack_auth.sh index 8a6d374bee..deaa66c3b2 100755 --- a/jenkins/scripts/upstream_translation_django_openstack_auth.sh +++ b/jenkins/scripts/upstream_translation_django_openstack_auth.sh @@ -16,7 +16,7 @@ # The script is to push the updated English po to Transifex. -if [ ! `echo $ZUUL_REFNAME | grep master` ]; then +if ! echo $ZUUL_REFNAME | grep master; then exit 0 fi @@ -33,7 +33,7 @@ python setup.py extract_messages # Add all changed files to git git add openstack_auth/locale/* -if [ ! `git diff-index --quiet HEAD --` ]; then +if ! git diff-index --quiet HEAD --; then # Push .pot changes to transifex tx --debug --traceback push -s fi diff --git a/jenkins/scripts/upstream_translation_horizon.sh b/jenkins/scripts/upstream_translation_horizon.sh index 837807e152..2aae3949de 100755 --- a/jenkins/scripts/upstream_translation_horizon.sh +++ b/jenkins/scripts/upstream_translation_horizon.sh @@ -18,7 +18,7 @@ PROJECT="horizon" -if [ ! `echo $ZUUL_REFNAME | grep master` ]; then +if ! echo $ZUUL_REFNAME | grep master; then exit 0 fi diff --git a/jenkins/scripts/upstream_translation_update.sh b/jenkins/scripts/upstream_translation_update.sh index 0b906fc7f0..c981151483 100755 --- a/jenkins/scripts/upstream_translation_update.sh +++ b/jenkins/scripts/upstream_translation_update.sh @@ -14,7 +14,7 @@ PROJECT=$1 -if [ ! `echo $ZUUL_REFNAME | grep master` ]; then +if ! echo $ZUUL_REFNAME | grep master; then exit 0 fi @@ -32,7 +32,7 @@ extract_messages_log "$PROJECT" # Add all changed files to git git add $PROJECT/locale/* -if [ ! `git diff-index --quiet HEAD --` ]; then +if ! git diff-index --quiet HEAD --; then # Push .pot changes to transifex # Transifex project name does not include "." diff --git a/jenkins/scripts/upstream_translation_update_manuals.sh b/jenkins/scripts/upstream_translation_update_manuals.sh index f12f9bfa0b..0cce44ba20 100755 --- a/jenkins/scripts/upstream_translation_update_manuals.sh +++ b/jenkins/scripts/upstream_translation_update_manuals.sh @@ -18,7 +18,7 @@ PROJECT=$1 -if [ ! `echo $ZUUL_REFNAME | grep master` ]; then +if ! echo $ZUUL_REFNAME | grep master; then exit 0 fi @@ -31,7 +31,7 @@ setup_translation setup_manuals "$PROJECT" -if [ ! `git diff --cached --quiet HEAD --` ]; then +if ! git diff --cached --quiet HEAD --; then # Push .pot changes to transifex tx --debug --traceback push -s fi