Skip to content

Commit cd25b40

Browse files
authored
chore: remove release-please in generated README.md (#3289)
In this PR: - Remove release-please settings in README.md template because the version is managed by hermetic build.
1 parent 9ad9591 commit cd25b40

File tree

4 files changed

+238
-2
lines changed

4 files changed

+238
-2
lines changed

library_generation/owlbot/templates/java_library/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ If you are using Maven without the BOM, add this to your dependencies:
6464
{% else %}
6565
If you are using Maven, add this to your pom.xml file:
6666
{% endif %}
67-
<!-- {x-version-update-start:{{ artifact_id }}:released} -->
6867

6968
```xml
7069
{% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['api_shortname'] + '_install_without_bom'] -%}
@@ -99,7 +98,6 @@ If you are using SBT, add this to your dependencies:
9998
```Scala
10099
libraryDependencies += "{{ group_id }}" % "{{ artifact_id }}" % "{{ version }}"
101100
```
102-
<!-- {x-version-update-end} -->
103101

104102
## Authentication
105103

library_generation/test/owlbot/java_unit_tests.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,24 @@ def test_release_please_handle_releases(self):
278278
""",
279279
)
280280

281+
@mock.patch.dict(
282+
os.environ,
283+
{
284+
"SYNTHTOOL_TEMPLATES": f"{TEMPLATES_PATH}",
285+
"SYNTHTOOL_LIBRARY_VERSION": "1.2.3",
286+
},
287+
)
288+
def test_render_readme_success(self):
289+
golden_path = os.path.abspath(f"{TEST_OWLBOT}/testdata/README-golden.md")
290+
with util.copied_fixtures_dir(FIXTURES / "java_templates" / "render-readme"):
291+
# This method needs read .repo-metadata.json to render templates.
292+
# The file is located in FIXTURES/java_templates/render-readme.
293+
java.common_templates(
294+
template_path=TEMPLATES_PATH,
295+
)
296+
self.assertTrue(os.path.isfile("README.md"))
297+
self.assert_matches_golden(golden_path, "README.md")
298+
281299
def assert_matches_golden(self, expected, actual):
282300
matching_lines = 0
283301
with open(actual, "rt") as fp:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"api_shortname": "cloudasset",
3+
"name_pretty": "Cloud Asset Inventory",
4+
"product_documentation": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
5+
"api_reference": "https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview",
6+
"api_description": "provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.",
7+
"client_documentation": "https://googleapis.dev/java/google-cloud-asset/latest/index.html",
8+
"issue_tracker": "https://issuetracker.google.com/issues/new?component=187210&template=0",
9+
"release_level": "stable",
10+
"transport": "grpc",
11+
"requires_billing": true,
12+
"language": "java",
13+
"repo": "googleapis/java-asset",
14+
"repo_short": "java-asset",
15+
"distribution_name": "com.google.cloud:google-cloud-asset",
16+
"library_type": "GAPIC_AUTO",
17+
"api_id": "cloudasset.googleapis.com"
18+
}
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Google Cloud Asset Inventory Client for Java
2+
3+
Java idiomatic client for [Cloud Asset Inventory][product-docs].
4+
5+
[![Maven][maven-version-image]][maven-version-link]
6+
![Stability][stability-image]
7+
8+
- [Product Documentation][product-docs]
9+
- [Client Library Documentation][javadocs]
10+
11+
12+
:bus: In October 2022, this library has moved to
13+
[google-cloud-java/java-asset](
14+
https://github.com/googleapis/google-cloud-java/tree/main/java-asset).
15+
This repository will be archived in the future.
16+
Future releases will appear in the new repository (https://github.com/googleapis/google-cloud-java/releases).
17+
The Maven artifact coordinates (`com.google.cloud:google-cloud-asset`) remain the same.
18+
19+
## Quickstart
20+
21+
22+
If you are using Maven, add this to your pom.xml file:
23+
24+
25+
```xml
26+
<dependency>
27+
<groupId>com.google.cloud</groupId>
28+
<artifactId>google-cloud-asset</artifactId>
29+
<version>1.2.3</version>
30+
</dependency>
31+
```
32+
33+
If you are using Gradle without BOM, add this to your dependencies:
34+
35+
```Groovy
36+
implementation 'com.google.cloud:google-cloud-asset:1.2.3'
37+
```
38+
39+
If you are using SBT, add this to your dependencies:
40+
41+
```Scala
42+
libraryDependencies += "com.google.cloud" % "google-cloud-asset" % "1.2.3"
43+
```
44+
45+
## Authentication
46+
47+
See the [Authentication][authentication] section in the base directory's README.
48+
49+
## Authorization
50+
51+
The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Cloud Asset Inventory APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Cloud Asset Inventory API calls.
52+
53+
## Getting Started
54+
55+
### Prerequisites
56+
57+
You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Asset Inventory [API enabled][enable-api].
58+
You will need to [enable billing][enable-billing] to use Google Cloud Asset Inventory.
59+
[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
60+
[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
61+
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
62+
63+
### Installation and setup
64+
65+
You'll need to obtain the `google-cloud-asset` library. See the [Quickstart](#quickstart) section
66+
to add `google-cloud-asset` as a dependency in your code.
67+
68+
## About Cloud Asset Inventory
69+
70+
71+
[Cloud Asset Inventory][product-docs] provides inventory services based on a time series database. This database keeps a five week history of Google Cloud asset metadata. The Cloud Asset Inventory export service allows you to export all asset metadata at a certain timestamp or export event change history during a timeframe.
72+
73+
See the [Cloud Asset Inventory client library docs][javadocs] to learn how to
74+
use this Cloud Asset Inventory Client Library.
75+
76+
77+
78+
79+
80+
81+
## Troubleshooting
82+
83+
To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
84+
85+
## Transport
86+
87+
Cloud Asset Inventory uses gRPC for the transport layer.
88+
89+
## Supported Java Versions
90+
91+
Java 8 or above is required for using this client.
92+
93+
Google's Java client libraries,
94+
[Google Cloud Client Libraries][cloudlibs]
95+
and
96+
[Google Cloud API Libraries][apilibs],
97+
follow the
98+
[Oracle Java SE support roadmap][oracle]
99+
(see the Oracle Java SE Product Releases section).
100+
101+
### For new development
102+
103+
In general, new feature development occurs with support for the lowest Java
104+
LTS version covered by Oracle's Premier Support (which typically lasts 5 years
105+
from initial General Availability). If the minimum required JVM for a given
106+
library is changed, it is accompanied by a [semver][semver] major release.
107+
108+
Java 11 and (in September 2021) Java 17 are the best choices for new
109+
development.
110+
111+
### Keeping production systems current
112+
113+
Google tests its client libraries with all current LTS versions covered by
114+
Oracle's Extended Support (which typically lasts 8 years from initial
115+
General Availability).
116+
117+
#### Legacy support
118+
119+
Google's client libraries support legacy versions of Java runtimes with long
120+
term stable libraries that don't receive feature updates on a best efforts basis
121+
as it may not be possible to backport all patches.
122+
123+
Google provides updates on a best efforts basis to apps that continue to use
124+
Java 7, though apps might need to upgrade to current versions of the library
125+
that supports their JVM.
126+
127+
#### Where to find specific information
128+
129+
The latest versions and the supported Java versions are identified on
130+
the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME`
131+
and on [google-cloud-java][g-c-j].
132+
133+
## Versioning
134+
135+
136+
This library follows [Semantic Versioning](http://semver.org/).
137+
138+
139+
140+
## Contributing
141+
142+
143+
Contributions to this library are always welcome and highly encouraged.
144+
145+
See [CONTRIBUTING][contributing] for more information how to get started.
146+
147+
Please note that this project is released with a Contributor Code of Conduct. By participating in
148+
this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more
149+
information.
150+
151+
152+
## License
153+
154+
Apache 2.0 - See [LICENSE][license] for more information.
155+
156+
## CI Status
157+
158+
Java Version | Status
159+
------------ | ------
160+
Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2]
161+
Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3]
162+
Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4]
163+
Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
164+
165+
Java is a registered trademark of Oracle and/or its affiliates.
166+
167+
[product-docs]: https://cloud.google.com/resource-manager/docs/cloud-asset-inventory/overview
168+
[javadocs]: https://googleapis.dev/java/google-cloud-asset/latest/index.html
169+
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java7.svg
170+
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java7.html
171+
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java8.svg
172+
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java8.html
173+
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java8-osx.svg
174+
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java8-osx.html
175+
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java8-win.svg
176+
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java8-win.html
177+
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java11.svg
178+
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-asset/java11.html
179+
[stability-image]: https://img.shields.io/badge/stability-stable-green
180+
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-asset.svg
181+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-asset/1.2.3
182+
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
183+
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
184+
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
185+
[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
186+
[developer-console]: https://console.developers.google.com/
187+
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
188+
[cloud-cli]: https://cloud.google.com/cli
189+
[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md
190+
[contributing]: https://github.com/googleapis/java-asset/blob/main/CONTRIBUTING.md
191+
[code-of-conduct]: https://github.com/googleapis/java-asset/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
192+
[license]: https://github.com/googleapis/java-asset/blob/main/LICENSE
193+
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing
194+
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudasset.googleapis.com
195+
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
196+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
197+
198+
[semver]: https://semver.org/
199+
[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained
200+
[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries
201+
[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
202+
[g-c-j]: http://github.com/googleapis/google-cloud-java

0 commit comments

Comments
 (0)