Skip to content

Commit b3293f2

Browse files
committed
---
yaml --- r: 2475 b: refs/heads/update-datastore c: d039537 h: refs/heads/master i: 2473: 8be26fa 2471: 815b418
1 parent da0de47 commit b3293f2

5 files changed

Lines changed: 23 additions & 11 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3
66
refs/heads/pubsub-alpha: 1a0e970f265af871e02274085b9662b3fe29058b
77
refs/heads/resource-manager: ebf4adc5ee835cd2086c4ac5b4e78d01a5a005a7
8-
refs/heads/update-datastore: cf777fcaa578ebeace11dff3b75e774c9874c9a9
8+
refs/heads/update-datastore: d03953794cb5702f4953f2f468a034d2ae393915
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
1010
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
1111
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2

branches/update-datastore/RELEASING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ This script takes an optional argument denoting the new version. By default, if
1010
2. Create a PR to update the pom.xml version.
1111
The PR should look something like [#225](https://github.com/GoogleCloudPlatform/gcloud-java/pull/225). After this PR is merged into GoogleCloudPlatform/gcloud-java, Travis CI will push a new website to GoogleCloudPlatform/gh-pages, push a new artifact to the Maven Central Repository, and update versions in the README files.
1212

13-
3. Create a release on Github manually.
13+
3. Before moving on, verify that the artifacts have successfully been pushed to the Maven Central Repository. To do this, we need to check the Travis CI logs since the artifacts take a couple hours to appear on the Maven Central Repository's website. Open Travis CI, click the ["Build History" tab](https://travis-ci.org/GoogleCloudPlatform/gcloud-java/builds), and open the second build's logs for Step 2's PR. Be sure that you are not opening the "Pull Request" build logs; you should not be under the "Pull Requests" tab. When the build finishes, scroll to the end of the log and verify that the artifacts were successfully staged and deployed. If the deployment didn't succeed because of a flaky test, the artifact may still have been pushed by the next Travis build, "Updating READMEs." If both builds failed to deploy the artifacts, rerun the build.
14+
15+
4. Create a release on Github manually.
1416
Go to the [releases page](https://github.com/GoogleCloudPlatform/gcloud-java/releases) and click "Draft a new release." Use `vX.Y.Z` as the "Tag Version" and `X.Y.Z` as the "Release Title", where `X.Y.Z` is the release version as listed in the `pom.xml` files.
1517

16-
4. Run `utilities/update_pom_version.sh` again (to include "-SNAPSHOT" in the project version).
18+
5. Run `utilities/update_pom_version.sh` again (to include "-SNAPSHOT" in the project version).
1719
As mentioned before, there is an optional version argument. By default, the script will update the version from "X.Y.Z" to "X.Y.Z+1-SNAPSHOT". Suppose a different version is desired, for example X+1.0.0-SNAPSHOT. Then the appropriate command to run would be `utilities/update_pom_version.sh X+1.0.0-SNAPSHOT`.
1820

19-
5. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).
21+
6. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).
2022

2123
### To push a snapshot version
2224

branches/update-datastore/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,11 @@ protected static String getAppEngineProjectId() {
450450
try {
451451
Class<?> factoryClass =
452452
Class.forName("com.google.appengine.api.appidentity.AppIdentityServiceFactory");
453+
Class<?> serviceClass =
454+
Class.forName("com.google.appengine.api.appidentity.AppIdentityService");
453455
Method method = factoryClass.getMethod("getAppIdentityService");
454456
Object appIdentityService = method.invoke(null);
455-
method = appIdentityService.getClass().getMethod("getServiceAccountName");
457+
method = serviceClass.getMethod("getServiceAccountName");
456458
String serviceAccountName = (String) method.invoke(appIdentityService);
457459
int indexOfAtSign = serviceAccountName.indexOf('@');
458460
return serviceAccountName.substring(0, indexOfAtSign);

branches/update-datastore/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/package-info.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
/**
1818
* A client to the Google Cloud Datastore.
1919
*
20-
* <p>A simple usage example:
20+
* <p>Here's a simple usage example for using gcloud-java from App/Compute Engine:
2121
* <pre> {@code
22-
* DatastoreOptions options = DatastoreOptions.builder().projectId(PROJECT_ID).build();
23-
* Datastore datastore = options.service();
22+
* Datastore datastore = DatastoreOptions.defaultInstance().service();
2423
* KeyFactory keyFactory = datastore.newKeyFactory().kind(kind);
2524
* Key key = keyFactory.newKey(keyName);
2625
* Entity entity = datastore.get(key);
@@ -47,6 +46,11 @@
4746
* }
4847
* } </pre>
4948
*
49+
* <p>When using gcloud-java from outside of App/Compute Engine, you have to <a
50+
* href="https://github.com/GoogleCloudPlatform/gcloud-java#specifying-a-project-id">specify a
51+
* project ID</a> and
52+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java#authentication">provide
53+
* credentials</a>.
5054
* @see <a href="https://cloud.google.com/datastore/">Google Cloud Datastore</a>
5155
*/
5256
package com.google.gcloud.datastore;

branches/update-datastore/gcloud-java-storage/src/main/java/com/google/gcloud/storage/package-info.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
/**
1818
* A client to Google Cloud Storage.
1919
*
20-
* <p>A simple usage example:
20+
* <p>Here's a simple usage example for using gcloud-java from App/Compute Engine:
2121
* <pre>{@code
22-
* StorageOptions options = StorageOptions.builder().projectId("project").build();
23-
* Storage storage = options.service();
22+
* Storage storage = StorageOptions.defaultInstance().service();
2423
* BlobId blobId = BlobId.of("bucket", "blob_name");
2524
* Blob blob = Blob.load(storage, blobId);
2625
* if (blob == null) {
@@ -35,6 +34,11 @@
3534
* channel.close();
3635
* }}</pre>
3736
*
37+
* When using gcloud-java from outside of App/Compute Engine, you have to <a
38+
* href="https://github.com/GoogleCloudPlatform/gcloud-java#specifying-a-project-id">specify a
39+
* project ID</a> and
40+
* <a href="https://github.com/GoogleCloudPlatform/gcloud-java#authentication">provide
41+
* credentials</a>.
3842
* @see <a href="https://cloud.google.com/storage/">Google Cloud Storage</a>
3943
*/
4044
package com.google.gcloud.storage;

0 commit comments

Comments
 (0)