Signed-off-by: Matt Darfeuille <[email protected]>
---
build/release | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/build/release b/build/release
index c178eb72..b943110b 100755
--- a/build/release
+++ b/build/release
@@ -163,16 +163,17 @@ create_tag() # $1 = path of repository, $2 = object
push_command_func() # $1 = Path of repository, $2 = remote, $3 = branch
{
- if [ -n "$3" ]; then
+ if git --git-dir=${1}/.git show-ref --quiet --verify --
"refs/heads/${3}"; then
echo "Pushing branch $3 from ${1}/.git to ${2}..."
git --git-dir=${1}/.git --work-tree=$1 push --quiet --follow-tags $2 $3
[ $? -ne 0 ] && fatal_error "Failed to push branch $3 from ${1}/.git
to ${2}."
else
- echo "Pushing checked out branch from ${1}/.git to ${2}..."
+ echo "Branch ${3} in ${1}/.git not found; defaulting to master."
+ echo "Pushing master branch from ${1}/.git to ${2}..."
- git --git-dir=${1}/.git --work-tree=$1 push --quiet --follow-tags $2
- [ $? -ne 0 ] && fatal_error "Failed to push checked out branch from
${1}/.git to ${2}."
+ git --git-dir=${1}/.git --work-tree=$1 push --quiet --follow-tags $2
master
+ [ $? -ne 0 ] && fatal_error "Failed to push master branch from
${1}/.git to ${2}."
fi
}
@@ -349,19 +350,10 @@ else
fi
for repo in $REPOSITORIES; do
- case $VERSION in
- *Beta*|*RC*)
- ;;
- *)
- push_command_func $GIT $repo $BASEVERSION
- push_command_func $GITRELEASEDIR $repo $BASEVERSION
- ;;
- esac
-
- push_command_func $TOOLSDIR $repo master
- push_command_func $WEBDIR $repo master
- push_command_func $GIT $repo master
- push_command_func $GITRELEASEDIR $repo master
+ push_command_func $GIT $repo $BASEVERSION
+ push_command_func $GITRELEASEDIR $repo $BASEVERSION
+ push_command_func $TOOLSDIR $repo $BASEVERSION
+ push_command_func $WEBDIR $repo $BASEVERSION
done
cd $BUILD_DIR/$BASEVERSION || exit $?
--
2.11.0
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel