From fa5c6d43058151d8d17a9ce0914892ade00a87c8 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sat, 6 Mar 2010 11:38:43 +0100 Subject: fedpkg-vcs: fix release to match guidelines The release needs to include the date and the VCS type: https://fedoraproject.org/wiki/PackageNamingGuidelines#Snapshot_packages --- fedpkg-vcs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fedpkg-vcs b/fedpkg-vcs index 4327eba..752fc38 100755 --- a/fedpkg-vcs +++ b/fedpkg-vcs @@ -18,6 +18,7 @@ # Update the .spec file to include patch 0xdeadbeef from upstream # +import datetime import os import sys import re @@ -81,6 +82,8 @@ class Vcs(object): return GitVcs(combined) class GitVcs(Vcs): + vcstype = "git" + def checkout(self, destdir): self._vcs_exec(['git', 'clone', '--depth=1', self._nonfragment_url_string, destdir]) if self._branch: @@ -358,7 +361,9 @@ def command_pull_update(spec, vcs, vcsdir, args=[], opts={}): spec.substitute(buildsys.get_substitutions()) spec.set_source(snapshot_dirname, snapshot_archivename) - spec.increment_release_snapshot(newid) + now = datetime.datetime.now() + alphatag = "%s%s%s" % (now.strftime("%Y%m%d"), vcs.vcstype, newid) + spec.increment_release_snapshot(alphatag) spec.save() snapshot_md5 = hashlib.md5() -- cgit