Skip to content

Commit d963b89

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 2371 b: refs/heads/update-datastore c: fa9348e h: refs/heads/master i: 2369: ef67ed8 2367: 804ccae
1 parent e68dc9c commit d963b89

10 files changed

Lines changed: 47 additions & 88 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: c615c9191f0ee25e6cab34e5deffd1131bd4ff64
8+
refs/heads/update-datastore: fa9348edd3316ad230a8c93a2f858f8cb364a6b0
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
1010
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
1111
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2

branches/update-datastore/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,14 @@ This client supports the following Google Cloud Platform services:
2020
2121
Quickstart
2222
----------
23-
If you are using Maven, add this to your pom.xml file
23+
Add this to your pom.xml file
2424
```xml
2525
<dependency>
2626
<groupId>com.google.gcloud</groupId>
2727
<artifactId>gcloud-java</artifactId>
2828
<version>0.0.10</version>
2929
</dependency>
3030
```
31-
If you are using Gradle, add this to your dependencies
32-
```Groovy
33-
compile 'com.google.gcloud:gcloud-java:jar:0.0.10'
34-
```
35-
If you are using SBT, add this to your dependencies
36-
```Scala
37-
libraryDependencies += "com.google.gcloud" % "gcloud-java" % "0.0.10"
38-
```
3931

4032
Example Applications
4133
--------------------

branches/update-datastore/gcloud-java-core/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,14 @@ This module provides common functionality required by service-specific modules o
1212

1313
Quickstart
1414
----------
15-
If you are using Maven, add this to your pom.xml file
15+
Add this to your pom.xml file
1616
```xml
1717
<dependency>
1818
<groupId>com.google.gcloud</groupId>
1919
<artifactId>gcloud-java-core</artifactId>
2020
<version>0.0.10</version>
2121
</dependency>
2222
```
23-
If you are using Gradle, add this to your dependencies
24-
```Groovy
25-
compile 'com.google.gcloud:gcloud-java-core:jar:0.0.10'
26-
```
27-
If you are using SBT, add this to your dependencies
28-
```Scala
29-
libraryDependencies += "com.google.gcloud" % "gcloud-java-core" % "0.0.10"
30-
```
3123

3224
Java Versions
3325
-------------

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import java.io.BufferedReader;
3232
import java.io.File;
33+
import java.io.FileNotFoundException;
3334
import java.io.FileReader;
3435
import java.io.IOException;
3536
import java.io.InputStream;
@@ -387,8 +388,18 @@ protected static String googleCloudProjectId() {
387388
} else {
388389
configDir = new File(System.getProperty("user.home"), ".config/gcloud");
389390
}
390-
try (BufferedReader reader =
391-
new BufferedReader(new FileReader(new File(configDir, "properties")))) {
391+
FileReader fileReader;
392+
try {
393+
fileReader = new FileReader(new File(configDir, "configurations/config_default"));
394+
} catch (FileNotFoundException newConfigFileNotFoundEx) {
395+
try {
396+
fileReader = new FileReader(new File(configDir, "properties"));
397+
} catch (FileNotFoundException oldConfigFileNotFoundEx) {
398+
// return null if we can't find config file
399+
return null;
400+
}
401+
}
402+
try (BufferedReader reader = new BufferedReader(fileReader)) {
392403
String line;
393404
String section = null;
394405
Pattern projectPattern = Pattern.compile("^project\\s*=\\s*(.*)$");

branches/update-datastore/gcloud-java-datastore/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ Java idiomatic client for [Google Cloud Datastore] (https://cloud.google.com/dat
1515
1616
Quickstart
1717
----------
18-
If you are using Maven, add this to your pom.xml file
18+
Add this to your pom.xml file
1919
```xml
2020
<dependency>
2121
<groupId>com.google.gcloud</groupId>
2222
<artifactId>gcloud-java-datastore</artifactId>
2323
<version>0.0.10</version>
2424
</dependency>
2525
```
26-
If you are using Gradle, add this to your dependencies
27-
```Groovy
28-
compile 'com.google.gcloud:gcloud-java-datastore:jar:0.0.10'
29-
```
30-
If you are using SBT, add this to your dependencies
31-
```Scala
32-
libraryDependencies += "com.google.gcloud" % "gcloud-java-datastore" % "0.0.10"
33-
```
3426

3527
Example Application
3628
--------------------

branches/update-datastore/gcloud-java-examples/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,14 @@ Examples for gcloud-java (Java idiomatic client for [Google Cloud Platform][clou
1212

1313
Quickstart
1414
----------
15-
If you are using Maven, add this to your pom.xml file
15+
Add this to your pom.xml file
1616
```xml
1717
<dependency>
1818
<groupId>com.google.gcloud</groupId>
1919
<artifactId>gcloud-java-examples</artifactId>
2020
<version>0.0.10</version>
2121
</dependency>
2222
```
23-
If you are using Gradle, add this to your dependencies
24-
```Groovy
25-
compile 'com.google.gcloud:gcloud-java-examples:jar:0.0.10'
26-
```
27-
If you are using SBT, add this to your dependencies
28-
```Scala
29-
libraryDependencies += "com.google.gcloud" % "gcloud-java-examples" % "0.0.10"
30-
```
3123

3224
To run examples from your command line:
3325

branches/update-datastore/gcloud-java-storage/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@ Java idiomatic client for [Google Cloud Storage] (https://cloud.google.com/stora
1515
1616
Quickstart
1717
----------
18-
If you are using Maven, add this to your pom.xml file
18+
Add this to your pom.xml file
1919
```xml
2020
<dependency>
2121
<groupId>com.google.gcloud</groupId>
2222
<artifactId>gcloud-java-storage</artifactId>
2323
<version>0.0.10</version>
2424
</dependency>
2525
```
26-
If you are using Gradle, add this to your dependencies
27-
```Groovy
28-
compile 'com.google.gcloud:gcloud-java-storage:jar:0.0.10'
29-
```
30-
If you are using SBT, add this to your dependencies
31-
```Scala
32-
libraryDependencies += "com.google.gcloud" % "gcloud-java-storage" % "0.0.10"
33-
```
3426

3527
Example Application
3628
-------------------

branches/update-datastore/gcloud-java/README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,14 @@ This client supports the following Google Cloud Platform services:
2020
2121
Quickstart
2222
----------
23-
If you are using Maven, add this to your pom.xml file
23+
Add this to your pom.xml file
2424
```xml
2525
<dependency>
2626
<groupId>com.google.gcloud</groupId>
2727
<artifactId>gcloud-java</artifactId>
2828
<version>0.0.10</version>
2929
</dependency>
3030
```
31-
If you are using Gradle, add this to your dependencies
32-
```Groovy
33-
compile 'com.google.gcloud:gcloud-java:jar:0.0.10'
34-
```
35-
If you are using SBT, add this to your dependencies
36-
```Scala
37-
libraryDependencies += "com.google.gcloud" % "gcloud-java" % "0.0.10"
38-
```
3931

4032
Java Versions
4133
-------------

branches/update-datastore/utilities/after_success.sh

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,35 @@ source ./utilities/integration_test_env.sh
77
echo "Travis branch: " ${TRAVIS_BRANCH}
88
echo "Travis pull request: " ${TRAVIS_PULL_REQUEST}
99
echo "Travis JDK version: " ${TRAVIS_JDK_VERSION}
10+
if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" -a "${TRAVIS_BRANCH}" == "master" -a "${TRAVIS_PULL_REQUEST}" == "false" ]; then
11+
mvn cobertura:cobertura coveralls:report
1012

11-
if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" -a "${TRAVIS_BRANCH}" == "master" ]; then
12-
mvn clean cobertura:cobertura coveralls:report
13-
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
14-
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
15-
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
16-
# Deploy site if not a SNAPSHOT
17-
git config --global user.name "travis-ci"
18-
git config --global user.email "[email protected]"
19-
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
20-
mkdir -p tmp_gh-pages/$SITE_VERSION
21-
mvn site -DskipTests=true
22-
mvn site:stage -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION}/
23-
cd tmp_gh-pages
24-
cp -r ../target/staging/$SITE_VERSION/* $SITE_VERSION/
25-
sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" ${SITE_VERSION}/index.html # Update "Quickstart with Maven" to reflect version change
26-
git add $SITE_VERSION
27-
echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://GoogleCloudPlatform.github.io/gcloud-java/${SITE_VERSION}/index.html'\" /></head><body></body></html>" > index.html
28-
git add index.html
29-
echo "<html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
30-
git add apidocs/index.html
31-
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect."
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
13+
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
14+
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
15+
# Deploy site if not a SNAPSHOT
16+
git config --global user.name "travis-ci"
17+
git config --global user.email "[email protected]"
18+
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
19+
mkdir -p tmp_gh-pages/$SITE_VERSION
20+
mvn site -DskipTests=true
21+
mvn site:stage -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION}/
22+
cd tmp_gh-pages
23+
cp -r ../target/staging/$SITE_VERSION/* $SITE_VERSION/
24+
sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" ${SITE_VERSION}/index.html # Update "Quickstart with Maven" to reflect version change
25+
git add $SITE_VERSION
26+
echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://GoogleCloudPlatform.github.io/gcloud-java/${SITE_VERSION}/index.html'\" /></head><body></body></html>" > index.html
27+
git add index.html
28+
echo "<html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
29+
git add apidocs/index.html
30+
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect."
31+
git config --global push.default simple
32+
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
3433

35-
cd ..
36-
utilities/update_docs_version.sh # Update version in READMEs
37-
mvn clean deploy --settings ~/.m2/settings.xml -P sign-deploy
38-
else
39-
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml
40-
fi
34+
cd ..
35+
utilities/update_docs_version.sh # Update version in READMEs
36+
mvn clean deploy --settings ~/.m2/settings.xml -P sign-deploy
37+
else
38+
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml
4139
fi
4240
else
4341
echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds."

branches/update-datastore/utilities/update_docs_version.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ if [ "${RELEASED_VERSION##*-}" != "SNAPSHOT" ]; then
1414
for item in ${module_folders[*]}
1515
do
1616
sed -ri "s/<version>[0-9]+\.[0-9]+\.[0-9]+<\/version>/<version>${RELEASED_VERSION}<\/version>/g" ${item}/README.md
17-
sed -ri "s/:[0-9]+\.[0-9]+\.[0-9]+'/:${RELEASED_VERSION}'/g" ${item}/README.md
18-
sed -ri "s/\"[0-9]+\.[0-9]+\.[0-9]+\"/\"${RELEASED_VERSION}\"/g" ${item}/README.md
1917
done
2018

2119
git add README.md */README.md

0 commit comments

Comments
 (0)