Skip to content

Commit d4fa7d3

Browse files
committed
Update build and post build scripts to handle new google-cloud names
1 parent 9d3e01d commit d4fa7d3

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

utilities/after_success.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
1919
fi
2020
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
2121
# Deploy Maven artifacts (if they don't exist yet) and update artifact version in READMEs.
22-
URL=https://oss.sonatype.org/content/repositories/releases/com/google/cloud/gcloud-java/$SITE_VERSION/
22+
URL=https://oss.sonatype.org/content/repositories/releases/com/google/cloud/google-cloud/$SITE_VERSION/
2323
if curl --output /dev/null --silent --head --fail "$URL"; then
2424
echo "Not deploying artifacts because it seems like they already exist."
2525
echo "Existence was checked using the url $URL"
@@ -31,21 +31,21 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
3131
# Create website
3232
git config --global user.name "travis-ci"
3333
git config --global user.email "[email protected]"
34-
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
34+
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/google-cloud-java/ tmp_gh-pages
3535
mkdir -p tmp_gh-pages/$SITE_VERSION
3636
mvn site -DskipTests=true --quiet -Djava.util.logging.config.file=logging.properties
37-
mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/gcloud-java/site/${SITE_VERSION}/
37+
mvn site:stage --quiet -Djava.util.logging.config.file=logging.properties -DtopSiteURL=http://googlecloudplatform.github.io/google-cloud-java/site/${SITE_VERSION}/
3838
cd tmp_gh-pages
3939
cp -r ../target/staging/$SITE_VERSION/* $SITE_VERSION/
4040
sed -i "s/{{SITE_VERSION}}/$SITE_VERSION/g" ${SITE_VERSION}/index.html # Update "Quickstart with Maven" to reflect version change
4141
git add $SITE_VERSION
42-
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
42+
echo "<html><head><meta http-equiv=\"refresh\" content=\"0; URL='http://GoogleCloudPlatform.github.io/google-cloud-java/${SITE_VERSION}/index.html'\" /></head><body></body></html>" > index.html
4343
git add index.html
44-
echo "<html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
44+
echo "<html><head><script>window.location.replace('/google-cloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
4545
git add apidocs/index.html
4646
git commit --quiet -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect. [ci skip]"
4747
git config --global push.default simple
48-
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
48+
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/google-cloud-java.git" > /dev/null 2>&1
4949
else
5050
mvn clean deploy --quiet -Djava.util.logging.config.file=logging.properties -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml -P release
5151
fi

utilities/update_docs_version.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RELEASED_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
1010
if [ "${RELEASED_VERSION##*-}" != "SNAPSHOT" ]; then
1111
echo "Changing version to $RELEASED_VERSION in README files"
1212
# Get list of directories for which README.md must be updated
13-
module_folders=($(find . -maxdepth 2 -type d | sed -E -n "/^\.\/(gcloud-java-contrib\/)?gcloud-java(-[a-z]+)+$/p") . ./gcloud-java)
13+
module_folders=($(find . -maxdepth 2 -type d | sed -E -n "/^\.\/(google-cloud-contrib\/)?google-cloud(-[a-z]+)+$/p") . ./google-cloud)
1414
readmes=""
1515
for item in ${module_folders[*]}
1616
do
@@ -22,12 +22,12 @@ if [ "${RELEASED_VERSION##*-}" != "SNAPSHOT" ]; then
2222
fi
2323
done
2424
NEW_VERSION=${RELEASED_VERSION%.*}.$((${RELEASED_VERSION##*.}+1))-SNAPSHOT
25-
echo "Changing version to $NEW_VERSION in gcloud-java-nio-example README"
26-
sed -ri "s/gcloud-java-nio-[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT/gcloud-java-nio-$NEW_VERSION/g" gcloud-java-contrib/gcloud-java-nio-examples/README.md
27-
sed -ri "s/gcloud-java-nio-examples-[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT/gcloud-java-nio-examples-$NEW_VERSION/g" gcloud-java-contrib/gcloud-java-nio-examples/README.md
25+
echo "Changing version to $NEW_VERSION in google-cloud-nio-example README"
26+
sed -ri "s/google-cloud-nio-[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT/google-cloud-nio-$NEW_VERSION/g" google-cloud-contrib/google-cloud-nio-examples/README.md
27+
sed -ri "s/google-cloud-nio-examples-[0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT/google-cloud-nio-examples-$NEW_VERSION/g" google-cloud-contrib/google-cloud-nio-examples/README.md
2828
git add $readmes
2929
git config --global user.name "travis-ci"
3030
git config --global user.email "[email protected]"
3131
git commit -m "Updating version in README files. [ci skip]"
32-
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" HEAD:master > /dev/null 2>&1
32+
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/google-cloud-java.git" HEAD:master > /dev/null 2>&1
3333
fi

utilities/update_pom_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Get the previous maven project version.
1212
CURRENT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
1313
# Get list of directories for which pom.xml must be updated
14-
module_folders=($(find . -maxdepth 2 -type d | sed -E -n "/^\.\/(gcloud-java-contrib\/)?gcloud-java(-[a-z]+)+$/p") . ./gcloud-java)
14+
module_folders=($(find . -maxdepth 2 -type d | sed -E -n "/^\.\/(google-cloud-contrib\/)?google-cloud(-[a-z]+)+$/p") . ./google-cloud)
1515
if [ $# -eq 1 ]; then
1616
NEW_VERSION=$1
1717
elif [ "${CURRENT_VERSION##*-}" != "SNAPSHOT" ]; then

0 commit comments

Comments
 (0)