diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-10 20:13:36 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2016-02-10 21:28:52 +0100 |
commit | 32b3f67438cb2793021885b414ff4fe47639734b (patch) | |
tree | 83742378a6a5db526bb1e78aee5ff9c413b92da2 /tools/buildgen | |
parent | 203041148a9e2510b5cad6c038dc53bab0741ac2 (diff) | |
parent | a8ba0c56158eca15cca58725a49a0ceb7e68e795 (diff) |
Merge remote-tracking branch 'google/release-0_13' into merge-and-regen
Conflicts:
build.yaml
src/ruby/lib/grpc/version.rb
Diffstat (limited to 'tools/buildgen')
-rwxr-xr-x | tools/buildgen/plugins/expand_version.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py index 4600c3224e..b55e1b15ff 100755 --- a/tools/buildgen/plugins/expand_version.py +++ b/tools/buildgen/plugins/expand_version.py @@ -51,6 +51,7 @@ LANGUAGES = [ class Version: def __init__(self, s): + self.tag = None if '-' in s: s, self.tag = s.split('-') self.major, self.minor, self.patch = [int(x) for x in s.split('.')] @@ -76,6 +77,13 @@ class Version: raise Exception('Don\'t know how to translate version tag "%s" to pep440' % self.tag) return s + def ruby(self): + """Version string in Ruby style""" + if self.tag: + return '%d.%d.%d.%s' % (self.major, self.minor, self.patch, self.tag) + else: + return '%d.%d.%d' % (self.major, self.minor, self.patch) + def mako_plugin(dictionary): """Expand version numbers: - for each language, ensure there's a language_version tag in |