Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce support for Cloud Spanner #333

Merged
merged 138 commits into from
Mar 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
539f4a0
Add Spanner VTK
jdpedrie Nov 21, 2016
aa82b65
Merge pull request #8 from jdpedrie/spanner-vtk
jdpedrie Nov 21, 2016
56fbae7
Add Spanner Admin Client
jdpedrie Oct 24, 2016
c6124c1
Add Spanner Client
jdpedrie Oct 26, 2016
924a098
Regenerate spanner
michaelbausor Dec 14, 2016
0e1ccfb
Merge pull request #9 from jdpedrie/spanner-admin
dwsupplee Dec 15, 2016
3a6e624
Merge branch 'spanner-wip' of github.com:jgeewax/google-cloud-php-pri…
jdpedrie Dec 15, 2016
4ece91b
Merge pull request #10 from jdpedrie/spanner-client
dwsupplee Dec 15, 2016
111b24c
Merge pull request #13 from michaelbausor/spanner-wip
dwsupplee Dec 15, 2016
4536929
Merge branch 'master' of github.com:googlecloudplatform/google-cloud-…
jdpedrie Dec 15, 2016
83d912c
update to use latest gax
dwsupplee Dec 15, 2016
d65f250
rename *Api -> *Client
dwsupplee Dec 15, 2016
25275e7
Merge pull request #14 from dwsupplee/api-to-client
jdpedrie Dec 15, 2016
f3b7b6d
Merge branch 'spanner-wip' of github.com:jgeewax/google-cloud-php-pri…
jdpedrie Dec 15, 2016
6bb13a1
Merge pull request #15 from jdpedrie/spanner-wip
dwsupplee Dec 15, 2016
2ff6c56
Fix createInstance request
jdpedrie Dec 16, 2016
60a0bab
Merge pull request #17 from jdpedrie/fix-create-instance
dwsupplee Dec 16, 2016
23e1954
Fix Update DDL method
jdpedrie Dec 16, 2016
1c08f0f
Merge pull request #18 from jdpedrie/fix-update-ddl
dwsupplee Dec 16, 2016
13399b2
Make Result implement IteratorAggregate
jdpedrie Dec 16, 2016
7c90e96
Merge pull request #19 from jdpedrie/result-iterator-aggregeate
dwsupplee Dec 16, 2016
a7c0369
Fix admin unit tests
jdpedrie Dec 16, 2016
22f0fda
Update docs and add updateDdlBatch method
jdpedrie Dec 16, 2016
bb47fb5
Support disabling grpc key conversion
jdpedrie Dec 21, 2016
2114edf
Add snippet and unit tests for all but Grpc connection
jdpedrie Dec 21, 2016
81fee51
Grpc tests except for create/update instance
jdpedrie Dec 21, 2016
e4162a0
Add Grpc unit tests
jdpedrie Dec 21, 2016
8a329f7
Fix fixture
jdpedrie Dec 22, 2016
9ae9868
fixes
jdpedrie Dec 23, 2016
08c3ca9
Address code review comments
jdpedrie Dec 23, 2016
02f6a2d
Merge pull request #20 from jdpedrie/admin-finishing-touches
jdpedrie Dec 23, 2016
9aadc4c
Implement query parameterization and value encode/decode
jdpedrie Dec 28, 2016
1edba82
Handle Arrays, Structs and NaN, INF, -INF correctly
jdpedrie Dec 31, 2016
85dc60e
Fix existing tests
jdpedrie Jan 2, 2017
0838cb9
Value Type Tests
jdpedrie Jan 2, 2017
0d738b3
Address code review
jdpedrie Jan 2, 2017
364be97
Finish covering the easy stuff
jdpedrie Jan 3, 2017
ed30b62
Merge branch 'spanner-params' into spanner-unit-tests
jdpedrie Jan 3, 2017
518bbdb
Cover ValueMapper
jdpedrie Jan 5, 2017
3510b78
Support overloading any private property on tested class
jdpedrie Jan 6, 2017
5fbdd64
Merge pull request #21 from jdpedrie/spanner-params
jdpedrie Jan 6, 2017
170ce7c
More unit tests, refactor KeySet and KeyRange, fix Delete
jdpedrie Jan 6, 2017
77c390e
Additional tests and miscellaneous improvements
jdpedrie Jan 9, 2017
9b18958
Cover Transactions
jdpedrie Jan 9, 2017
27a2f33
Regenerate spanner
michaelbausor Jan 10, 2017
0a159a5
Include config changes and comment updates
michaelbausor Jan 10, 2017
f2b772a
Add operations tests
jdpedrie Jan 11, 2017
0d39a47
Merge pull request #24 from michaelbausor/spanner-wip
jdpedrie Jan 11, 2017
41ae896
Merge pull request #22 from jdpedrie/spanner-unit-tests
jdpedrie Jan 11, 2017
9b92440
Update set connection calls
jdpedrie Jan 11, 2017
9b1c5e1
Fix spanner snippets
jdpedrie Jan 11, 2017
c5e2b37
Merge pull request #26 from jdpedrie/spanner-unit-tests
jdpedrie Jan 11, 2017
c1952d5
Update service endpoint
michaelbausor Jan 11, 2017
09f2895
Merge pull request #27 from michaelbausor/spanner-wip
dwsupplee Jan 11, 2017
7fa54e5
WIP
jdpedrie Jan 16, 2017
4e220b1
Updated Documentation
jdpedrie Jan 16, 2017
f4fce6b
Update KeySet reference doc
jdpedrie Jan 16, 2017
bbebeef
Merge pull request #28 from jdpedrie/spanner-snippets
dwsupplee Jan 16, 2017
bb53c4e
Run transactions inside a callable
jdpedrie Jan 16, 2017
37e90db
blah
jdpedrie Jan 17, 2017
49ada7c
Regenerate spanner with streaming methods
michaelbausor Jan 19, 2017
8a9ca46
Add transaction ID to read, execute
jdpedrie Jan 19, 2017
c18f58b
Regenerate spanner with updated comments
michaelbausor Jan 20, 2017
f3d1987
Merge remote-tracking branch 'origin/spanner-wip' into spanner-wip
michaelbausor Jan 20, 2017
4420d10
Add snapshot, retry transactions, read in transaction
jdpedrie Jan 25, 2017
a68b57f
Remove interface, replace abstract class with trait
jdpedrie Jan 25, 2017
0aa1c45
Support single use and begin transaction
jdpedrie Jan 26, 2017
e8b991a
Fix tests
jdpedrie Jan 26, 2017
afa78d6
Add unit test coverage
jdpedrie Jan 26, 2017
b0b96b8
Additional unit test coverage
jdpedrie Jan 27, 2017
9d20984
Update documentation
jdpedrie Jan 27, 2017
9ea8156
Merge pull request #31 from michaelbausor/spanner-wip
jdpedrie Jan 27, 2017
2a38130
Merge branch 'spanner-wip' of github.com:jgeewax/google-cloud-php-pri…
jdpedrie Jan 27, 2017
f4739aa
Merge branch 'spanner-wip' of github.com:jgeewax/google-cloud-php-pri…
jdpedrie Feb 2, 2017
fb94b0d
WIP - Long Running Operations client
jdpedrie Feb 3, 2017
d7fa650
Fix doc
jdpedrie Feb 6, 2017
789234e
Merge pull request #30 from jdpedrie/spanner-transactions
jdpedrie Feb 6, 2017
115300a
WIP
jdpedrie Feb 6, 2017
aff5720
Update LRO
jdpedrie Feb 7, 2017
605dda4
LRO with only an operation name! aww yeah
jdpedrie Feb 8, 2017
aca5872
Merge branch 'spanner-wip' into spanner-lro
jdpedrie Feb 8, 2017
b3e6ba0
Update documentation
jdpedrie Feb 9, 2017
bdae3ac
Merge branch 'spanner-lro' of github.com:jdpedrie/google-cloud-php-pr…
jdpedrie Feb 9, 2017
12a89b3
Merge branch 'master' of github.com:googlecloudplatform/google-cloud-php
jdpedrie Feb 15, 2017
fbc1e75
Spanner wip (#37)
jdpedrie Feb 15, 2017
a39754c
Add comment to getOperationsClient method (#334)
michaelbausor Feb 15, 2017
d051eb6
include null as valid data type (#332)
dwsupplee Feb 15, 2017
0f116a1
correct doc string to represent the fact the service detects the lang…
dwsupplee Feb 18, 2017
8c71e37
Add support for Per-Object Storage Classes (#341)
dwsupplee Feb 21, 2017
1888d71
Minor adjustment to VisionClient introduction
danoscarmike Feb 21, 2017
4ac28cf
Implement stream wrapper for gs:// (#323)
chingor13 Feb 22, 2017
447fbed
Omit `model` if not set (#344)
jdpedrie Feb 22, 2017
a7bac23
Prepare v0.21.0 (#345)
jdpedrie Feb 22, 2017
d865d7c
Fix php notices in stream wrapper (#347)
jdpedrie Feb 23, 2017
68bbbc0
Prepare v0.21.1 (#348)
jdpedrie Feb 23, 2017
c12bc78
Ensure that parse_url provides required keys (#352)
jdpedrie Feb 27, 2017
5670baf
Bigquery updates (#350)
dwsupplee Feb 27, 2017
c0da5be
remove rate limit retries (#356)
dwsupplee Feb 27, 2017
fd5d476
Add snippet tests for Compute (#353)
jdpedrie Feb 27, 2017
effa6cb
Change ResourceNameTrait methods visibility (#358)
jdpedrie Feb 27, 2017
85faa54
Cover snippets (#357)
jdpedrie Feb 28, 2017
4e534db
Vision v1.1 (#365)
jdpedrie Mar 2, 2017
7b08408
Revert "Remove rate limit retries" (#367)
dwsupplee Mar 2, 2017
c3c4472
Regenerate gapic code (#368)
michaelbausor Mar 2, 2017
0c15f7e
Update headers (#366)
michaelbausor Mar 2, 2017
1b5e7bc
export table as json instead of csv (#371)
dwsupplee Mar 3, 2017
daa6ecb
ensure timestamps retain microsecond precision (#372)
dwsupplee Mar 3, 2017
eb141eb
Prepare v0.22.0 (#370)
jdpedrie Mar 3, 2017
9b06e34
Add sleep after insertBatch operation (#379)
dwsupplee Mar 3, 2017
66f1789
ensure user agents are sent when using an API key (#378)
dwsupplee Mar 3, 2017
6c8c1f4
Update gapic docs (#377)
michaelbausor Mar 3, 2017
0e6048c
[BC Break] Remove paging from Subscription::pull (#375)
dwsupplee Mar 3, 2017
32bd57e
Ignore private methods on snippet test coverage (#380)
jdpedrie Mar 3, 2017
a3965b3
fix outdated links (#383)
dwsupplee Mar 6, 2017
17e6282
doc hygeine (#385)
dwsupplee Mar 6, 2017
3c2c02d
Add GAPIC docs to docs site (#373)
jdpedrie Mar 7, 2017
3128001
Update README for Vision going beta (#387)
michaelbausor Mar 7, 2017
9b3866a
Add documentation about the expected behavior of encoding type (#382)
dwsupplee Mar 8, 2017
b73a782
Prepare v0.23.0 (#389)
jdpedrie Mar 8, 2017
3e21b68
Component split (#360)
jdpedrie Mar 10, 2017
aa60809
Prepare v0.24.0 (#391)
jdpedrie Mar 10, 2017
7a2218f
Fix documentation generation and contents (#394)
jdpedrie Mar 15, 2017
bef26ae
Add missing docs file
jdpedrie Mar 15, 2017
c0a7ab7
Fix README links, add detail on separate packages (#393)
jdpedrie Mar 16, 2017
6208d79
Merge branch 'master' of github.com:GoogleCloudPlatform/gcloud-php in…
jdpedrie Mar 16, 2017
40cb8c2
dont set acl when predefinedAcl is defined (#401)
dwsupplee Mar 16, 2017
06cbd4c
[BC Break] Add requestTimeout option to be shared between REST/gRPC (…
dwsupplee Mar 16, 2017
ce2badb
Parse iterator return types (#400)
jdpedrie Mar 16, 2017
5db9bf1
Replace generators with an iterator class (#399)
dwsupplee Mar 16, 2017
31e615d
Merge branch 'spanner-lro' of github.com:jdpedrie/google-cloud-php-pr…
jdpedrie Mar 16, 2017
6e9b550
Fix tests
jdpedrie Mar 20, 2017
e270318
WIP
jdpedrie Mar 20, 2017
f69d0ba
[Docs] Fix source code links (#404)
jdpedrie Mar 20, 2017
bfc6040
Fix source code links in docs for real (#406)
jdpedrie Mar 21, 2017
78dfde6
Various fixes to doc wording, links, etc (#407)
jdpedrie Mar 21, 2017
fcc06f7
Fix incorrect return type in doc-comment (#410)
bencromwell Mar 22, 2017
9c0c2a9
Merge branch 'master' of github.com:GoogleCloudPlatform/gcloud-php in…
jdpedrie Mar 22, 2017
bab35bf
Replace Generator with ItemIterator in Spanner
jdpedrie Mar 22, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
build/
composer.phar
composer.lock
docs/json/**/*.json
docs/json/*
vendor/
36 changes: 20 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
language: php

sudo: required
dist: trusty

matrix:
include:
- php: 5.5.38
- php: 5.6.25
- php: 7.0
- php: 7.1
- php: hhvm
group: edge
fast_finish: true
include:
- php: 5.5.38
- php: 5.6.25
- php: 7.0
- php: 7.1
- php: hhvm
group: edge
fast_finish: true

before_script:
- pecl install grpc || echo 'Failed to install grpc'
- composer install
- pecl install grpc || echo 'Failed to install grpc'
- composer install

script:
- ./dev/sh/tests
- vendor/bin/phpcs --standard=./phpcs-ruleset.xml
- ./dev/sh/build-docs
- ./dev/sh/tests
- vendor/bin/phpcs --standard=./phpcs-ruleset.xml
- ./dev/sh/build-docs

after_success:
- bash <(curl -s https://codecov.io/bash)
- ./dev/sh/push-docs
- bash <(curl -s https://codecov.io/bash)
- ./dev/sh/push-docs
- ./dev/sh/trigger-split
- cat ./build/snippets-uncovered.json

after_failure:
- echo "SNIPPET COVERAGE REPORT" && cat ./build/snippets-uncovered.json
145 changes: 116 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ This client supports the following Google Cloud Platform services at a [Beta](#v
* [Google Stackdriver Logging](#google-stackdriver-logging-beta) (Beta)
* [Google Cloud Datastore](#google-cloud-datastore-beta) (Beta)
* [Google Cloud Storage](#google-cloud-storage-beta) (Beta)
* [Google Cloud Vision](#google-cloud-vision-beta) (Beta)

This client supports the following Google Cloud Platform services at an [Alpha](#versioning) quality level:
* [Google Cloud Natural Language](#google-cloud-natural-language-alpha) (Alpha)
* [Google Cloud Pub/Sub](#google-cloud-pubsub-alpha) (Alpha)
* [Google Cloud Speech](#google-cloud-speech-alpha) (Alpha)
* [Google Cloud Translation](#google-cloud-translation-alpha) (Alpha)
* [Google Cloud Vision](#google-cloud-vision-alpha) (Alpha)

If you need support for other Google APIs, please check out the [Google APIs Client Library for PHP](https://github.com/google/google-api-php-client).

Expand Down Expand Up @@ -61,6 +61,14 @@ foreach ($queryResults->rows() as $row) {
}
```

#### google/cloud-bigquery

Google BigQuery can be installed separately by requiring the `google/cloud-bigquery` composer package:

```
$ require google/cloud-bigquery
```

## Google Stackdriver Logging (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/logging/loggingclient)
Expand Down Expand Up @@ -93,6 +101,14 @@ foreach ($entries as $entry) {
}
```

#### google/cloud-logging

Google Stackdriver Logging can be installed separately by requiring the `google/cloud-logging` composer package:

```
$ require google/cloud-logging
```

## Google Cloud Datastore (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/datastore/datastoreclient)
Expand Down Expand Up @@ -124,6 +140,14 @@ $key = $datastore->key('Person', '12345328897844');
$entity = $datastore->lookup($key);
```

#### google/cloud-datastore

Google Cloud Datastore can be installed separately by requiring the `google/cloud-datastore` composer package:

```
$ require google/cloud-datastore
```

## Google Cloud Storage (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/storage/storageclient)
Expand Down Expand Up @@ -152,6 +176,69 @@ $object = $bucket->object('file_backup.txt');
$object->downloadToFile('/data/file_backup.txt');
```

#### Stream Wrapper

```php
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient([
'projectId' => 'my_project'
]);
$storage->registerStreamWrapper();

$contents = file_get_contents('gs://my_bucket/file_backup.txt');
```

#### google/cloud-storage

Google Cloud Storage can be installed separately by requiring the `google/cloud-storage` composer package:

```
$ require google/cloud-storage
```

## Google Cloud Vision (Beta)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/vision/visionclient)
- [Official Documentation](https://cloud.google.com/vision/docs)

#### Preview

```php
require 'vendor/autoload.php';

use Google\Cloud\Vision\VisionClient;

$vision = new VisionClient([
'projectId' => 'my_project'
]);

// Annotate an image, detecting faces.
$image = $vision->image(
fopen('/data/family_photo.jpg', 'r'),
['faces']
);

$annotation = $vision->annotate($image);

// Determine if the detected faces have headwear.
foreach ($annotation->faces() as $key => $face) {
if ($face->hasHeadwear()) {
echo "Face $key has headwear.\n";
}
}
```

#### google/cloud-vision

Google Cloud Vision can be installed separately by requiring the `google/cloud-vision` composer package:

```
$ require google/cloud-vision
```

## Google Cloud Translation (Alpha)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/translate/translateclient)
Expand Down Expand Up @@ -198,6 +285,14 @@ foreach ($languages as $language) {
}
```

#### google/cloud-translate

Google Cloud Translation can be installed separately by requiring the `google/cloud-translate` composer package:

```
$ require google/cloud-translate
```

## Google Cloud Natural Language (Alpha)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/naturallanguage/naturallanguageclient)
Expand Down Expand Up @@ -237,6 +332,14 @@ foreach ($tokens as $token) {
}
```

#### google/cloud-natural-language

Google Cloud Natural Language can be installed separately by requiring the `google/cloud-natural-language` composer package:

```
$ require google/cloud-natural-language
```

## Google Cloud Pub/Sub (Alpha)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/pubsub/pubsubclient)
Expand Down Expand Up @@ -276,6 +379,14 @@ foreach ($messages as $message) {
}
```

#### google/cloud-pubsub

Google Cloud Pub/Sub can be installed separately by requiring the `google/cloud-pubsub` composer package:

```
$ require google/cloud-pubsub
```

## Google Cloud Speech (Alpha)

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/speech/speechclient)
Expand Down Expand Up @@ -303,36 +414,12 @@ foreach ($results as $result) {
}
```

## Google Cloud Vision (Alpha)
#### google/cloud-speech

- [API Documentation](http://googlecloudplatform.github.io/google-cloud-php/#/docs/latest/vision/visionclient)
- [Official Documentation](https://cloud.google.com/vision/docs)

#### Preview

```php
require 'vendor/autoload.php';

use Google\Cloud\Vision\VisionClient;
Google Cloud Speech can be installed separately by requiring the `google/cloud-speech` composer package:

$vision = new VisionClient([
'projectId' => 'my_project'
]);

// Annotate an image, detecting faces.
$image = $vision->image(
fopen('/data/family_photo.jpg', 'r'),
['faces']
);

$annotation = $vision->annotate($image);

// Determine if the detected faces have headwear.
foreach ($annotation->faces() as $key => $face) {
if ($face->hasHeadwear()) {
echo "Face $key has headwear.\n";
}
}
```
$ require google/cloud-speech
```

## Caching Access Tokens
Expand Down
15 changes: 12 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"james-heinrich/getid3": "^1.9",
"erusev/parsedown": "^1.6",
"vierbergenlars/php-semver": "^3.0",
"google/proto-client-php": "^0.7",
"google/gax": "^0.6"
"google/proto-client-php": "^0.9",
"google/gax": "^0.8"
},
"suggest": {
"google/gax": "Required to support gRPC",
Expand All @@ -72,9 +72,18 @@
"psr-4": {
"Google\\Cloud\\Dev\\": "dev/src",
"Google\\Cloud\\Tests\\System\\": "tests/system"
}
},
"files": ["dev/src/Functions.php"]
},
"scripts": {
"google-cloud": "dev/google-cloud"
},
"extra": {
"component": {
"id": "google-cloud",
"target": "git@github.com:jdpedrie-gcp/google-cloud-php.git",
"path": "src",
"entry": "ServiceBuilder.php"
}
}
}
2 changes: 2 additions & 0 deletions dev/google-cloud
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require __DIR__ . '/../vendor/autoload.php';

use Google\Cloud\Dev\DocGenerator\Command\Docs;
use Google\Cloud\Dev\Release\Command\Release;
use Google\Cloud\Dev\Split\Command\Split;
use Symfony\Component\Console\Application;

if (!class_exists(Application::class)) {
Expand All @@ -33,4 +34,5 @@ if (!class_exists(Application::class)) {
$app = new Application;
$app->add(new Release(__DIR__));
$app->add(new Docs(__DIR__));
$app->add(new Split(__DIR__));
$app->run();
8 changes: 7 additions & 1 deletion dev/sh/build-docs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ set -ev
function buildDocs () {
echo "doc dir before generation:"
find docs
composer google-cloud docs

if [ -z "$TRAVIS_TAG" ]; then
./dev/google-cloud docs
else
./dev/google-cloud docs -r ${TRAVIS_TAG}
fi

echo "doc dir after generation:"
find docs
}
Expand Down
13 changes: 13 additions & 0 deletions dev/sh/compile-splitsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

mkdir $
export GOPATH=$TRAVIS_BUILD_DIR/go

go get -d github.com/libgit2/git2go
cd $GOPATH/src/github.com/libgit2/git2go
git checkout next
git submodule update --init
make install

go get github.com/splitsh/lite
go build -o $TRAVIS_BUILD_DIR/splitsh-lite github.com/splitsh/lite
19 changes: 5 additions & 14 deletions dev/sh/push-docs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@

set -ev

function generateDocs () {
echo "doc dir before generation:"
find docs
composer google-cloud docs
echo "doc dir after generation:"
find docs
}

function pushDocs () {
git submodule add -q -f -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} ghpages
mkdir -p ghpages/json/${1}
cp -R docs/json/master/* ghpages/json/${1}
cp docs/overview.html ghpages/json/${1}
cp docs/toc.json ghpages/json/${1}
git submodule add -q -f -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} ghpages

rsync -aP docs/json/* ghpages/json/

cp docs/home.html ghpages/json
cp docs/manifest.json ghpages
cd ghpages
Expand All @@ -25,7 +16,7 @@ function pushDocs () {
git config user.email "travis@travis-ci.org"
git commit -m "Updating docs for ${1}"
git status
git push -q https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages
git push -q https://${GH_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} HEAD:gh-pages
else
echo "Nothing to commit."
fi
Expand Down
10 changes: 10 additions & 0 deletions dev/sh/split
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')

SHA=`$TRAVIS_BUILD_DIR/splitsh-lite --prefix=$1`
git push -q \
"https://${GH_OAUTH_TOKEN}@github.com/$2" \
$SHA:master --force
9 changes: 9 additions & 0 deletions dev/sh/trigger-split
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [[ "$TRAVIS_JOB_NUMBER" == *.1 && -n "$TRAVIS_TAG" ]]; then
$(dirname $0)/compile-splitsh
git fetch --unshallow
composer google-cloud split
else
echo "Split occurs only in a tag run, and in the first matrix build"
fi
Loading