diff options
author | 2016-04-28 00:01:16 +0200 | |
---|---|---|
committer | 2016-04-28 00:01:16 +0200 | |
commit | acbd8675a283a51a409991ac1393294c9af726e7 (patch) | |
tree | 01fa0ca4b463fd84edb3d3fbe2751ad76229b9d9 /templates/src | |
parent | 23df75a97054822e1a7f89ab5a0601d6bd4b3aa6 (diff) | |
parent | cec42984a0374465de9b2626f16b0efa960a66d0 (diff) |
Merge branch 'master' of https://github.com/grpc/grpc into what-the-fuzz
Diffstat (limited to 'templates/src')
-rw-r--r-- | templates/src/core/lib/surface/version.c.template (renamed from templates/src/core/surface/version.c.template) | 2 | ||||
-rw-r--r-- | templates/src/core/plugin_registry.template | 52 | ||||
-rw-r--r-- | templates/src/csharp/Grpc.Core/VersionInfo.cs.template | 13 | ||||
-rw-r--r-- | templates/src/csharp/build_packages.bat.template | 13 | ||||
-rw-r--r-- | templates/src/node/tools/package.json.template | 40 | ||||
-rw-r--r-- | templates/src/python/grpcio/grpc_core_dependencies.py.template | 2 | ||||
-rw-r--r-- | templates/src/python/grpcio/grpc_version.py.template | 2 | ||||
-rw-r--r-- | templates/src/ruby/lib/grpc/version.rb.template | 2 |
8 files changed, 112 insertions, 14 deletions
diff --git a/templates/src/core/surface/version.c.template b/templates/src/core/lib/surface/version.c.template index f2b3cfdc58..5f0273e49d 100644 --- a/templates/src/core/surface/version.c.template +++ b/templates/src/core/lib/surface/version.c.template @@ -2,7 +2,7 @@ --- | /* * - * Copyright 2015-2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/templates/src/core/plugin_registry.template b/templates/src/core/plugin_registry.template new file mode 100644 index 0000000000..352682c3f0 --- /dev/null +++ b/templates/src/core/plugin_registry.template @@ -0,0 +1,52 @@ +%YAML 1.2 +--- +foreach: libs +cond: selected.get('generate_plugin_registry', False) +output_name: ${selected.name}_plugin_registry.c +template: | + /* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + #include <grpc/grpc.h> + + %for plugin in selected.plugins: + extern void ${plugin}_init(void); + extern void ${plugin}_shutdown(void); + %endfor + + void grpc_register_built_in_plugins(void) { + %for plugin in selected.plugins: + grpc_register_plugin(${plugin}_init, + ${plugin}_shutdown); + %endfor + } diff --git a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template index 59864fa058..96cf2ee17f 100644 --- a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template +++ b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template @@ -2,7 +2,7 @@ --- | #region Copyright notice and license - // Copyright 2015-2016, Google Inc. + // Copyright 2015, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -37,13 +37,20 @@ { /// <summary> /// Provides info about current version of gRPC. + /// See https://codingforsmarties.wordpress.com/2016/01/21/how-to-version-assemblies-destined-for-nuget/ + /// for rationale about assembly versioning. /// </summary> public static class VersionInfo { /// <summary> - /// Current version of gRPC C# assemblies + /// Current <c>AssemblyVersion</c> attribute of gRPC C# assemblies /// </summary> - public const string CurrentAssemblyVersion = "${settings.version.major}.${settings.version.minor}.${settings.version.patch}.0"; + public const string CurrentAssemblyVersion = "1.0.0.0"; + + /// <summary> + /// Current <c>AssemblyFileVersion</c> of gRPC C# assemblies + /// </summary> + public const string CurrentAssemblyFileVersion = "${settings.version.major}.${settings.version.minor}.${settings.version.patch}.0"; /// <summary> /// Current version of gRPC C# diff --git a/templates/src/csharp/build_packages.bat.template b/templates/src/csharp/build_packages.bat.template index 32455683be..3b445a8ac9 100644 --- a/templates/src/csharp/build_packages.bat.template +++ b/templates/src/csharp/build_packages.bat.template @@ -14,12 +14,12 @@ @rem Collect the artifacts built by the previous build step if running on Jenkins @rem TODO(jtattermusch): is there a better way to do this? - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* grpc.native.csharp\windows_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* grpc.native.csharp\linux_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* grpc.native.csharp\macosx_x64${"\\"} + xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x86${"\\"} + xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x64${"\\"} + xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x86${"\\"} + xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x64${"\\"} + xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x86${"\\"} + xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x64${"\\"} @rem Collect protoc artifacts built by the previous build step xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86${"\\"} @@ -44,7 +44,6 @@ endlocal - %%NUGET% pack grpc.native.csharp\grpc.native.csharp.nuspec -Version %VERSION% || goto :error %%NUGET% pack Grpc.Auth\Grpc.Auth.nuspec -Symbols -Version %VERSION% || goto :error %%NUGET% pack Grpc.Core\Grpc.Core.nuspec -Symbols -Version %VERSION% || goto :error %%NUGET% pack Grpc.HealthCheck\Grpc.HealthCheck.nuspec -Symbols -Version %VERSION_WITH_BETA% -Properties ProtobufVersion=%PROTOBUF_VERSION% || goto :error diff --git a/templates/src/node/tools/package.json.template b/templates/src/node/tools/package.json.template new file mode 100644 index 0000000000..c69de7c989 --- /dev/null +++ b/templates/src/node/tools/package.json.template @@ -0,0 +1,40 @@ +%YAML 1.2 +--- | + { + "name": "grpc-tools", + "version": "${settings.node_version}", + "author": "Google Inc.", + "description": "Tools for developing with gRPC on Node.js", + "homepage": "http://www.grpc.io/", + "repository": { + "type": "git", + "url": "https://github.com/grpc/grpc.git" + }, + "bugs": "https://github.com/grpc/grpc/issues", + "contributors": [ + { + "name": "Michael Lumish", + "email": "mlumish@google.com" + } + ], + "bin": { + "grpc-tools-protoc": "./bin/protoc.js" + }, + "scripts": { + "install": "./node_modules/.bin/node-pre-gyp install" + }, + "bundledDependencies": ["node-pre-gyp"], + "binary": { + "module_name": "grpc_tools", + "host": "https://storage.googleapis.com/", + "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}", + "package_name": "{platform}-{arch}.tar.gz", + "module_path": "bin" + }, + "files": [ + "index.js", + "bin/protoc.js", + "LICENSE" + ], + "main": "index.js" + } diff --git a/templates/src/python/grpcio/grpc_core_dependencies.py.template b/templates/src/python/grpcio/grpc_core_dependencies.py.template index 2fc7a03f18..01770a9e91 100644 --- a/templates/src/python/grpcio/grpc_core_dependencies.py.template +++ b/templates/src/python/grpcio/grpc_core_dependencies.py.template @@ -1,6 +1,6 @@ %YAML 1.2 --- | - # Copyright 2015-2016, Google Inc. + # Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/templates/src/python/grpcio/grpc_version.py.template b/templates/src/python/grpcio/grpc_version.py.template index aaacab1a50..39a6932ebb 100644 --- a/templates/src/python/grpcio/grpc_version.py.template +++ b/templates/src/python/grpcio/grpc_version.py.template @@ -1,6 +1,6 @@ %YAML 1.2 --- | - # Copyright 2015-2016, Google Inc. + # Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/templates/src/ruby/lib/grpc/version.rb.template b/templates/src/ruby/lib/grpc/version.rb.template index 6488614aed..9c7bc13f6c 100644 --- a/templates/src/ruby/lib/grpc/version.rb.template +++ b/templates/src/ruby/lib/grpc/version.rb.template @@ -1,6 +1,6 @@ %YAML 1.2 --- | - # Copyright 2015-2016, Google Inc. + # Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without |