Skip to content

Commit d7a7c86

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 6105 b: refs/heads/tswast-patch-1 c: 63d01ce h: refs/heads/master i: 6103: 2871624
1 parent 66e21da commit d7a7c86

5 files changed

Lines changed: 25 additions & 14 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: c02fe27836b24f29be0fef075ab41dccff34780c
60+
refs/heads/tswast-patch-1: 63d01ce437641850633c63bdcbf9720489413698
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-core/src/main/java/com/google/gcloud/ServiceOptions.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public B serviceRpcFactory(ServiceRpcFactory<ServiceRpcT, OptionsT> serviceRpcFa
154154

155155
protected ServiceOptions(Builder<ServiceRpcT, OptionsT, ?> builder) {
156156
projectId = checkNotNull(builder.projectId != null ? builder.projectId : defaultProject());
157-
host = firstNonNull(builder.host, defaultHost());
157+
host = firstNonNull(builder.host, DEFAULT_HOST);
158158
httpTransportFactory =
159159
firstNonNull(builder.httpTransportFactory, DefaultHttpTransportFactory.INSTANCE);
160160
authCredentials = firstNonNull(builder.authCredentials, defaultAuthCredentials());
@@ -191,10 +191,6 @@ protected static String appEngineAppId() {
191191
return System.getProperty("com.google.appengine.application.id");
192192
}
193193

194-
protected String defaultHost() {
195-
return DEFAULT_HOST;
196-
}
197-
198194
protected String defaultProject() {
199195
String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME));
200196
if (projectId == null) {

branches/tswast-patch-1/gcloud-java-datastore/src/main/java/com/google/gcloud/datastore/DatastoreOptions.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public class DatastoreOptions extends ServiceOptions<DatastoreRpc, DatastoreOpti
3838

3939
private static final long serialVersionUID = -8636602944160689193L;
4040
private static final String DATASET_ENV_NAME = "DATASTORE_DATASET";
41-
private static final String HOST_ENV_NAME = "DATASTORE_HOST";
4241
private static final String DATASTORE_SCOPE = "https://www.googleapis.com/auth/datastore";
4342
private static final String USERINFO_SCOPE = "https://www.googleapis.com/auth/userinfo.email";
4443
private static final Set<String> SCOPES = ImmutableSet.of(DATASTORE_SCOPE, USERINFO_SCOPE);
@@ -123,12 +122,6 @@ private DatastoreOptions normalize() {
123122
}
124123
}
125124

126-
@Override
127-
protected String defaultHost() {
128-
String host = System.getProperty(HOST_ENV_NAME, System.getenv(HOST_ENV_NAME));
129-
return host != null ? host : super.defaultHost();
130-
}
131-
132125
@Override
133126
protected String defaultProject() {
134127
String projectId = System.getProperty(DATASET_ENV_NAME, System.getenv(DATASET_ENV_NAME));

branches/tswast-patch-1/src/site/resources/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ <h2>Quickstart with Maven: Add gcloud to your pom.xml</h2>
6262
<pre>&lt;dependency&gt;
6363
&lt;groupId&gt;com.google.gcloud&lt;/groupId&gt;
6464
&lt;artifactId&gt;gcloud-java&lt;/artifactId&gt;
65-
&lt;version&gt;0.0.6&lt;/version&gt;
65+
&lt;version&gt;{{SITE_VERSION}}&lt;/version&gt;
6666
&lt;/dependency&gt;</pre>
6767
</div><!-- end of .col.col-right -->
6868
</div><!-- end of .container -->

branches/tswast-patch-1/utilities/after_success.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" -a "${TRAVIS_BRANCH}" == "master" -
1010
mvn cobertura:cobertura coveralls:report
1111
mvn site-deploy -DskipTests=true --settings=target/travis/settings.xml
1212
mvn deploy -DskipTests=true -Dgpg.skip=true --settings target/travis/settings.xml
13+
14+
# Update "site/latest/index.html" to redirect to the newly generated website (if not a SNAPSHOT)
15+
git config --global user.name "travis-ci"
16+
git config --global user.email "[email protected]"
17+
git clone https://github.com/GoogleCloudPlatform/gcloud-java.git tmp_gh-pages
18+
cd tmp_gh-pages
19+
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|Download\w+:)')
20+
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
21+
git checkout gh-pages
22+
mkdir -p site/latest/
23+
touch site/latest/index.html
24+
echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://GoogleCloudPlatform.github.io/gcloud-java/site/${SITE_VERSION}/index.html'\" /></head><body></body></html>" > site/latest/index.html
25+
git add site/latest/index.html
26+
27+
# Update "Quickstart with Maven" block on landing page to reflect latest version
28+
sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" site/${SITE_VERSION}/index.html
29+
git add site/${SITE_VERSION}/index.html
30+
31+
git commit -m "Updating to reflect latest website version"
32+
git config --global push.default simple
33+
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
34+
fi
1335
else
1436
echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds."
1537
fi

0 commit comments

Comments
 (0)