r389 - scripts/trunk

Eddy Petrisor eddyp-guest at costa.debian.org
Fri Mar 31 16:06:32 UTC 2006


Author: eddyp-guest
Date: 2006-03-31 16:06:29 +0000 (Fri, 31 Mar 2006)
New Revision: 389

Added:
   scripts/trunk/preprel
Removed:
   scripts/trunk/prepare-release
Log:
bug: fixed wrong display of literal escapes
misc: improved the readability of the help function
misc: use -c instead of -n for --nocommit
file: renamed script to preprel to have a shorter name


Deleted: scripts/trunk/prepare-release
===================================================================
--- scripts/trunk/prepare-release	2006-03-30 08:40:28 UTC (rev 388)
+++ scripts/trunk/prepare-release	2006-03-31 16:06:29 UTC (rev 389)
@@ -1,138 +0,0 @@
-#!/bin/sh
-# vim:tw=75:wrap:fo=tcqn2:sw=4:sts=4:et
-
-# Prepare-release script, author "Eddy Petrișor" <eddy.petrisor AT gmail DOT com>
-# Copyright Eddy Petrișor, 2006
-# Licensed under the terms of GNU General Public License version 2, or 
-# later, at your choice.
-#
-
-
-
-# It is desirable that it should do most of the grunt work at a release, and
-# of course not mess anything ;-).
-#
-#
-# Task for the prepare script:
-# - fetch the next debian release version and the upstream relase version
-#   from the trunk of debian/changelog (save in internal VARIABLES)
-# - handles a release properly (if is told to do so):
-#   * change the suite from UNRELEASED to unstable (should be tunable)
-#   * auto tag (if specified) (assumes the developer uses a ssh-agent or will
-#     input password/passphrase)
-#   * autoincrement debian version and autoadd a changelog entry in trunk
-#   * prepare for next release's work the changelog entry
-#     (s/unstable/UNRELEASED)
-#   * commit in SVN
-# - handles a rebuild (must provide debian release version; no release will
-#   be done)
-#
-# (Idealy) the invocation should be of the form:
-#
-#  prepare --forrelease GAME
-#  or
-#  prepare --rebuild DEBVERSION GAME
-#
-# This should do the right thing for either cases.
-#
-#
-# NOTE: maybe some data in the repo that associate a package name with a
-# repo path, upstream path (watch files?) and subpackages might be a good
-# idea - see boson's packages for examples about such packages
-#
-
-
-help ()
-{
-    echo "SVN Debian package releaser" ; echo
-    echo " This program helps at releasing or rebuilding older relased"
-    echo " Debian packages kept in SVN. It should be able to deal both"
-    echo " with full packages as well as with Debian patches (diff.gz)."
-    echo; echo " Invocation:"
-    echo " \t$0 --release [[-n|--nocommit]|[-t|--notag]] [--suite SUITE] PACK"
-    echo " \t or"
-    echo " \t$0 --rebuild DEBVERSION PACK" ; echo
-    echo " --forrelease\n \tSearches through the file packs.prep for the"
-    echo " \tSVN link to the package in question, identifies the latest"
-    echo " \tDebian package version (by reading debian/changelog) that"
-    echo " \tshould have the suite set to UNRELEASED; then, if --nocommit"
-    echo " \tis absent, it will change the suite and commit into SVN, tag"
-    echo " \tthe newly committed version, increment the Debian version,"
-    echo " \tchange the suite to UNRELEASED and then commit yet again."
-    echo " -n | --nocommit"
-    echo " \tIf this parameter is given, no automatic SVN commiting will"
-    echo " \tbe done. This will not allow the relased version to be tagged."
-    echo " -t | --notag"
-    echo " \tBy default, the relased versions are also tagged in SVN. This"
-    echo " \toption allows the preapring to be done without tagging. Note"
-    echo " \tthat --notag will imply that there will be commits after suit"
-    echo " \tchanges. Please use --nocommit if you don't want this either."
-    echo " --suite SUITE"
-    echo " \tThe default suite name is 'unstable'. The suite name can be"
-    echo " \toverridden with this option." ; echo
-    echo " Note: in the current directory there should be a file called"
-    echo "    packs.prep which should contain the package options needed by"
-    echo "    the prepare script."
-}
-
-syntax_error()
-{
-    echo 2>&1 "$(basename $0): $*"
-    help
-    exit 1
-}
-
-warning()
-{
-    echo 2>&1 "$(basename $0): $*"
-}
-
-init ()
-{
-    # Assume a few default variables
-    [ -z $SUITE ] && SUITE=unstable
-    [ -z $COMMIT ] && COMMIT=yes
-    [ -z $TAG ] && TAG=yes
-    [ -z $PACK ] && PACK="NOPACK"
-
-    while [ $# -gt 0 ]
-    do
-        case $1 in
-        --suite=*)
-            SUITE=${1#--suite=}
-            shift
-            ;;
-        --suite|-s)
-            if [ $# -lt 2 ]; then syntax_error "$1 needs an argument"; fi
-            METHOD=$2
-            shift
-            shift
-            ;;
-        --notag|-t)
-            TAG=no
-            shift
-            ;;
-        --nocommit|-)
-            COMMIT=no
-            TAG=no
-            [ "$TAG" = "yes" ] && warning "$1 will not allow tagging"
-            shift
-            ;;
-        -*)
-            syntax_error "Unknown option \`$1'"
-            ;;
-        *)
-            [ $# -ne 1 ] && syntax_error "Only one package name is allowed"
-            ;;
-        esac
-    done
-}
-
-
-warning "$0 is not yet complete. Please be patient."
-warning "\n Help follows:"
-
-help
-exit 13
-
-

Copied: scripts/trunk/preprel (from rev 388, scripts/trunk/prepare-release)
===================================================================
--- scripts/trunk/prepare-release	2006-03-30 08:40:28 UTC (rev 388)
+++ scripts/trunk/preprel	2006-03-31 16:06:29 UTC (rev 389)
@@ -0,0 +1,147 @@
+#!/bin/sh
+# vim:tw=75:wrap:fo=tcqn2:sw=4:sts=4:et
+
+# Prepare-release script, author "Eddy Petrișor" <eddy.petrisor AT gmail DOT com>
+# Copyright Eddy Petrișor, 2006
+# Licensed under the terms of GNU General Public License version 2, or 
+# later, at your choice.
+#
+
+
+
+# It is desirable that it should do most of the grunt work at a release, and
+# of course not mess anything ;-).
+#
+#
+# Task for the prepare script:
+# - fetch the next debian release version and the upstream relase version
+#   from the trunk of debian/changelog (save in internal VARIABLES)
+# - handles a release properly (if is told to do so):
+#   * change the suite from UNRELEASED to unstable (should be tunable)
+#   * auto tag (if specified) (assumes the developer uses a ssh-agent or will
+#     input password/passphrase)
+#   * autoincrement debian version and autoadd a changelog entry in trunk
+#   * prepare for next release's work the changelog entry
+#     (s/unstable/UNRELEASED)
+#   * commit in SVN
+# - handles a rebuild (must provide debian release version; no release will
+#   be done)
+#
+# (Idealy) the invocation should be of the form:
+#
+#  prepare --forrelease GAME
+#  or
+#  prepare --rebuild DEBVERSION GAME
+#
+# This should do the right thing for either cases.
+#
+#
+# NOTE: maybe some data in the repo that associate a package name with a
+# repo path, upstream path (watch files?) and subpackages might be a good
+# idea - see boson's packages for examples about such packages
+#
+
+
+help ()
+{
+cat >&1 <<EOH
+
+SVN Debian package releaser
+
+ This program helps at releasing or rebuilding older relased
+ Debian packages kept in SVN. It should be able to deal both
+ with full packages as well as with Debian patches (diff.gz).
+
+ Invocation:
+
+  $0 --release [[-c|--nocommit]|[-t|--notag]] [-s|--suite SUITE] PACK
+      or
+  $0 --rebuild DEBVERSION PACK
+
+ --forrelease
+     Searches through the file packs.prep for the
+     SVN link to the package in question, identifies the latest
+     Debian package version (by reading debian/changelog) that
+     should have the suite set to UNRELEASED; then, if --nocommit
+     is absent, it will change the suite and commit into SVN, tag
+     the newly committed version, increment the Debian version,
+     change the suite to UNRELEASED and then commit yet again.
+ -n | --nocommit
+     If this parameter is given, no automatic SVN commiting will
+     be done. This will not allow the relased version to be tagged.
+ -t | --notag
+     By default, the relased versions are also tagged in SVN. This
+     option allows the preapring to be done without tagging. Note
+     that --notag will imply that there will be commits after suit
+     changes. Please use --nocommit if you don't want this either.
+ -s | --suite SUITE
+     The default suite name is 'unstable'. The suite name can be
+     overridden with this option.
+
+ Note: in the current directory there should be a file called
+    packs.prep which should contain the package options needed by
+    the prepare script.
+EOH
+}
+
+syntax_error()
+{
+    echo -e 2>&1 "$(basename $0): $*"
+    help
+    exit 1
+}
+
+warning()
+{
+    echo -e 2>&1 "$(basename $0): $*"
+}
+
+init ()
+{
+    # Assume a few default variables
+    [ -z $SUITE ] && SUITE=unstable
+    [ -z $COMMIT ] && COMMIT=yes
+    [ -z $TAG ] && TAG=yes
+    [ -z $PACK ] && PACK="NOPACK"
+
+    while [ $# -gt 0 ]
+    do
+        case $1 in
+        --suite=*)
+            SUITE=${1#--suite=}
+            shift
+            ;;
+        --suite|-s)
+            if [ $# -lt 2 ]; then syntax_error "$1 needs an argument"; fi
+            METHOD=$2
+            shift
+            shift
+            ;;
+        --notag|-t)
+            TAG=no
+            shift
+            ;;
+        --nocommit|-c)
+            COMMIT=no
+            TAG=no
+            [ "$TAG" = "yes" ] && warning "$1 will not allow tagging"
+            shift
+            ;;
+        -*)
+            syntax_error "Unknown option \`$1'"
+            ;;
+        *)
+            [ $# -ne 1 ] && syntax_error "Only one package name is allowed"
+            ;;
+        esac
+    done
+}
+
+
+warning "$0 is not yet complete. Please be patient."
+warning "Help follows...\n"
+
+help
+exit 13
+
+




More information about the Pkg-games-devel mailing list