Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
chore: clean up synth config, add gitignore (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 authored Nov 13, 2019
1 parent 07bac78 commit 5bf3315
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 34 deletions.
3 changes: 0 additions & 3 deletions .kokoro/release/drop.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-securitycenter/.kokoro/release/drop.sh"
}

# Download staging properties file.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-securitycenter"
4 changes: 0 additions & 4 deletions .kokoro/release/promote.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-securitycenter/.kokoro/release/promote.sh"
}

# Download staging properties file.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/java/releases/java-securitycenter"

17 changes: 12 additions & 5 deletions synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{
"updateTime": "2019-08-02T07:57:05.435964Z",
"updateTime": "2019-10-30T16:00:06.095312Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.32.0",
"dockerImage": "googleapis/artman@sha256:6929f343c400122d85818195b18613330a12a014bffc1e08499550d40571479d"
"version": "0.41.0",
"dockerImage": "googleapis/artman@sha256:75b38a3b073a7b243545f2332463096624c802bb1e56b8cb6f22ba1ecd325fa9"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "1b1ef1ca146c2119f077bca5e2b638c6bacb0925",
"internalRef": "261214002"
"sha": "7c4cf35d5fe3b8ad664bd219edd6d9f28a788b64",
"internalRef": "277334937"
}
},
{
"template": {
"name": "java_library",
"origin": "synthtool.gcp",
"version": "2019.10.17"
}
}
],
Expand Down
28 changes: 6 additions & 22 deletions synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,15 @@
config_pattern = '/google/cloud/securitycenter/artman_securitycenter_{version}.yaml'

for version in versions:
library = gapic.java_library(
java.gapic_library(
service=service,
version=version,
config_path=config_pattern.format(version=version),
artman_output_name='')

package_name = f'com.google.cloud.{service}.{version}'
java.fix_proto_headers(library / f'proto-google-cloud-{service}-{version}')
java.fix_grpc_headers(
library / f'grpc-google-cloud-{service}-{version}', package_name)

s.copy(
library / f'gapic-google-cloud-{service}-{version}/src', f'google-cloud-{service}/src')
s.copy(library / f'grpc-google-cloud-{service}-{version}/src',
f'grpc-google-cloud-{service}-{version}/src')
s.copy(library / f'proto-google-cloud-{service}-{version}/src',
f'proto-google-cloud-{service}-{version}/src')

java.format_code('./src')
java.format_code(f'grpc-google-cloud-{service}-{version}/src')
java.format_code(f'proto-google-cloud-{service}-{version}/src')
config_pattern=config_pattern,
gapic=gapic,
)

common_templates = gcp.CommonTemplates()
templates = common_templates.java_library()
s.copy(templates, excludes=[
'.gitignore',
'README.md',
])
'README.md',
])

0 comments on commit 5bf3315

Please sign in to comment.