Skip to content

Commit f6dc7d2

Browse files
committed
---
yaml --- r: 1151 b: refs/heads/master c: 74a39cc h: refs/heads/master i: 1149: 6fdc09e 1147: 3520327 1143: 360349b 1135: 5645e64 1119: b8e8a42 1087: 286899b 1023: 4c88862 v: v3
1 parent 0216d25 commit f6dc7d2

10 files changed

Lines changed: 99 additions & 36 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: 67fdcc08177ec9973465da032f1c504160709f34
2+
refs/heads/master: 74a39ccef06b720ee81a761743768521381710ea
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,22 @@ This client supports the following Google Cloud Platform services:
2020
2121
Quickstart
2222
----------
23-
Add this to your pom.xml file
23+
If you are using Maven, 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+
```
3139

3240
Example Applications
3341
--------------------

trunk/gcloud-java-core/README.md

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

1313
Quickstart
1414
----------
15-
Add this to your pom.xml file
15+
If you are using Maven, 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+
```
2331

2432
Java Versions
2533
-------------

trunk/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*(.*)$");

trunk/gcloud-java-datastore/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ Java idiomatic client for [Google Cloud Datastore] (https://cloud.google.com/dat
1515
1616
Quickstart
1717
----------
18-
Add this to your pom.xml file
18+
If you are using Maven, 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+
```
2634

2735
Example Application
2836
--------------------

trunk/gcloud-java-examples/README.md

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

1313
Quickstart
1414
----------
15-
Add this to your pom.xml file
15+
If you are using Maven, 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+
```
2331

2432
To run examples from your command line:
2533

trunk/gcloud-java-storage/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ Java idiomatic client for [Google Cloud Storage] (https://cloud.google.com/stora
1515
1616
Quickstart
1717
----------
18-
Add this to your pom.xml file
18+
If you are using Maven, 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+
```
2634

2735
Example Application
2836
-------------------

trunk/gcloud-java/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,22 @@ This client supports the following Google Cloud Platform services:
2020
2121
Quickstart
2222
----------
23-
Add this to your pom.xml file
23+
If you are using Maven, 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+
```
3139

3240
Java Versions
3341
-------------

trunk/utilities/after_success.sh

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,37 @@ 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
1210

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
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
3334

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
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
3941
fi
4042
else
4143
echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds."

trunk/utilities/update_docs_version.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ 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
1719
done
1820

1921
git add README.md */README.md

0 commit comments

Comments
 (0)