[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8786 - in trunk: gnue-appserver/src gnue-common gnue-common/doc/
From: |
reinhard |
Subject: |
[gnue] r8786 - in trunk: gnue-appserver/src gnue-common gnue-common/doc/technotes gnue-common/src gnue-common/src/setup gnue-common/src/utils gnue-common/utils gnue-designer/src gnue-forms/src gnue-navigator/src gnue-reports/src |
Date: |
Sun, 15 Oct 2006 18:40:06 -0500 (CDT) |
Author: reinhard
Date: 2006-10-15 18:40:05 -0500 (Sun, 15 Oct 2006)
New Revision: 8786
Added:
trunk/gnue-common/src/utils/version.py
Modified:
trunk/gnue-appserver/src/__init__.py
trunk/gnue-common/doc/technotes/00011.txt
trunk/gnue-common/setup.py
trunk/gnue-common/src/__init__.py
trunk/gnue-common/src/setup/GSetup.py
trunk/gnue-common/utils/release
trunk/gnue-common/utils/release-announce
trunk/gnue-designer/src/__init__.py
trunk/gnue-forms/src/__init__.py
trunk/gnue-navigator/src/__init__.py
trunk/gnue-reports/src/__init__.py
Log:
Changed release concept as described in
http://lists.gnu.org/archive/html/gnue-dev/2006-08/msg00003.html
Modified: trunk/gnue-appserver/src/__init__.py
===================================================================
--- trunk/gnue-appserver/src/__init__.py 2006-10-15 22:56:14 UTC (rev
8785)
+++ trunk/gnue-appserver/src/__init__.py 2006-10-15 23:40:05 UTC (rev
8786)
@@ -1,6 +1,9 @@
+# GNU Enterprise Application Server
#
-# This file is part of GNU Enterprise.
+# Copyright 2001-2006 Free Software Foundation
#
+# This file is part of GNU Enterprise
+#
# GNU Enterprise is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
@@ -16,44 +19,26 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2001-2006 Free Software Foundation
-#
+# $Id$
+"""
+Application Server
+"""
-#
-# CREATING A RELEASE:
-# 1. Change _version to be the current version number
-# 2. Set _release to 1
-#
-# AFTER THE RELEASE:
-# 3. Increase the minor number
-# 4. Set _release = 0
-# 5. Commit to CVS
+from gnue.common.utils import version
-_version = (0,5,2)
-_release = 0
+try:
+ import svnrev
+ svn_revision = svnrev.svnrev
+except ImportError:
+ svn_revision = None
-# Version will be of the form "1.1.2" if a release or "1.1.1.99" if in CVS
-if _release:
- VERSION="%s.%s.%s" % _version
-else:
- _t = (("%08d" % (int("%02d%02d%02d00" % _version)-1) ).replace('99','') +
'99') + '0000000'
- if _t[6:8] != '00':
- extra = '.99'
- else:
- extra = ''
- VERSION = "%s.%s.%s%s" % (int(_t[:2]), int(_t[2:4]), int(_t[4:6]), extra)
+PACKAGE = "GNUe-AppServer"
+TITLE = "GNUe Application Server"
-# Hex Version will be an integer in which version 1.2.15 is represented
-# as 0x010215FF (for a release) or 0x01021500 (for a CVS snapshot)
-# This allows numeric testing of version numbers
-# (e.g., HEXVERSION >= 0x01020000)
-HEXVERSION = eval('0x%s%s' % ('%02d%02d%02d' % _version,
- _release and 'FF' or '00') )
+version = version.Version(0, 5, 'final', 1, svn_revision)
-# Sigh... For Python compatability
+VERSION = version.get_version()
+HEXVERSION = version.get_hexversion()
+
__version__ = VERSION
__hexversion__ = HEXVERSION
-
-
-PACKAGE="GNUe-AppServer"
-TITLE="GNUe Application Server"
Modified: trunk/gnue-common/doc/technotes/00011.txt
===================================================================
--- trunk/gnue-common/doc/technotes/00011.txt 2006-10-15 22:56:14 UTC (rev
8785)
+++ trunk/gnue-common/doc/technotes/00011.txt 2006-10-15 23:40:05 UTC (rev
8786)
@@ -1,7 +1,7 @@
Title: How To Make A Release
Status: Current
Created: 2003-10-14
-Revised: 2004-07-23
+Revised: 2006-10-15
How to make a release
---------------------
@@ -16,25 +16,11 @@
* Check if setup.py needs to be updated because of changes since the last
release (files added, files removed, ...).
-* Update the NEWS file (but leave the date open).
+* Update the NEWS file (leave the date open for prereleases).
+* In src/__init__.py, set the version number.
+
* Run the release script:
- "GNUE_VERSION_SUFFIX=-pre1 ../gnue-common/utils/release"
+ ../gnue-common/utils/release"
(if your locale LOGNAME is different from ash's, use
LOGNAME=your_local_logname)
-
-* Test installing the prerelease from tarball on different systems.
-
-* Let the packagers test packaging of the prerelease.
-
-* Update the NEWS file (i.e. fill in the missing release date).
-
-* In src/__init__.py, set _release to 1.
-
-* Run the release script:
- "../gnue-common/utils/release"
-
-* In src/__init__.py, set _version to the next version number, and _release to
- 0.
-
-* Commit everything to subversion.
Modified: trunk/gnue-common/setup.py
===================================================================
--- trunk/gnue-common/setup.py 2006-10-15 22:56:14 UTC (rev 8785)
+++ trunk/gnue-common/setup.py 2006-10-15 23:40:05 UTC (rev 8786)
@@ -25,10 +25,11 @@
import string
import os
from src.setup import ChangeLog
+from src.utils import version
from src import PACKAGE, VERSION
-
+
# =============================================================================
# Please keep these routines up to date
# =============================================================================
@@ -126,37 +127,50 @@
print "building translations"
if os.system ("cd po && make gmo") != 0:
sys.exit (1)
-
- else:
- # on non posix systems just run msgfmt on existing .po files
- if os.path.isdir ('po'):
- # msgfmt.py
- argv0_path = os.path.dirname(os.path.abspath(sys.executable))
- sys.path.append(argv0_path + "\\tools\\i18n")
-
- msgfmtOK = 0
- try:
- import msgfmt
- msgfmtOK = 1
- except:
+
+ else:
+ # on non posix systems just run msgfmt on existing .po files
+ if os.path.isdir ('po'):
+ # msgfmt.py
+ argv0_path = os.path.dirname(os.path.abspath(sys.executable))
+ sys.path.append(argv0_path + "\\tools\\i18n")
+
+ msgfmtOK = 0
+ try:
+ import msgfmt
+ msgfmtOK = 1
+ except:
pass
-
- if msgfmtOK == 1:
- # pygettext.py exist in Python, but no msgmerge, so
- # just create a placeholder...
- potfile = open('po/'+ PACKAGE.lower() +'.pot', 'w')
- potfile.write("#placeholder")
+
+ if msgfmtOK == 1:
+ # pygettext.py exist in Python, but no msgmerge, so
+ # just create a placeholder...
+ potfile = open('po/'+ PACKAGE.lower() +'.pot', 'w')
+ potfile.write("#placeholder")
potfile.close()
-
+
# build translations
- print "building translations"
- for f in os.listdir('po'):
- if f[-3:] == '.po':
- print f
- msgfmt.make ('po/'+f, 'po/'+f[:-3]+'.gmo')
- msgfmt.MESSAGES = {}
+ print "building translations"
+ for f in os.listdir('po'):
+ if f[-3:] == '.po':
+ print f
+ msgfmt.make ('po/'+f, 'po/'+f[:-3]+'.gmo')
+ msgfmt.MESSAGES = {}
# -----------------------------------------------------------------------------
+# Build the svnrev.py file.
+# Gets called on sdist (always) and on build/install (only when run from SVN).
+# -----------------------------------------------------------------------------
+
+def build_svnrev(filename):
+
+ print "building svnrev.py"
+ output = open(filename, 'w')
+ output.write('svnrev = %s' % version.get_svn_revision())
+ output.close()
+
+
+# -----------------------------------------------------------------------------
# Check dependencies for installation:
# Should sys.exit(1) in case any requirement isn't met.
# Gets called on install.
@@ -244,6 +258,11 @@
build_files ('sdist')
distutils.command.sdist.sdist.run (self)
+ def make_release_tree (self, base_dir, files):
+ distutils.command.sdist.sdist.make_release_tree (self, base_dir, files)
+ build_svnrev(os.path.join(base_dir, 'src', 'svnrev.py'))
+
+
# =============================================================================
# build: if done from SVN, build files to be installed first
# =============================================================================
@@ -254,6 +273,8 @@
if not os.path.isfile ("PKG-INFO"): # downloaded from SVN?
build_files ('build')
distutils.command.build.build.run (self)
+ if not os.path.isfile ("PKG-INFO"):
+ build_svnrev(os.path.join(self.build_lib, 'gnue', 'common', 'svnrev.py'))
# =============================================================================
# install: New option, generate path dependent files
@@ -440,19 +461,6 @@
return result
# -----------------------------------------------------------------------------
-# GNUE_VERSION_SUFFIX handling
-# -----------------------------------------------------------------------------
-
-# You can run:
-# $ GNUE_VERSION_SUFFIX=-pre1 ./setup.py sdist
-# and the packages will be created as GNUe-App-0.x.x-pre1.tar.gz
-
-try:
- suffix = os.environ['GNUE_VERSION_SUFFIX']
-except KeyError:
- suffix = ""
-
-# -----------------------------------------------------------------------------
# Call the actual setup routine
# -----------------------------------------------------------------------------
@@ -467,7 +475,7 @@
setup_params ["packages"] = packages
setup (name = setup_params ["name"],
- version = setup_params ["version"] + suffix,
+ version = setup_params ["version"],
description = setup_params ["description"],
long_description = setup_params ["long_description"],
author = setup_params ["author"],
Modified: trunk/gnue-common/src/__init__.py
===================================================================
--- trunk/gnue-common/src/__init__.py 2006-10-15 22:56:14 UTC (rev 8785)
+++ trunk/gnue-common/src/__init__.py 2006-10-15 23:40:05 UTC (rev 8786)
@@ -1,6 +1,9 @@
+# GNU Enterprise Common Library
#
-# This file is part of GNU Enterprise.
+# Copyright 2001-2006 Free Software Foundation
#
+# This file is part of GNU Enterprise
+#
# GNU Enterprise is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
@@ -16,48 +19,28 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2001-2006 Free Software Foundation
-#
-# Description:
+# $Id: ucsv.py 8581 2006-08-21 13:58:28Z johannes $
"""
GNUe Common is a set of python modules that provide a
large amount of functionality usefull in many python
programs.
"""
-# CREATING A RELEASE:
-# 1. Change _version to be the current version number
-# 2. Set _release to 1
-#
-# AFTER THE RELEASE:
-# 3. Increase the minor number
-# 4. Set _release = 0
-# 5. Commit to CVS
+from utils import version
-_version = (0,6,5)
-_release = 0
+try:
+ import svnrev
+ svn_revision = svnrev.svnrev
+except ImportError:
+ svn_revision = None
-# Version will be of the form "1.1.2" if a release or "1.1.1.99" if in CVS
-if _release:
- VERSION="%s.%s.%s" % _version
-else:
- _t = (("%08d" % (int("%02d%02d%02d00" % _version)-1) ).replace('99','') +
'99') + '0000000'
- if _t[6:8] != '00':
- extra = '.99'
- else:
- extra = ''
- VERSION = "%s.%s.%s%s" % (int(_t[:2]), int(_t[2:4]), int(_t[4:6]), extra)
+PACKAGE = "GNUe-Common"
+TITLE = "GNUe Common Library"
-# Hex Version will be an integer in which version 1.2.15 is represented
-# as 0x010215FF (for a release) or 0x01021500 (for a CVS snapshot)
-# This allows numeric testing of version numbers
-# (e.g., HEXVERSION >= 0x01020000)
-HEXVERSION = eval('0x%s%s' % ('%02d%02d%02d' % _version,
- _release and 'FF'
or '00') )
+version = version.Version(0, 6, 'final', 4, svn_revision)
-# Sigh... For Python compatability
+VERSION = version.get_version()
+HEXVERSION = version.get_hexversion()
+
__version__ = VERSION
__hexversion__ = HEXVERSION
-
-PACKAGE="GNUe-Common"
-TITLE="GNUe Common Library"
Modified: trunk/gnue-common/src/setup/GSetup.py
===================================================================
--- trunk/gnue-common/src/setup/GSetup.py 2006-10-15 22:56:14 UTC (rev
8785)
+++ trunk/gnue-common/src/setup/GSetup.py 2006-10-15 23:40:05 UTC (rev
8786)
@@ -29,6 +29,7 @@
import distutils.command.build
import distutils.command.install
import gnue.paths
+from gnue.common.utils import version
from gnue.common.setup import ChangeLog
# -----------------------------------------------------------------------------
@@ -71,6 +72,10 @@
_setup.do_build_files ('sdist')
distutils.command.sdist.sdist.run (self)
+ def make_release_tree (self, base_dir, files):
+ distutils.command.sdist.sdist.make_release_tree (self, base_dir, files)
+ _setup.do_build_svnrev (os.path.join(base_dir, 'src', 'svnrev.py'))
+
# =============================================================================
# build: if done from SVN, build files to be installed first
# =============================================================================
@@ -83,6 +88,9 @@
if not os.path.isfile ("PKG-INFO"): # downloaded from SVN?
_setup.do_build_files ('build')
distutils.command.build.build.run (self)
+ if not os.path.isfile ("PKG-INFO"):
+ _setup.do_build_svnrev (os.path.join(self.build_lib, 'gnue',
+ _setup.package[5:].lower(), 'svnrev.py'))
# =============================================================================
# install: Some user_options are no longer allowed
@@ -238,6 +246,17 @@
self.build_files (action)
# ---------------------------------------------------------------------------
+ # Build files if called from SVN
+ # ---------------------------------------------------------------------------
+
+ def do_build_svnrev (self, filename):
+
+ print "building svnrev.py"
+ output = open(filename, 'w')
+ output.write('svnrev = %s' % version.get_svn_revision())
+ output.close()
+
+ # ---------------------------------------------------------------------------
# Helper methods for descendants
# ---------------------------------------------------------------------------
@@ -276,7 +295,6 @@
setup_params = {"cmdclass_sdist": sdist,
"cmdclass_build": build,
"cmdclass_install": install,
- "suffix_var" : 'GNUE_VERSION_SUFFIX'
}
_setup.set_params (setup_params)
@@ -284,13 +302,7 @@
# make package available
self.package = setup_params ["name"]
- # handle version suffix
- try:
- suffix = os.environ[setup_params['suffix_var']]
- except KeyError:
- suffix = ""
-
# find out all packages
if not setup_params.has_key ("packages"):
packages = []
@@ -311,7 +323,7 @@
# now call setup
setup (name = setup_params ["name"],
- version = setup_params ["version"] + suffix,
+ version = setup_params ["version"],
description = setup_params ["description"],
long_description = setup_params ["long_description"],
author = setup_params ["author"],
Added: trunk/gnue-common/src/utils/version.py
===================================================================
--- trunk/gnue-common/src/utils/version.py 2006-10-15 22:56:14 UTC (rev
8785)
+++ trunk/gnue-common/src/utils/version.py 2006-10-15 23:40:05 UTC (rev
8786)
@@ -0,0 +1,190 @@
+# GNU Enterprise Common Library - Utilities - Version handling
+#
+# Copyright 2001-2006 Free Software Foundation
+#
+# This file is part of GNU Enterprise
+#
+# GNU Enterprise is free software; you can redistribute it
+# and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2, or (at your option) any later version.
+#
+# GNU Enterprise is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with program; see the file COPYING. If not,
+# write to the Free Software Foundation, Inc., 59 Temple Place
+# - Suite 330, Boston, MA 02111-1307, USA.
+#
+# $Id$
+"""
+Helper functions for version handling.
+"""
+
+__all__ = ['get_svn_revision', 'Version']
+
+import os
+import tempfile
+
+
+# =============================================================================
+# Find out current SVN revision
+# =============================================================================
+
+def get_svn_revision():
+ """
+ Find out the SVN revision of the last change in the current directory.
+
+ The current directory must be an SVN checkout, and the "svn" command must
+ be available.
+
+ This function only works on POSIX systems. On other systems, it returns
+ "unknown".
+
+ If the environment variable "GNUE_BUILD" is set, the function returns 0.
+ """
+
+ if os.environ.has_key('GNUE_BUILD'):
+ return 0
+
+ if os.name != 'posix':
+ return 'unknown'
+
+ cmd = "LANG=C svn info | grep 'Last Changed Rev:' " + \
+ "| sed -e 's/Last Changed Rev: //'"
+
+ filename = tempfile.mktemp('svnrev')
+ os.system(cmd + '> %s' % filename)
+
+ f = file(filename, 'r')
+ rev = int(f.read())
+ f.close()
+ os.remove(filename)
+
+ return rev
+
+
+# =============================================================================
+# Version class
+# =============================================================================
+
+class Version:
+ """
+ A version number consisting of several parts.
+
+ A version number defined by this class can be one of 4 types:
+
+ Unstable Build
+ ==============
+ A version number for an unstable build follows the format
+ <major>.<minor>-<phase><build> (e.g. "1.5-pre2").
+
+ Unstable Snapshot
+ =================
+ A version number for an unstable SVN snapshot follows the format
+ <major>.<minor>-<phase><build>+svn.<svn> (e.g. "1.5-pre2+svn.9876).
+
+ Stable Build
+ ============
+ A version number for a stable build follows the format
+ <major>.<minor>.<build> (e.g. 1.5.2).
+
+ Stable Snapshot
+ ===============
+ A version number for a stable snapshot follows the format
+ <major>.<minor>.<build>+svn.<svn> (e.g. 1.5.2+svn.9876).
+ """
+
+ __phases = {
+ 'alpha': 'a',
+ 'beta': 'b',
+ 'pre': 'd',
+ 'rc': 'e',
+ 'final': 'f'}
+
+ # -------------------------------------------------------------------------
+ # Constructor
+ # -------------------------------------------------------------------------
+
+ def __init__(self, major, minor, phase, build, svn):
+ """
+ Create a new Version object instance.
+
+ @param major: Major release number.
+ @param minor: Minor release number.
+ @param phase: Phase of the release process. Can be 'alpha', 'beta',
+ 'pre', 'rc', or 'final'. If the phase is 'final', it is a stable
+ version, otherwise it's an unstable version.
+ @param build: Build number within the phase.
+ @param svn: SVN revision number. If this parameter is 0, the version is
+ an explicit build, otherwise it's an SVN snapshot. If this
+ parameter is Null, the SVN revision is determined automatically.
+ """
+
+ assert isinstance (major, int) and major < 100
+ assert isinstance (minor, int) and minor < 100
+ assert phase in self.__phases.keys()
+ assert isinstance (build, int) and build < 10
+ assert svn is None or isinstance (svn, int)
+
+ self.major = major
+ self.minor = minor
+ self.phase = phase
+ self.build = build
+ self.svn = svn
+
+ if self.svn is None:
+ self.svn = get_svn_revision()
+
+
+ # -------------------------------------------------------------------------
+ # Get version number
+ # -------------------------------------------------------------------------
+
+ def get_version(self):
+ """
+ Return the version number as a human readable string.
+ """
+
+ if self.phase == 'final':
+ result = '%s.%s.%s' % (self.major, self.minor, self.build)
+ else:
+ result = '%s.%s-%s%s' % (self.major, self.minor, self.phase,
+ self.build)
+
+ if self.svn:
+ result += '+svn.%s' % self.svn
+
+ return result
+
+
+ # -------------------------------------------------------------------------
+ # Get hexversion number
+ # -------------------------------------------------------------------------
+
+ def get_hexversion(self):
+ """
+ Return the version number as an eight character hexadecimal number.
+ Later versions will always result in higher numbers.
+ """
+
+ if not self.svn:
+ svn = '00'
+ else:
+ svn = '80'
+
+ return '%02d%02d%s%01d%s' % (self.major, self.minor,
+ self.__phases[self.phase], self.build, svn)
+
+
+# =============================================================================
+# Self test code
+# =============================================================================
+
+if __name__ == '__main__':
+ version = Version(1, 5, 'beta', 3, None)
+ print version.get_version()
+ print version.get_hexversion()
Property changes on: trunk/gnue-common/src/utils/version.py
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: trunk/gnue-common/utils/release
===================================================================
--- trunk/gnue-common/utils/release 2006-10-15 22:56:14 UTC (rev 8785)
+++ trunk/gnue-common/utils/release 2006-10-15 23:40:05 UTC (rev 8786)
@@ -7,21 +7,12 @@
fi
package=$(basename $(pwd) | sed -e 's/gnue-//')
-version=$(echo "import src; print src.VERSION" | gcvs)
-release=$(echo "import src; print src._release" | gcvs)
+version=$(echo "import src; print src.version.get_version()" | gcvs)
+phase=$(echo "import src; print src.version.phase" | gcvs)
+build=$(echo "import src; print src.version.build" | gcvs)
-if [ "$release" == "1" -a "$GNUE_VERSION_SUFFIX" != "" ]; then
- echo "Don't set GNUE_VERSION_SUFFIX for final releases!"
- exit 1
-fi
+echo "Releasing version $version of gnue-$package"
-if [ "$release" == "0" -a "$GNUE_VERSION_SUFFIX" == "" ]; then
- echo "Please set GNUE_VERSION_SUFFIX for prereleases!"
- exit 1
-fi
-
-echo "Releasing version $version$GNUE_VERSION_SUFFIX of gnue-$package"
-
# Update svn so we don't forget any changes
svn update
@@ -47,7 +38,7 @@
sleep 20
# Commit to svn
-svn commit --message "Released ${version}${GNUE_VERSION_SUFFIX}."
+svn commit --message "Released ${version}."
# Wait for firewall
sleep 20
@@ -59,7 +50,7 @@
sleep 20
# Post to web
-if [ "$release" == "1" ]; then
+if [ "$phase" == "final" ]; then
scp dist/* address@hidden:/usr/local/www/gnue/htdocs/downloads/releases
else
scp dist/* address@hidden:/usr/local/www/gnue/htdocs/downloads/prereleases
@@ -69,8 +60,8 @@
sleep 20
# Tag subversion
-if [ "$release" == "1" ]; then
- svn copy --message "Released ${version}${GNUE_VERSION_SUFFIX}." . \
+if [ "$phase" == "final" -a "$build" == "0" ]; then
+ svn copy --message "Released ${version}." . \
svn+ssh://svn.gnuenterprise.org/var/svn/gnue/tags/$package-$version
fi
Modified: trunk/gnue-common/utils/release-announce
===================================================================
--- trunk/gnue-common/utils/release-announce 2006-10-15 22:56:14 UTC (rev
8785)
+++ trunk/gnue-common/utils/release-announce 2006-10-15 23:40:05 UTC (rev
8786)
@@ -12,21 +12,12 @@
package=$(basename $(pwd) | sed -e 's/gnue-//')
title=$(echo "import src; print src.TITLE" | gcvs)
-version=$(echo "import src; print src.VERSION" | gcvs)
-release=$(echo "import src; print src._release" | gcvs)
+version=$(echo "import src; print src.version.get_version()" | gcvs)
+phase=$(echo "import src; print src.version.phase" | gcvs)
+build=$(echo "import src; print src.version.build" | gcvs)
-if [ "$release" == "1" -a "$GNUE_VERSION_SUFFIX" != "" ]; then
- echo "Don't set GNUE_VERSION_SUFFIX for final releases!"
- exit 1
-fi
+echo "Announcing version $version of gnue-$package"
-if [ "$release" == "0" -a "$GNUE_VERSION_SUFFIX" == "" ]; then
- echo "Please set GNUE_VERSION_SUFFIX for prereleases!"
- exit 1
-fi
-
-echo "Announcing version $version$GNUE_VERSION_SUFFIX of gnue-$package"
-
# Get project description from README file
description=$(
cat README | (
@@ -62,25 +53,70 @@
announcement=$(
echo "The GNU Enterprise team proudly announces"
echo ""
- echo " $title $version$GNUE_VERSION_SUFFIX."
+ echo " $title $version."
echo ""
- if [ "$release" == "0" ]; then
+ if [ "$phase" == "alpha" ]; then
echo ""
- echo "This is a preview release and mainly targeted at developers,"
- echo "packagers and translators. You can expect the final release"
- echo "within a few days."
+ echo "This is an unstable alpha version and mainly targeted at"
+ echo "developers."
echo ""
echo ""
+ echo "This version is likely to have bugs. If you want to use the"
+ echo "program in production, please consider using the latest"
+ echo "stable version instead."
+ echo ""
+ fi
+ if [ "$phase" == "beta" ]; then
+ echo ""
+ echo "This is an unstable beta version and mainly targeted at"
+ echo "developers."
+ echo ""
+ echo ""
+ echo "This version might still have bugs. If you want to use the"
+ echo "program in production, please consider using the latest"
+ echo "stable version instead."
+ echo ""
+ fi
+ if [ "$phase" == "pre" ]; then
+ echo ""
+ echo "This is a prerelease version and mainly targeted at"
+ echo "developers, packagers and translators. You can expect the"
+ echo "final release within a few days or weeks."
+ echo ""
+ echo ""
echo "We request all translators to send in their translations as"
echo "soon as possible so they can be included in the final release."
echo ""
fi
+ if [ "$phase" == "rc" ]; then
+ echo ""
+ echo "This version is a release candidate and mainly targeted at"
+ echo "developers, packagers and translators. You can expect the"
+ echo "final release within a few days."
+ echo ""
+ echo ""
+ echo "We request all translators to send in their translations as"
+ echo "soon as possible so they can be included in the final release."
+ echo ""
+ fi
+ if [ "$phase" == "final" ]; then
+ if [ "$build" == "0" ]; then
+ echo ""
+ echo "This is the new stable version."
+ echo ""
+ else
+ echo ""
+ echo "This is an updated stable version and contains only bug"
+ echo "fixes and/or translation updates."
+ echo ""
+ fi
+ fi
echo ""
echo "$description" | fmt --width=72
echo ""
- if [ "$release" == "1" ]; then
+ if [ "$phase" == "final" ]; then
echo ""
- echo "Changes and new features in this release:"
+ echo "Changes and new features since the last stable version:"
echo ""
echo "$changes"
echo ""
@@ -91,33 +127,33 @@
) | fmt --width=72
else
echo ""
- echo "This prerelease contains the following changes and new"
- echo "features of the upcoming final release:"
+ echo "This version already contains the following changes and new"
+ echo "features of the planned final release:"
echo ""
echo "$changes"
echo ""
echo ""
(
- echo "As usual, you can download the prerelease of $title from"
+ echo "As usual, you can download the unstable builds of $title from"
echo "http://www.gnuenterprise.org/downloads/prereleases.php"
) | fmt --width=72
fi
)
# Send the email
-if [ "$release" == "1" ]; then
+if [ "$phase" == "final" ]; then
mail="$mail_release"
else
mail="$mail_prerelease"
fi
for recepient in $mail; do
echo "$announcement" | mail -a "From: address@hidden" \
- -s "$title $version$GNUE_VERSION_SUFFIX released" \
+ -s "$title $version released" \
$recepient
done
# Create news entry for the web page
-if [ "$release" == "1" ]; then
+if [ "$phase" == "final" ]; then
(
cd ../www/news
@@ -128,7 +164,7 @@
let number="$(ls 1* | tail -1) + 1"
(
- echo "Title: $title $version$GNUE_VERSION_SUFFIX released"
+ echo "Title: $title $version released"
echo "Author: address@hidden"
echo "Date: $(date --iso)"
echo ""
@@ -139,6 +175,6 @@
# Wait for firewall
sleep 20
- svn commit --message "Released $title ${version}${GNUE_VERSION_SUFFIX}."
+ svn commit --message "Released $title ${version}."
)
fi
Modified: trunk/gnue-designer/src/__init__.py
===================================================================
--- trunk/gnue-designer/src/__init__.py 2006-10-15 22:56:14 UTC (rev 8785)
+++ trunk/gnue-designer/src/__init__.py 2006-10-15 23:40:05 UTC (rev 8786)
@@ -1,8 +1,8 @@
-# GNU Enterprise Designer
+# GNU Enterprise Forms
#
# Copyright 2001-2006 Free Software Foundation
#
-# This file is part of GNU Enterprise.
+# This file is part of GNU Enterprise
#
# GNU Enterprise is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
@@ -20,49 +20,25 @@
# - Suite 330, Boston, MA 02111-1307, USA.
#
# $Id$
-
"""
+Form management.
"""
+from gnue.common.utils import version
+try:
+ import svnrev
+ svn_revision = svnrev.svnrev
+except ImportError:
+ svn_revision = None
-#
-# CREATING A RELEASE:
-# 1. Change _version to be the current version number
-# 2. Set _release to 1
-#
-# AFTER THE RELEASE:
-# 3. Increase the minor number
-# 4. Set _release = 0
-# 5. Commit to CVS
+PACKAGE = "GNUe-Designer"
+TITLE = "GNUe Designer"
-_version = (0,5,8)
-_release = 0
+version = version.Version(0, 5, 'final', 7, svn_revision)
-# Version will be of the form "1.1.2" if a release or "1.1.1.99" if in CVS
-if _release:
- VERSION="%s.%s.%s" % _version
-else:
- _t = (("%08d" % (int("%02d%02d%02d00" % _version)-1) ).replace('99','') +
'99') + '0000000'
- if _t[6:8] != '00':
- extra = '.99'
- else:
- extra = ''
- VERSION = "%s.%s.%s%s" % (int(_t[:2]), int(_t[2:4]), int(_t[4:6]), extra)
+VERSION = version.get_version()
+HEXVERSION = version.get_hexversion()
-# Hex Version will be an integer in which version 1.2.15 is represented
-# as 0x010215FF (for a release) or 0x01021500 (for a CVS snapshot)
-# This allows numeric testing of version numbers
-# (e.g., HEXVERSION >= 0x01020000)
-HEXVERSION = eval('0x%s%s' % ('%02d%02d%02d' % _version,
- _release and 'FF' or '00') )
-
-# Sigh... For Python compatability
__version__ = VERSION
__hexversion__ = HEXVERSION
-
-PACKAGE='GNUe-Designer'
-TITLE = 'GNUe Designer'
-
-from app.documents import register_document_type
-
Modified: trunk/gnue-forms/src/__init__.py
===================================================================
--- trunk/gnue-forms/src/__init__.py 2006-10-15 22:56:14 UTC (rev 8785)
+++ trunk/gnue-forms/src/__init__.py 2006-10-15 23:40:05 UTC (rev 8786)
@@ -1,6 +1,9 @@
+# GNU Enterprise Forms
#
-# This file is part of GNU Enterprise.
+# Copyright 2001-2006 Free Software Foundation
#
+# This file is part of GNU Enterprise
+#
# GNU Enterprise is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
@@ -16,45 +19,26 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2001-2006 Free Software Foundation
-#
+# $Id: ucsv.py 8581 2006-08-21 13:58:28Z johannes $
"""
-GNUe Forms base module
+Form management.
"""
-# CREATING A RELEASE:
-# 1. Change _version to be the current version number
-# 2. Set _release to 1
-#
-# AFTER THE RELEASE:
-# 3. Increase the minor number
-# 4. Set _release = 0
-# 5. Commit to CVS
+from gnue.common.utils import version
-_version = (0,6,0)
-_release = 0
+try:
+ import svnrev
+ svn_revision = svnrev.svnrev
+except ImportError:
+ svn_revision = None
-# Version will be of the form "1.1.2" if a release or "1.1.1.99" if in CVS
-if _release:
- VERSION="%s.%s.%s" % _version
-else:
- _t = (("%08d" % (int("%02d%02d%02d00" % _version)-1) ).replace('99','') +
'99') + '0000000'
- if _t[6:8] != '00':
- extra = '.99'
- else:
- extra = ''
- VERSION = "%s.%s.%s%s" % (int(_t[:2]), int(_t[2:4]), int(_t[4:6]), extra)
+PACKAGE = "GNUe-Forms"
+TITLE = "GNUe Forms"
-# Hex Version will be an integer in which version 1.2.15 is represented
-# as 0x010215FF (for a release) or 0x01021500 (for a CVS snapshot)
-# This allows numeric testing of version numbers
-# (e.g., HEXVERSION >= 0x01020000)
-HEXVERSION = eval('0x%s%s' % ('%02d%02d%02d' % _version,
- _release and 'FF' or '00') )
+version = version.Version(0, 6, 'alpha', 0, svn_revision)
-# Sigh... For Python compatability
+VERSION = version.get_version()
+HEXVERSION = version.get_hexversion()
+
__version__ = VERSION
__hexversion__ = HEXVERSION
-
-PACKAGE="GNUe-Forms"
-TITLE="GNUe Forms"
Modified: trunk/gnue-navigator/src/__init__.py
===================================================================
--- trunk/gnue-navigator/src/__init__.py 2006-10-15 22:56:14 UTC (rev
8785)
+++ trunk/gnue-navigator/src/__init__.py 2006-10-15 23:40:05 UTC (rev
8786)
@@ -1,6 +1,9 @@
+# GNU Enterprise Navigator
#
-# This file is part of GNU Enterprise.
+# Copyright 2001-2006 Free Software Foundation
#
+# This file is part of GNU Enterprise
+#
# GNU Enterprise is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
@@ -16,45 +19,26 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2001-2006 Free Software Foundation
-#
+# $Id: ucsv.py 8581 2006-08-21 13:58:28Z johannes $
+"""
+Navigator.
+"""
+from gnue.common.utils import version
-#
-# CREATING A RELEASE:
-# 1. Change _version to be the current version number
-# 2. Set _release to 1
-#
-# AFTER THE RELEASE:
-# 3. Increase the minor number
-# 4. Set _release = 0
-# 5. Commit to CVS
+try:
+ import svnrev
+ svn_revision = svnrev.svnrev
+except ImportError:
+ svn_revision = None
-_version = (0,0,10)
-_release = 0
+PACKAGE = "GNUe-Navigator"
+TITLE = "GNUe Navigator"
-# Version will be of the form "1.1.2" if a release or "1.1.1.99" if in CVS
-if _release:
- VERSION="%s.%s.%s" % _version
-else:
- _t = (("%08d" % (int("%02d%02d%02d00" % _version)-1) ).replace('99','') +
'99') + '0000000'
- if _t[6:8] != '00':
- extra = '.99'
- else:
- extra = ''
- VERSION = "%s.%s.%s%s" % (int(_t[:2]), int(_t[2:4]), int(_t[4:6]), extra)
+version = version.Version(0, 1, 'alpha', 0, svn_revision)
-# Hex Version will be an integer in which version 1.2.15 is represented
-# as 0x010215FF (for a release) or 0x01021500 (for a CVS snapshot)
-# This allows numeric testing of version numbers
-# (e.g., HEXVERSION >= 0x01020000)
-HEXVERSION = eval('0x%s%s' % ('%02d%02d%02d' % _version,
- _release and 'FF' or '00') )
+VERSION = version.get_version()
+HEXVERSION = version.get_hexversion()
-# Sigh... For Python compatability
__version__ = VERSION
__hexversion__ = HEXVERSION
-
-
-PACKAGE="GNUe-Navigator"
-TITLE="GNUe Navigator"
Modified: trunk/gnue-reports/src/__init__.py
===================================================================
--- trunk/gnue-reports/src/__init__.py 2006-10-15 22:56:14 UTC (rev 8785)
+++ trunk/gnue-reports/src/__init__.py 2006-10-15 23:40:05 UTC (rev 8786)
@@ -1,6 +1,9 @@
+# GNU Enterprise Reports
#
-# This file is part of GNU Enterprise.
+# Copyright 2001-2006 Free Software Foundation
#
+# This file is part of GNU Enterprise
+#
# GNU Enterprise is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
@@ -16,45 +19,26 @@
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
-# Copyright 2000-2006 Free Software Foundation
-#
+# $Id: ucsv.py 8581 2006-08-21 13:58:28Z johannes $
+"""
+Report generator.
+"""
+from gnue.common.utils import version
-#
-# CREATING A RELEASE:
-# 1. Change _version to be the current version number
-# 2. Set _release to 1
-#
-# AFTER THE RELEASE:
-# 3. Increase the minor number
-# 4. Set _release = 0
-# 5. Commit to CVS
+try:
+ import svnrev
+ svn_revision = svnrev.svnrev
+except ImportError:
+ svn_revision = None
-_version = (0,1,9)
-_release = 1
+PACKAGE = "GNUe-Reports"
+TITLE = "GNUe Reports"
-# Version will be of the form "1.1.2" if a release or "1.1.1.99" if in CVS
-if _release:
- VERSION="%s.%s.%s" % _version
-else:
- _t = (("%08d" % (int("%02d%02d%02d00" % _version)-1) ).replace('99','') +
'99') + '0000000'
- if _t[6:8] != '00':
- extra = '.99'
- else:
- extra = ''
- VERSION = "%s.%s.%s%s" % (int(_t[:2]), int(_t[2:4]), int(_t[4:6]), extra)
+version = version.Version(0, 1, 'final', 9, svn_revision)
-# Hex Version will be an integer in which version 1.2.15 is represented
-# as 0x010215FF (for a release) or 0x01021500 (for a CVS snapshot)
-# This allows numeric testing of version numbers
-# (e.g., HEXVERSION >= 0x01020000)
-HEXVERSION = eval('0x%s%s' % ('%02d%02d%02d' % _version,
- _release and 'FF' or '00') )
+VERSION = version.get_version()
+HEXVERSION = version.get_hexversion()
-# Sigh... For Python compatability
__version__ = VERSION
__hexversion__ = HEXVERSION
-
-
-PACKAGE="GNUe-Reports"
-TITLE="GNUe Reports"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8786 - in trunk: gnue-appserver/src gnue-common gnue-common/doc/technotes gnue-common/src gnue-common/src/setup gnue-common/src/utils gnue-common/utils gnue-designer/src gnue-forms/src gnue-navigator/src gnue-reports/src,
reinhard <=