summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Maas <opensource@till.name>2010-03-06 11:38:43 +0100
committerColin Walters <walters@verbum.org>2010-03-08 10:16:38 -0500
commitfa5c6d43058151d8d17a9ce0914892ade00a87c8 (patch)
treea512c1630cf180b5aa6b962caec0fafc7960c02d
parente757971d279437c742045dd81b7b08fcdc037b9b (diff)
downloadfedpkg-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-xfedpkg-vcs7
1 files changed, 6 insertions, 1 deletions
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()