diff options
author | Till Maas <opensource@till.name> | 2010-03-06 11:38:43 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-03-08 10:16:38 -0500 |
commit | fa5c6d43058151d8d17a9ce0914892ade00a87c8 (patch) | |
tree | a512c1630cf180b5aa6b962caec0fafc7960c02d | |
parent | e757971d279437c742045dd81b7b08fcdc037b9b (diff) | |
download | fedpkg-make-pull-fa5c6d43058151d8d17a9ce0914892ade00a87c8.tar.gz fedpkg-make-pull-fa5c6d43058151d8d17a9ce0914892ade00a87c8.tar.xz fedpkg-make-pull-fa5c6d43058151d8d17a9ce0914892ade00a87c8.zip |
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
-rwxr-xr-x | fedpkg-vcs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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() |