[Treepkg-commits] r464 - trunk/treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Oct 25 10:18:23 CEST 2010
Author: aheinecke
Date: 2010-10-25 10:18:21 +0200 (Mon, 25 Oct 2010)
New Revision: 464
Modified:
trunk/treepkg/packager.py
Log:
Expose package time and a short revision to the version templates.
Modified: trunk/treepkg/packager.py
===================================================================
--- trunk/treepkg/packager.py 2010-10-25 08:17:31 UTC (rev 463)
+++ trunk/treepkg/packager.py 2010-10-25 08:18:21 UTC (rev 464)
@@ -97,8 +97,10 @@
Default variables that can be resolved are:
revision - The revision of the package
+ short_revision - the first seven characters of the revision
rules_revision - The revision of the packaging rules
pkg_date - The current date in the form: YYYYMMDD
+ pkg_time - The current ime in the form: HHMM
pkg_revision - The number of times a new package has
been created from this track.
upstream_version - The version parsed from the sources or
@@ -108,7 +110,11 @@
revision = self.revision
rules_revision = self.parent.rules_revision
pkg_revision = self.parent.pkg_revision
+ short_revision = revision
+ if len(pkg_revision) > 7:
+ short_revision = short_revision[:7]
pkg_date = time.strftime("%Y%m%d", time.localtime())
+ pkg_time = time.strftime("%H%M", time.localtime())
upstream_version = self.determine_upstream_version(directory)
version_dict = locals().copy()
if type(additionals).__name__=='dict':
More information about the Treepkg-commits
mailing list