[open-ils-commits] [GIT] Evergreen ILS branch master updated. c05aeb2b430d16f256d49ed950e803742f4bd274

Evergreen Git git at git.evergreen-ils.org
Tue Jul 28 16:54:07 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  c05aeb2b430d16f256d49ed950e803742f4bd274 (commit)
      from  c6a5404e6418abb7b4c58822cf292348a07cc461 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c05aeb2b430d16f256d49ed950e803742f4bd274
Author: Mike Rylander <mrylander at gmail.com>
Date:   Mon Jun 15 15:32:20 2015 -0400

    LP#1465385: Fix some syntax issues with make_release
    
    Some versions of bash become confused when a unary = operator
    is used in place of a binary == operator.  Also, some variables
    live without the protection of quoting, and thus further confuse
    the shell when their contents are not as simple as originally
    expected.
    
    Here we adress those issues.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/build/tools/make_release b/build/tools/make_release
index 1cb3d7a..c738355 100755
--- a/build/tools/make_release
+++ b/build/tools/make_release
@@ -91,15 +91,15 @@ if [ -z "$OSRF_JS_PATH" ]; then
     exit 1;
 fi;
 
-if [ $TAG_ONLY = "YES" ]; then
+if [ "$TAG_ONLY" == "YES" ]; then
     PREV_BRANCH="TAG"
 fi
 
-if [ $BUILD_ONLY = "YES" ]; then
+if [ "$BUILD_ONLY" == "YES" ]; then
     PREV_BRANCH="PACKAGE"
 fi
 
-if [ $VERSION = "AUTO" ]; then
+if [ "$VERSION" == "AUTO" ]; then
     # Auto-pick version based on branch name
     echo AUTO VERSION
     VERSION=`echo $GIT_BRANCH | sed 's/^rel_\([0-9]\+\)_\([0-9]\+\)_\([0-9]\+\)_\(.\+\)$/\1.\2.\3-\4/'`
@@ -148,8 +148,8 @@ PREAMBLE
 # This defines what the preamble comes before
 RELEASE_PREAMBLE_BEFORE="Preamble: Developer instructions"
 
-if [ $PREV_BRANCH != "TAG" -a $PREV_BRANCH != "PACKAGE" ]; then
-    if [ $PREV_BRANCH = "AUTO" ]; then
+if [ "$PREV_BRANCH" != "TAG" -a "$PREV_BRANCH" != "PACKAGE" ]; then
+    if [ "$PREV_BRANCH" == "AUTO" ]; then
         echo "AUTO PREVIOUS BRANCH"
         PREV_BRANCH=`echo ${UNDER_VERSION%_*}`
         PREV_BRANCH=`git branch -r | grep "rel_${PREV_BRANCH}_[^_]\+$" | sort -rV | head -n1`
@@ -165,14 +165,14 @@ if [ $PREV_BRANCH != "TAG" -a $PREV_BRANCH != "PACKAGE" ]; then
         echo "PREVIOUS VERSION COMMIT NOT FOUND";
         exit 1
     fi
-    if [ $PREV_VERSION = "AUTO" ]; then
+    if [ "$PREV_VERSION" == "AUTO" ]; then
         echo "AUTO PREVIOUS VERSION"
         PREV_BRANCH_END=`echo $PREV_BRANCH | sed 's|.*/||'`
         PREV_VERSION=`echo $PREV_BRANCH_END | sed 's/^rel_\([0-9]\+\)_\([0-9]\+\)_\([0-9]\+\)_\(.\+\)$/\1.\2.\3-\4/'`
         PREV_VERSION=`echo $PREV_VERSION | sed 's/^rel_\([0-9]\+\)_\([0-9]\+\)_\([0-9]\+\)$/\1.\2.\3/'`
         PREV_VERSION=`echo $PREV_VERSION | sed 's/^rel_\([0-9]\+\)_\([0-9]\+\)_\(.\+\)$/\1.\2-\3/'`
         PREV_VERSION=`echo $PREV_VERSION | sed 's/^rel_\([0-9]\+\)_\([0-9]\+\)$/\1.\2/'`
-        if [ "$PREV_VERSION" = "$PREV_BRANCH_END" ]; then
+        if [ "$PREV_VERSION" == "$PREV_BRANCH_END" ]; then
             echo "AUTO PREVIOUS VERSION FAILED."
             exit 1
         fi
@@ -182,7 +182,7 @@ else
     echo "Tagging or packaging, no need for previous version"
 fi
 
-if [ $PREV_BRANCH != "PACKAGE" ]; then
+if [ "$PREV_BRANCH" != "PACKAGE" ]; then
 
     echo "Applying to Application.pm - HEAD -> $DASH_VERSION"
     echo "Alt: $SHORT_DASH_VERSION -> $DASH_VERSION"
@@ -197,7 +197,7 @@ if [ $PREV_BRANCH != "PACKAGE" ]; then
     echo "STAMP_ID with $UNDER_VERSION"
     sed -i -e "s/STAMP_ID=rel_[^ ]*/STAMP_ID=rel_$UNDER_VERSION/" $GIT_ABS/README
 
-    if [ $PREV_BRANCH != "TAG" ]; then
+    if [ "$PREV_BRANCH" != "TAG" ]; then
         if [ "$(grep "$RELEASE_PREAMBLE_HEAD" $GIT_ABS/README )" ]; then
             echo "Updating old download links"
             sed -i -e "s|\(previews/\)\?Evergreen-ILS-.*\.tar\.gz|${PREVIEW_TEXT}Evergreen-ILS-$VERSION.tar.gz|" $GIT_ABS/README
@@ -237,7 +237,7 @@ if [ $PREV_BRANCH != "PACKAGE" ]; then
     echo "config.upgrade_log entry for $VERSION"
     sed -i -e "s/\(INSERT INTO config.upgrade_log (version[^)]*) VALUES ('\)[0-9]*\('.*;\).*/&\n\1$VERSION\2/" $GIT_ABS/Open-ILS/src/sql/Pg/002.schema.config.sql;
 
-    if [ "$NO_UPGRADE" = "AUTO" ]; then
+    if [ "$NO_UPGRADE" == "AUTO" ]; then
         echo "Checking for DB upgrade potential...."
         git ls-tree --name-only $PREV_BRANCH -- Open-ILS/src/sql/Pg/upgrade/ | cut -d/ -f6 | cut -d. -f1 | sort > old_upgrades.txt
         git ls-tree --name-only HEAD -- Open-ILS/src/sql/Pg/upgrade/ | cut -d/ -f6 | cut -d. -f1 | sort > new_upgrades.txt
@@ -303,7 +303,7 @@ else
     autoreconf -i
 fi
 
-if [ "$SKIP_I18N" = "NO" ]; then
+if [ "$SKIP_I18N" == "NO" ]; then
     cd build/i18n
     echo "Building i18n"
     make install_all_locales
@@ -379,7 +379,7 @@ rm -rf Evergreen-ILS-$VERSION/
 echo ""
 echo "FOR YOU TODO:"
 echo "* TEST the release"
-if [ $PREV_BRANCH != "PACKAGE" ]; then
+if [ "$PREV_BRANCH" != "PACKAGE" ]; then
     echo "* Push release branch"
 fi
 echo "* Upload files"

-----------------------------------------------------------------------

Summary of changes:
 build/tools/make_release |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list