[rhq] Branch 'stefan/release_test-test-build' - release.sh
by snegrea
release.sh | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
New commits:
commit 0110ae8b98d9f4825d4811829f30b6db65328d93
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 15:37:14 2011 -0500
The work is done on the build branch, so push the build branch when everything is done.
diff --git a/release.sh b/release.sh
index a3380f0..18cff5d 100755
--- a/release.sh
+++ b/release.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-#===================================================================================
+#========================================================================================
#
# Usage: release.sh community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production
#
@@ -8,15 +8,15 @@
#
# Options:
# Add option description here
-#===================================================================================
+#========================================================================================
#include the utility library
source `dirname $0`/rhq_bash.lib
-#===================================================================================
+#========================================================================================
# Description: Display an error message and abort the script.
-#===================================================================================
+#========================================================================================
abort()
{
echo >&2
@@ -26,15 +26,18 @@ abort()
exit 1
}
-#===================================================================================
+#========================================================================================
# Description: Display usage information then abort the script.
-#===================================================================================
+#========================================================================================
usage()
{
abort "$@" "Usage: $EXE branch|tag community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production" "Example: $EXE enterprise 3.0.0.GA 3.0.0-SNAPSHOT release-3.0.0 ips test"
}
+#========================================================================================
+# Description: Validate and parse input arguments
+#========================================================================================
validate_arguments()
{
# Process command line args.
@@ -67,9 +70,9 @@ validate_arguments()
fi
}
-#===================================================================================
+#========================================================================================
# Description: Set all the local and environment variables required by the script.
-#===================================================================================
+#========================================================================================
set_variables()
{
# Constants
@@ -134,10 +137,10 @@ set_variables()
export LANG
}
-#===================================================================================
+#========================================================================================
# Description: Perform version update process and test the outcome by building
# from source.
-#===================================================================================
+#========================================================================================
run_tag_version_process()
{
# 1) Cleanup before doing anything
@@ -188,10 +191,11 @@ run_tag_version_process()
git commit -m "development RHQ_$DEVELOPMENT_VERSION"
# 12) If everything went well so far than means all the changes can be pushed!!!
- git push origin $RELEASE_BRANCH
+ git push origin $BUILD_BRANCH
}
-if [ -n "$RELEASE_DEBUG" ]; then
+if [ -n "$RELEASE_DEBUG" ];
+then
echo "Debug output is enabled."
set -x
fi
@@ -236,15 +240,18 @@ GIT_STATUS_EXIT_CODE=$?
# Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there are any uncommitted changes,
# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if current folder
# is truly a git working copy.
-if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
+if [ "$GIT_STATUS_EXIT_CODE" -le 1 ];
+then
echo "Checking out a clean copy of the release branch ($RELEASE_BRANCH)..."
git fetch origin "$RELEASE_BRANCH"
[ "$?" -ne 0 ] && abort "Failed to fetch release branch ($RELEASE_BRANCH)."
git checkout "$RELEASE_BRANCH" 2>/dev/null
- if [ "$?" -ne 0 ]; then
+ if [ "$?" -ne 0 ];
+ then
git checkout --track -b "$RELEASE_BRANCH" "origin/$RELEASE_BRANCH"
fi
+
[ "$?" -ne 0 ] && abort "Failed to checkout release branch ($RELEASE_BRANCH)."
git reset --hard "origin/$RELEASE_BRANCH"
[ "$?" -ne 0 ] && abort "Failed to reset release branch ($RELEASE_BRANCH)."
12 years, 7 months
[rhq] Branch 'stefan/release_test' - release.sh
by snegrea
release.sh | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
New commits:
commit 0110ae8b98d9f4825d4811829f30b6db65328d93
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 15:37:14 2011 -0500
The work is done on the build branch, so push the build branch when everything is done.
diff --git a/release.sh b/release.sh
index a3380f0..18cff5d 100755
--- a/release.sh
+++ b/release.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-#===================================================================================
+#========================================================================================
#
# Usage: release.sh community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production
#
@@ -8,15 +8,15 @@
#
# Options:
# Add option description here
-#===================================================================================
+#========================================================================================
#include the utility library
source `dirname $0`/rhq_bash.lib
-#===================================================================================
+#========================================================================================
# Description: Display an error message and abort the script.
-#===================================================================================
+#========================================================================================
abort()
{
echo >&2
@@ -26,15 +26,18 @@ abort()
exit 1
}
-#===================================================================================
+#========================================================================================
# Description: Display usage information then abort the script.
-#===================================================================================
+#========================================================================================
usage()
{
abort "$@" "Usage: $EXE branch|tag community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production" "Example: $EXE enterprise 3.0.0.GA 3.0.0-SNAPSHOT release-3.0.0 ips test"
}
+#========================================================================================
+# Description: Validate and parse input arguments
+#========================================================================================
validate_arguments()
{
# Process command line args.
@@ -67,9 +70,9 @@ validate_arguments()
fi
}
-#===================================================================================
+#========================================================================================
# Description: Set all the local and environment variables required by the script.
-#===================================================================================
+#========================================================================================
set_variables()
{
# Constants
@@ -134,10 +137,10 @@ set_variables()
export LANG
}
-#===================================================================================
+#========================================================================================
# Description: Perform version update process and test the outcome by building
# from source.
-#===================================================================================
+#========================================================================================
run_tag_version_process()
{
# 1) Cleanup before doing anything
@@ -188,10 +191,11 @@ run_tag_version_process()
git commit -m "development RHQ_$DEVELOPMENT_VERSION"
# 12) If everything went well so far than means all the changes can be pushed!!!
- git push origin $RELEASE_BRANCH
+ git push origin $BUILD_BRANCH
}
-if [ -n "$RELEASE_DEBUG" ]; then
+if [ -n "$RELEASE_DEBUG" ];
+then
echo "Debug output is enabled."
set -x
fi
@@ -236,15 +240,18 @@ GIT_STATUS_EXIT_CODE=$?
# Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there are any uncommitted changes,
# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if current folder
# is truly a git working copy.
-if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
+if [ "$GIT_STATUS_EXIT_CODE" -le 1 ];
+then
echo "Checking out a clean copy of the release branch ($RELEASE_BRANCH)..."
git fetch origin "$RELEASE_BRANCH"
[ "$?" -ne 0 ] && abort "Failed to fetch release branch ($RELEASE_BRANCH)."
git checkout "$RELEASE_BRANCH" 2>/dev/null
- if [ "$?" -ne 0 ]; then
+ if [ "$?" -ne 0 ];
+ then
git checkout --track -b "$RELEASE_BRANCH" "origin/$RELEASE_BRANCH"
fi
+
[ "$?" -ne 0 ] && abort "Failed to checkout release branch ($RELEASE_BRANCH)."
git reset --hard "origin/$RELEASE_BRANCH"
[ "$?" -ne 0 ] && abort "Failed to reset release branch ($RELEASE_BRANCH)."
12 years, 7 months
[rhq] Branch 'stefan/release_updates' - release.sh
by snegrea
release.sh | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
New commits:
commit 0110ae8b98d9f4825d4811829f30b6db65328d93
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 15:37:14 2011 -0500
The work is done on the build branch, so push the build branch when everything is done.
diff --git a/release.sh b/release.sh
index a3380f0..18cff5d 100755
--- a/release.sh
+++ b/release.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-#===================================================================================
+#========================================================================================
#
# Usage: release.sh community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production
#
@@ -8,15 +8,15 @@
#
# Options:
# Add option description here
-#===================================================================================
+#========================================================================================
#include the utility library
source `dirname $0`/rhq_bash.lib
-#===================================================================================
+#========================================================================================
# Description: Display an error message and abort the script.
-#===================================================================================
+#========================================================================================
abort()
{
echo >&2
@@ -26,15 +26,18 @@ abort()
exit 1
}
-#===================================================================================
+#========================================================================================
# Description: Display usage information then abort the script.
-#===================================================================================
+#========================================================================================
usage()
{
abort "$@" "Usage: $EXE branch|tag community|enterprise RELEASE_VERSION DEVELOPMENT_VERSION RELEASE_BRANCH GIT_USERNAME test|production" "Example: $EXE enterprise 3.0.0.GA 3.0.0-SNAPSHOT release-3.0.0 ips test"
}
+#========================================================================================
+# Description: Validate and parse input arguments
+#========================================================================================
validate_arguments()
{
# Process command line args.
@@ -67,9 +70,9 @@ validate_arguments()
fi
}
-#===================================================================================
+#========================================================================================
# Description: Set all the local and environment variables required by the script.
-#===================================================================================
+#========================================================================================
set_variables()
{
# Constants
@@ -134,10 +137,10 @@ set_variables()
export LANG
}
-#===================================================================================
+#========================================================================================
# Description: Perform version update process and test the outcome by building
# from source.
-#===================================================================================
+#========================================================================================
run_tag_version_process()
{
# 1) Cleanup before doing anything
@@ -188,10 +191,11 @@ run_tag_version_process()
git commit -m "development RHQ_$DEVELOPMENT_VERSION"
# 12) If everything went well so far than means all the changes can be pushed!!!
- git push origin $RELEASE_BRANCH
+ git push origin $BUILD_BRANCH
}
-if [ -n "$RELEASE_DEBUG" ]; then
+if [ -n "$RELEASE_DEBUG" ];
+then
echo "Debug output is enabled."
set -x
fi
@@ -236,15 +240,18 @@ GIT_STATUS_EXIT_CODE=$?
# Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there are any uncommitted changes,
# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if current folder
# is truly a git working copy.
-if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
+if [ "$GIT_STATUS_EXIT_CODE" -le 1 ];
+then
echo "Checking out a clean copy of the release branch ($RELEASE_BRANCH)..."
git fetch origin "$RELEASE_BRANCH"
[ "$?" -ne 0 ] && abort "Failed to fetch release branch ($RELEASE_BRANCH)."
git checkout "$RELEASE_BRANCH" 2>/dev/null
- if [ "$?" -ne 0 ]; then
+ if [ "$?" -ne 0 ];
+ then
git checkout --track -b "$RELEASE_BRANCH" "origin/$RELEASE_BRANCH"
fi
+
[ "$?" -ne 0 ] && abort "Failed to checkout release branch ($RELEASE_BRANCH)."
git reset --hard "origin/$RELEASE_BRANCH"
[ "$?" -ne 0 ] && abort "Failed to reset release branch ($RELEASE_BRANCH)."
12 years, 7 months
[rhq] Branch 'stefan/release_test-test-build' - release.sh
by snegrea
release.sh | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
New commits:
commit 9e689005aef5ace6f4e66a6e94ae737e545849e5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 11:25:35 2011 -0500
Remove WORKING_DIR concept, the current folder is working folder. Simplify the assumptions for maven to run either Hudson or default local methods.
diff --git a/release.sh b/release.sh
index 040064a..a3380f0 100755
--- a/release.sh
+++ b/release.sh
@@ -87,16 +87,13 @@ set_variables()
# Set various local variables.
- if [ -n "$HUDSON_URL" ] && [ -n "$WORKSPACE" ]; then
+ if [ -n "$WORKSPACE" ]; then
echo "We appear to be running in a Hudson job."
- WORKING_DIR="$WORKSPACE"
- MAVEN_LOCAL_REPO_DIR="$HOME/.m2/hudson-release-$RELEASE_TYPE-repository"
- MAVEN_SETTINGS_FILE="$HOME/.m2/hudson-$JOB_NAME-settings.xml"
- elif [ -z "$WORKING_DIR" ]; then
- WORKING_DIR="$HOME/release/rhq"
- # MAVEN_LOCAL_REPO_DIR="$HOME/release/m2-repository"
+ MAVEN_LOCAL_REPO_DIR="$WORKSPACE/.m2/repository"
+ MAVEN_SETTINGS_FILE="$WORKSPACE/.m2/settings.xml"
+ else
MAVEN_LOCAL_REPO_DIR="$HOME/.m2/repository"
- MAVEN_SETTINGS_FILE="$HOME/release/m2-settings.xml"
+ MAVEN_SETTINGS_FILE="$HOME/.m2/settings.xml"
fi
PROJECT_GIT_URL="ssh://${GIT_USERNAME}@git.fedorahosted.org/git/rhq/rhq.git"
@@ -128,7 +125,6 @@ set_variables()
TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
-
# Set the system character encoding to ISO-8859-1 to ensure i18log reads its
# messages and writes its resource bundle properties files in that encoding,
# since that is how the German and French I18NMessage annotation values are
@@ -221,7 +217,7 @@ print_variables "${environment_variables[@]}"
print_centered "Local Variables"
-local_variables=("WORKING_DIR" "PROJECT_NAME" "PROJECT_GIT_URL" "RELEASE_TYPE" "DEVELOPMENT_VERSION" \
+local_variables=( "PROJECT_NAME" "PROJECT_GIT_URL" "RELEASE_TYPE" "DEVELOPMENT_VERSION" \
"RELEASE_BRANCH" "MODE" "MAVEN_LOCAL_REPO_DIR" \
"MAVEN_SETTINGS_FILE" "MAVEN_ARGS" "MAVEN_RELEASE_PERFORM_GOAL" "JBOSS_ORG_USERNAME" \
"RELEASE_VERSION" "RELEASE_TAG")
@@ -238,7 +234,7 @@ print_centered "="
git status >/dev/null 2>&1
GIT_STATUS_EXIT_CODE=$?
# Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there are any uncommitted changes,
-# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if $WORKING_DIR
+# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if current folder
# is truly a git working copy.
if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
echo "Checking out a clean copy of the release branch ($RELEASE_BRANCH)..."
@@ -257,7 +253,7 @@ if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
git pull origin $RELEASE_BRANCH
[ "$?" -ne 0 ] && abort "Failed to update release branch ($RELEASE_BRANCH)."
else
- echo "$WORKING_DIR does not appear to be a git working directory ('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly clone the repo..."
+ echo "Current folder does not appear to be a git working directory ('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly clone the repo..."
fi
# if this is a test build then create a temporary build branch off of RELEASE_BRANCH. This allows checkins to
12 years, 7 months
[rhq] Branch 'stefan/release_test' - release.sh
by snegrea
release.sh | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
New commits:
commit 9e689005aef5ace6f4e66a6e94ae737e545849e5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 11:25:35 2011 -0500
Remove WORKING_DIR concept, the current folder is working folder. Simplify the assumptions for maven to run either Hudson or default local methods.
diff --git a/release.sh b/release.sh
index 040064a..a3380f0 100755
--- a/release.sh
+++ b/release.sh
@@ -87,16 +87,13 @@ set_variables()
# Set various local variables.
- if [ -n "$HUDSON_URL" ] && [ -n "$WORKSPACE" ]; then
+ if [ -n "$WORKSPACE" ]; then
echo "We appear to be running in a Hudson job."
- WORKING_DIR="$WORKSPACE"
- MAVEN_LOCAL_REPO_DIR="$HOME/.m2/hudson-release-$RELEASE_TYPE-repository"
- MAVEN_SETTINGS_FILE="$HOME/.m2/hudson-$JOB_NAME-settings.xml"
- elif [ -z "$WORKING_DIR" ]; then
- WORKING_DIR="$HOME/release/rhq"
- # MAVEN_LOCAL_REPO_DIR="$HOME/release/m2-repository"
+ MAVEN_LOCAL_REPO_DIR="$WORKSPACE/.m2/repository"
+ MAVEN_SETTINGS_FILE="$WORKSPACE/.m2/settings.xml"
+ else
MAVEN_LOCAL_REPO_DIR="$HOME/.m2/repository"
- MAVEN_SETTINGS_FILE="$HOME/release/m2-settings.xml"
+ MAVEN_SETTINGS_FILE="$HOME/.m2/settings.xml"
fi
PROJECT_GIT_URL="ssh://${GIT_USERNAME}@git.fedorahosted.org/git/rhq/rhq.git"
@@ -128,7 +125,6 @@ set_variables()
TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
-
# Set the system character encoding to ISO-8859-1 to ensure i18log reads its
# messages and writes its resource bundle properties files in that encoding,
# since that is how the German and French I18NMessage annotation values are
@@ -221,7 +217,7 @@ print_variables "${environment_variables[@]}"
print_centered "Local Variables"
-local_variables=("WORKING_DIR" "PROJECT_NAME" "PROJECT_GIT_URL" "RELEASE_TYPE" "DEVELOPMENT_VERSION" \
+local_variables=( "PROJECT_NAME" "PROJECT_GIT_URL" "RELEASE_TYPE" "DEVELOPMENT_VERSION" \
"RELEASE_BRANCH" "MODE" "MAVEN_LOCAL_REPO_DIR" \
"MAVEN_SETTINGS_FILE" "MAVEN_ARGS" "MAVEN_RELEASE_PERFORM_GOAL" "JBOSS_ORG_USERNAME" \
"RELEASE_VERSION" "RELEASE_TAG")
@@ -238,7 +234,7 @@ print_centered "="
git status >/dev/null 2>&1
GIT_STATUS_EXIT_CODE=$?
# Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there are any uncommitted changes,
-# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if $WORKING_DIR
+# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if current folder
# is truly a git working copy.
if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
echo "Checking out a clean copy of the release branch ($RELEASE_BRANCH)..."
@@ -257,7 +253,7 @@ if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
git pull origin $RELEASE_BRANCH
[ "$?" -ne 0 ] && abort "Failed to update release branch ($RELEASE_BRANCH)."
else
- echo "$WORKING_DIR does not appear to be a git working directory ('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly clone the repo..."
+ echo "Current folder does not appear to be a git working directory ('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly clone the repo..."
fi
# if this is a test build then create a temporary build branch off of RELEASE_BRANCH. This allows checkins to
12 years, 7 months
[rhq] Branch 'stefan/release_updates' - release.sh
by snegrea
release.sh | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
New commits:
commit 9e689005aef5ace6f4e66a6e94ae737e545849e5
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 11:25:35 2011 -0500
Remove WORKING_DIR concept, the current folder is working folder. Simplify the assumptions for maven to run either Hudson or default local methods.
diff --git a/release.sh b/release.sh
index 040064a..a3380f0 100755
--- a/release.sh
+++ b/release.sh
@@ -87,16 +87,13 @@ set_variables()
# Set various local variables.
- if [ -n "$HUDSON_URL" ] && [ -n "$WORKSPACE" ]; then
+ if [ -n "$WORKSPACE" ]; then
echo "We appear to be running in a Hudson job."
- WORKING_DIR="$WORKSPACE"
- MAVEN_LOCAL_REPO_DIR="$HOME/.m2/hudson-release-$RELEASE_TYPE-repository"
- MAVEN_SETTINGS_FILE="$HOME/.m2/hudson-$JOB_NAME-settings.xml"
- elif [ -z "$WORKING_DIR" ]; then
- WORKING_DIR="$HOME/release/rhq"
- # MAVEN_LOCAL_REPO_DIR="$HOME/release/m2-repository"
+ MAVEN_LOCAL_REPO_DIR="$WORKSPACE/.m2/repository"
+ MAVEN_SETTINGS_FILE="$WORKSPACE/.m2/settings.xml"
+ else
MAVEN_LOCAL_REPO_DIR="$HOME/.m2/repository"
- MAVEN_SETTINGS_FILE="$HOME/release/m2-settings.xml"
+ MAVEN_SETTINGS_FILE="$HOME/.m2/settings.xml"
fi
PROJECT_GIT_URL="ssh://${GIT_USERNAME}@git.fedorahosted.org/git/rhq/rhq.git"
@@ -128,7 +125,6 @@ set_variables()
TAG_VERSION=`echo $RELEASE_VERSION | sed 's/\./_/g'`
RELEASE_TAG="${TAG_PREFIX}_${TAG_VERSION}"
-
# Set the system character encoding to ISO-8859-1 to ensure i18log reads its
# messages and writes its resource bundle properties files in that encoding,
# since that is how the German and French I18NMessage annotation values are
@@ -221,7 +217,7 @@ print_variables "${environment_variables[@]}"
print_centered "Local Variables"
-local_variables=("WORKING_DIR" "PROJECT_NAME" "PROJECT_GIT_URL" "RELEASE_TYPE" "DEVELOPMENT_VERSION" \
+local_variables=( "PROJECT_NAME" "PROJECT_GIT_URL" "RELEASE_TYPE" "DEVELOPMENT_VERSION" \
"RELEASE_BRANCH" "MODE" "MAVEN_LOCAL_REPO_DIR" \
"MAVEN_SETTINGS_FILE" "MAVEN_ARGS" "MAVEN_RELEASE_PERFORM_GOAL" "JBOSS_ORG_USERNAME" \
"RELEASE_VERSION" "RELEASE_TAG")
@@ -238,7 +234,7 @@ print_centered "="
git status >/dev/null 2>&1
GIT_STATUS_EXIT_CODE=$?
# Note, git 1.6 and earlier returns an exit code of 1, rather than 0, if there are any uncommitted changes,
-# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if $WORKING_DIR
+# and git 1.7 returns 0, so we check if the exit code is less than or equal to 1 to determine if current folder
# is truly a git working copy.
if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
echo "Checking out a clean copy of the release branch ($RELEASE_BRANCH)..."
@@ -257,7 +253,7 @@ if [ "$GIT_STATUS_EXIT_CODE" -le 1 ]; then
git pull origin $RELEASE_BRANCH
[ "$?" -ne 0 ] && abort "Failed to update release branch ($RELEASE_BRANCH)."
else
- echo "$WORKING_DIR does not appear to be a git working directory ('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly clone the repo..."
+ echo "Current folder does not appear to be a git working directory ('git status' returned $GIT_STATUS_EXIT_CODE) - removing it so we can freshly clone the repo..."
fi
# if this is a test build then create a temporary build branch off of RELEASE_BRANCH. This allows checkins to
12 years, 7 months
[rhq] Branch 'stefan/release_test-test-build' - release.sh
by snegrea
release.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 2f79d43af5a623ad7a4bef98ccda199b6115a9fd
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 11:04:38 2011 -0500
Updating if/then statements after a bash syntax error.
diff --git a/release.sh b/release.sh
index 5b40aa5..040064a 100755
--- a/release.sh
+++ b/release.sh
@@ -269,7 +269,8 @@ else
BUILD_BRANCH="${RELEASE_BRANCH}-test-build"
# delete the branch if it exists, so we can recreate it fresh
EXISTING_BUILD_BRANCH=`git ls-remote --heads origin "$BUILD_BRANCH"`
- if [ -n "$EXISTING_BUILD_BRANCH" ]; then
+ if [ -n "$EXISTING_BUILD_BRANCH" ];
+ then
echo "Deleting remote branch origin/$BUILD_BRANCH"
git branch -D -r "origin/$BUILD_BRANCH"
echo "Deleting local branch $BUILD_BRANCH"
@@ -285,13 +286,15 @@ fi
# If the specified tag already exists remotely and we're in production mode, then abort. If it exists and
# we're in test mode, delete it
EXISTING_REMOTE_TAG=`git ls-remote --tags origin "$RELEASE_TAG"`
-if [ -n "$EXISTING_REMOTE_TAG" ] then
+if [ -n "$EXISTING_REMOTE_TAG" ];
+then
abort "A remote tag named $RELEASE_TAG already exists - aborting"
fi
# See if the specified tag already exists locally - if so, delete it (even if in production mode).
EXISTING_LOCAL_TAG=`git tag -l "$RELEASE_TAG"`
-if [ -n "$EXISTING_LOCAL_TAG" ]; then
+if [ -n "$EXISTING_LOCAL_TAG" ];
+then
abort "A local tag named $RELEASE_TAG already exists - aborting"
fi
12 years, 7 months
[rhq] Branch 'stefan/release_test' - release.sh
by snegrea
release.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 2f79d43af5a623ad7a4bef98ccda199b6115a9fd
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 11:04:38 2011 -0500
Updating if/then statements after a bash syntax error.
diff --git a/release.sh b/release.sh
index 5b40aa5..040064a 100755
--- a/release.sh
+++ b/release.sh
@@ -269,7 +269,8 @@ else
BUILD_BRANCH="${RELEASE_BRANCH}-test-build"
# delete the branch if it exists, so we can recreate it fresh
EXISTING_BUILD_BRANCH=`git ls-remote --heads origin "$BUILD_BRANCH"`
- if [ -n "$EXISTING_BUILD_BRANCH" ]; then
+ if [ -n "$EXISTING_BUILD_BRANCH" ];
+ then
echo "Deleting remote branch origin/$BUILD_BRANCH"
git branch -D -r "origin/$BUILD_BRANCH"
echo "Deleting local branch $BUILD_BRANCH"
@@ -285,13 +286,15 @@ fi
# If the specified tag already exists remotely and we're in production mode, then abort. If it exists and
# we're in test mode, delete it
EXISTING_REMOTE_TAG=`git ls-remote --tags origin "$RELEASE_TAG"`
-if [ -n "$EXISTING_REMOTE_TAG" ] then
+if [ -n "$EXISTING_REMOTE_TAG" ];
+then
abort "A remote tag named $RELEASE_TAG already exists - aborting"
fi
# See if the specified tag already exists locally - if so, delete it (even if in production mode).
EXISTING_LOCAL_TAG=`git tag -l "$RELEASE_TAG"`
-if [ -n "$EXISTING_LOCAL_TAG" ]; then
+if [ -n "$EXISTING_LOCAL_TAG" ];
+then
abort "A local tag named $RELEASE_TAG already exists - aborting"
fi
12 years, 7 months
[rhq] Branch 'stefan/release_updates' - release.sh
by snegrea
release.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 2f79d43af5a623ad7a4bef98ccda199b6115a9fd
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Fri Sep 30 11:04:38 2011 -0500
Updating if/then statements after a bash syntax error.
diff --git a/release.sh b/release.sh
index 5b40aa5..040064a 100755
--- a/release.sh
+++ b/release.sh
@@ -269,7 +269,8 @@ else
BUILD_BRANCH="${RELEASE_BRANCH}-test-build"
# delete the branch if it exists, so we can recreate it fresh
EXISTING_BUILD_BRANCH=`git ls-remote --heads origin "$BUILD_BRANCH"`
- if [ -n "$EXISTING_BUILD_BRANCH" ]; then
+ if [ -n "$EXISTING_BUILD_BRANCH" ];
+ then
echo "Deleting remote branch origin/$BUILD_BRANCH"
git branch -D -r "origin/$BUILD_BRANCH"
echo "Deleting local branch $BUILD_BRANCH"
@@ -285,13 +286,15 @@ fi
# If the specified tag already exists remotely and we're in production mode, then abort. If it exists and
# we're in test mode, delete it
EXISTING_REMOTE_TAG=`git ls-remote --tags origin "$RELEASE_TAG"`
-if [ -n "$EXISTING_REMOTE_TAG" ] then
+if [ -n "$EXISTING_REMOTE_TAG" ];
+then
abort "A remote tag named $RELEASE_TAG already exists - aborting"
fi
# See if the specified tag already exists locally - if so, delete it (even if in production mode).
EXISTING_LOCAL_TAG=`git tag -l "$RELEASE_TAG"`
-if [ -n "$EXISTING_LOCAL_TAG" ]; then
+if [ -n "$EXISTING_LOCAL_TAG" ];
+then
abort "A local tag named $RELEASE_TAG already exists - aborting"
fi
12 years, 7 months