]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Add ./commit option for pushing tags back to origin.
authorGary V. Vaughan <gary@gnu.org>
Mon, 8 Sep 2008 06:24:06 +0000 (14:24 +0800)
committerGary V. Vaughan <gary@gnu.org>
Mon, 8 Sep 2008 06:24:06 +0000 (14:24 +0800)
* clcommit.m4sh (opt_tags): New --tags push option.
(func_commit): Run `$GIT push --tags' if --tags was passed.
* HACKING (Release Procedure): Note the requirement to pass
--tags to ./commit for new release tag to be push back to
origin.

ChangeLog
HACKING
clcommit.m4sh

index d62d219e706c5de0f8115d1394e3a3cd69ba290d..78e656bcd1cf6b8672dfae49f9992b5925f4c73b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-09-07  Gary V. Vaughan  <gary@gnu.org>
+
+       Add ./commit option for pushing tags back to origin.
+       * clcommit.m4sh (opt_tags): New --tags push option.
+       (func_commit): Run `$GIT push --tags' if --tags was passed.
+       * HACKING (Release Procedure): Note the requirement to pass
+       --tags to ./commit for new release tag to be push back to
+       origin.
+
 2008-09-07  Gary V. Vaughan  <gary@gnu.org>
 
        Retire gnu.org news.html in favour of savannah news.
diff --git a/HACKING b/HACKING
index 346ad15fa9e5dd1419c714337d6e0e21e3a02ebe..c7efe410c3a439c3ae0fabbf95af03d66b378568 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -699,7 +699,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
   and `make distcheck CC=g++'
   If there are any problems, fix them and start again.
 
-* Run ./commit from the source tree.
+* Run `./commit -p' from the source tree.
 
 * Run `make -fMakefile.maint git-dist' (or `make -f../Makefile.maint
   git-dist' if you are running from a VPATH build directory, where `../'
@@ -725,7 +725,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
 
 * Update NEWS, ChangeLog.
 
-* Run ./commit.
+* Run `./commit -p --tags', to push the new changes and tags to origin.
 
 * Update the webpages, libtool.html will need to indicate the latest
   release number.
index 3394311a9528cc6fe06f2659b92b1bd0c9074bcb..0d3ba42fc871289a58c97e0b6151c6c84686d8fb 100644 (file)
@@ -46,6 +46,7 @@ m4_divert_push([SCRIPT])#!/bin/sh
 #           --signature[=FILE] add FILE to the end of the email [~/.signature]
 #           --signoff          add a Signed-off-by attribution at the end
 # -S TEXT   --summary=TEXT     specify a TEXT subject line for the commit email
+#           --tags             in conjunction with -p, also push tags
 # -v        --verbose          run in verbose mode
 #           --version          print version information
 # -h,-?     --help             print short or long help message
@@ -89,6 +90,7 @@ M4SH_VERBATIM([[
 opt_commit=:
 opt_first=false
 opt_push=false
+opt_tags=false
 opt_update=:
 opt_verbose=false
 
@@ -237,6 +239,8 @@ set -e
                        shift
                        ;;
 
+      --tags)          opt_tags=:                              ;;
+
       --verbose|-v)    opt_verbose=:                           ;;
 
       # Separate optargs to long options:
@@ -283,6 +287,9 @@ set -e
       func_error "can't use --signature without --sendmail." && exit_cmd=exit
   fi
 
+  $opt_tags && test x"$opt_push" = xfalse &&
+    func_error "can't use --tags without --push." && exit_cmd=exit
+
   # Bail if the options were screwed
   $exit_cmd $EXIT_FAILURE
 }
@@ -366,7 +373,10 @@ func_commit ()
     func_verbose "$GIT commit$git_flags -F $log_file ${1+$@}"
     $GIT commit$git_flags -F $log_file ${1+"$@"} || exit $EXIT_FAILURE
 
-    $opt_push && $GIT push
+    if $opt_push; then
+      $GIT push
+      $opt_tags && $GIT push --tags
+    fi
 
     :
 }