Skip to content

Commit

Permalink
php: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
stanley-cheung committed Aug 22, 2016
1 parent daf4699 commit 557aa4e
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 12 deletions.
3 changes: 1 addition & 2 deletions examples/php/composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "grpc/grpc-demo",
"description": "gRPC example for PHP",
"minimum-stability": "dev",
"require": {
"grpc/grpc": "v0.15.2"
"grpc/grpc": "v1.0.0",
}
}
38 changes: 34 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
<date>2016-08-09</date>
<date>2016-08-22</date>
<time>16:06:07</time>
<version>
<release>1.1.0</release>
<api>1.1.0</api>
<release>1.1.0dev</release>
<api>1.1.0dev</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license>BSD</license>
<notes>
- Fixed Ubuntu compile error #7571, #7642
- TBD
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1154,5 +1154,35 @@ Update to wrap gRPC C Core version 0.10.0
- Fixed Ubuntu compile error #7571, #7642
</notes>
</release>
<release>
<version>
<release>1.0.0</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2016-08-18</date>
<license>BSD</license>
<notes>
- gRPC 1.0.0 release
</notes>
</release>
<release>
<version>
<release>1.1.0dev</release>
<api>1.1.0dev</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2016-08-22</date>
<license>BSD</license>
<notes>
- TBD
</notes>
</release>
</changelog>
</package>
2 changes: 1 addition & 1 deletion src/php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": ["rpc"],
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",
"version": "1.0.0",
"version": "1.1.0",
"require": {
"php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6"
Expand Down
34 changes: 32 additions & 2 deletions templates/package.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
<date>2016-08-09</date>
<date>2016-08-22</date>
<time>16:06:07</time>
<version>
<release>${settings.php_version.php()}</release>
Expand All @@ -24,7 +24,7 @@
</stability>
<license>BSD</license>
<notes>
- Fixed Ubuntu compile error #7571, #7642
- TBD
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -264,5 +264,35 @@
- Fixed Ubuntu compile error #7571, #7642
</notes>
</release>
<release>
<version>
<release>1.0.0</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2016-08-18</date>
<license>BSD</license>
<notes>
- gRPC 1.0.0 release
</notes>
</release>
<release>
<version>
<release>${settings.php_version.php()}</release>
<api>${settings.php_version.php()}</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2016-08-22</date>
<license>BSD</license>
<notes>
- TBD
</notes>
</release>
</changelog>
</package>
23 changes: 23 additions & 0 deletions templates/src/php/composer.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%YAML 1.2
--- |
{
"name": "grpc/grpc",
"type": "library",
"description": "gRPC library for PHP",
"keywords": ["rpc"],
"homepage": "http://grpc.io",
"license": "BSD-3-Clause",
"version": "${settings.php_version.php_composer()}",
"require": {
"php": ">=5.5.0",
"stanley-cheung/protobuf-php": "v0.6"
},
"require-dev": {
"google/auth": "v0.9"
},
"autoload": {
"psr-4": {
"Grpc\\": "lib/Grpc/"
}
}
}
17 changes: 14 additions & 3 deletions tools/buildgen/plugins/expand_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,21 @@ def ruby(self):
return '%d.%d.%d' % (self.major, self.minor, self.patch)

def php(self):
"""Version string in PHP style"""
"""PECL does not allow tag in version string"""
return '%d.%d.%d' % (self.major, self.minor, self.patch)
"""Version string for PHP PECL package"""
s = '%d.%d.%d' % (self.major, self.minor, self.patch)
if self.tag:
if self.tag == 'dev':
s += 'dev'
elif len(self.tag) >= 3 and self.tag[0:3] == 'pre':
s += 'RC%d' % int(self.tag[3:])
else:
raise Exception('Don\'t know how to translate version tag "%s" to PECL version' % self.tag)
return s

def php_composer(self):
"""Version string for PHP Composer package"""
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
Expand Down

0 comments on commit 557aa4e

Please sign in to comment.