Update go dependencies
This commit is contained in:
parent
432f534383
commit
f4a4daed84
1299 changed files with 71186 additions and 91183 deletions
25
vendor/cloud.google.com/go/.travis.yml
generated
vendored
25
vendor/cloud.google.com/go/.travis.yml
generated
vendored
|
|
@ -1,25 +0,0 @@
|
|||
sudo: false
|
||||
language: go
|
||||
go:
|
||||
- 1.6.x
|
||||
- 1.7.x
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
- 1.10.x
|
||||
- 1.11.x
|
||||
install:
|
||||
- go get -v cloud.google.com/go/...
|
||||
script:
|
||||
- openssl aes-256-cbc -K $encrypted_a8b3f4fc85f4_key -iv $encrypted_a8b3f4fc85f4_iv -in keys.tar.enc -out keys.tar -d
|
||||
- tar xvf keys.tar
|
||||
- GCLOUD_TESTS_GOLANG_PROJECT_ID="dulcet-port-762"
|
||||
GCLOUD_TESTS_GOLANG_KEY="$(pwd)/dulcet-port-762-key.json"
|
||||
GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID="gcloud-golang-firestore-tests"
|
||||
GCLOUD_TESTS_GOLANG_FIRESTORE_KEY="$(pwd)/gcloud-golang-firestore-tests-key.json"
|
||||
GCLOUD_TESTS_GOLANG_KEYRING="projects/dulcet-port-762/locations/us/keyRings/go-integration-test"
|
||||
GCLOUD_TESTS_GOLANG_ENABLE_REPLAY=yes
|
||||
travis_wait ./run-tests.sh $TRAVIS_COMMIT
|
||||
env:
|
||||
matrix:
|
||||
# The GCLOUD_TESTS_API_KEY environment variable.
|
||||
secure: VdldogUOoubQ60LhuHJ+g/aJoBiujkSkWEWl79Zb8cvQorcQbxISS+JsOOp4QkUOU4WwaHAm8/3pIH1QMWOR6O78DaLmDKi5Q4RpkVdCpUXy+OAfQaZIcBsispMrjxLXnqFjo9ELnrArfjoeCTzaX0QTCfwQwVmigC8rR30JBKI=
|
||||
103
vendor/cloud.google.com/go/CHANGES.md
generated
vendored
103
vendor/cloud.google.com/go/CHANGES.md
generated
vendored
|
|
@ -1,5 +1,108 @@
|
|||
# Changes
|
||||
|
||||
## v0.33.1
|
||||
|
||||
all: release v0.33.1
|
||||
|
||||
- compute: Removes an erroneously added go.mod.
|
||||
- logging: Populate source location in fromLogEntry.
|
||||
|
||||
## v0.33.0
|
||||
|
||||
- bttest:
|
||||
- Add support for apply_label_transformer.
|
||||
- expr:
|
||||
- Add expr library.
|
||||
- firestore:
|
||||
- Support retrieval of missing documents.
|
||||
- kms:
|
||||
- Add IAM methods.
|
||||
- pubsub:
|
||||
- Clarify extension documentation.
|
||||
- scheduler:
|
||||
- Add v1beta1 client.
|
||||
- vision:
|
||||
- Add product search helper.
|
||||
- Add new product search client.
|
||||
|
||||
## v0.32.0
|
||||
|
||||
Note: This release is the last to support Go 1.6 and 1.8.
|
||||
|
||||
- bigquery:
|
||||
- Add support for removing an expiration.
|
||||
- Ignore NeverExpire in Table.Create.
|
||||
- Validate table expiration time.
|
||||
- cbt:
|
||||
- Add note about not supporting arbitrary bytes.
|
||||
- datastore:
|
||||
- Align key checks.
|
||||
- firestore:
|
||||
- Return an error when using Start/End without providing values.
|
||||
- pubsub:
|
||||
- Add pstest Close method.
|
||||
- Clarify MaxExtension documentation.
|
||||
- securitycenter:
|
||||
- Add v1beta1 client.
|
||||
- spanner:
|
||||
- Allow nil in mutations.
|
||||
- Improve doc of SessionPoolConfig.MaxOpened.
|
||||
- Increase session deletion timeout from 5s to 15s.
|
||||
|
||||
## v0.31.0
|
||||
|
||||
- bigtable:
|
||||
- Group mutations across multiple requests.
|
||||
- bigquery:
|
||||
- Link to bigquery troubleshooting errors page in bigquery.Error comment.
|
||||
- cbt:
|
||||
- Fix go generate command.
|
||||
- Document usage of both maxage + maxversions.
|
||||
- datastore:
|
||||
- Passing nil keys results in ErrInvalidKey.
|
||||
- firestore:
|
||||
- Clarify what Document.DataTo does with untouched struct fields.
|
||||
- profile:
|
||||
- Validate service name in agent.
|
||||
- pubsub:
|
||||
- Fix deadlock with pstest and ctx.Cancel.
|
||||
- Fix a possible deadlock in pstest.
|
||||
- trace:
|
||||
- Update doc URL with new fragment.
|
||||
|
||||
Special thanks to @fastest963 for going above and beyond helping us to debug
|
||||
hard-to-reproduce Pub/Sub issues.
|
||||
|
||||
## v0.30.0
|
||||
|
||||
- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information.
|
||||
- bigtable: bttest supports row sample filter.
|
||||
- functions: metadata package added for accessing Cloud Functions resource metadata.
|
||||
|
||||
## v0.29.0
|
||||
|
||||
- bigtable:
|
||||
- Add retry to all idempotent RPCs.
|
||||
- cbt supports complex GC policies.
|
||||
- Emulator supports arbitrary bytes in regex filters.
|
||||
- firestore: Add ArrayUnion and ArrayRemove.
|
||||
- logging: Add the ContextFunc option to supply the context used for
|
||||
asynchronous RPCs.
|
||||
- profiler: Ignore NotDefinedError when fetching the instance name
|
||||
- pubsub:
|
||||
- BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled.
|
||||
- BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning.
|
||||
- Fix deadlock.
|
||||
- Restore Ack/Nack/Modacks metrics.
|
||||
- Improve context handling in iterator.
|
||||
- Implement synchronous mode for Receive.
|
||||
- pstest: add Pull.
|
||||
- spanner: Add a metric for the number of sessions currently opened.
|
||||
- storage:
|
||||
- Canceling the context releases all resources.
|
||||
- Add additional RetentionPolicy attributes.
|
||||
- vision/apiv1: Add LocalizeObjects method.
|
||||
|
||||
## v0.28.0
|
||||
|
||||
- bigtable:
|
||||
|
|
|
|||
192
vendor/cloud.google.com/go/CONTRIBUTING.md
generated
vendored
192
vendor/cloud.google.com/go/CONTRIBUTING.md
generated
vendored
|
|
@ -1,117 +1,177 @@
|
|||
# Contributing
|
||||
|
||||
1. Sign one of the contributor license agreements below.
|
||||
1. `go get golang.org/x/review/git-codereview` to install the code reviewing tool.
|
||||
1. `go get golang.org/x/review/git-codereview` to install the code reviewing
|
||||
tool.
|
||||
1. You will need to ensure that your `GOBIN` directory (by default
|
||||
`$GOPATH/bin`) is in your `PATH` so that git can find the command.
|
||||
`$GOPATH/bin`) is in your `PATH` so that git can find the command.
|
||||
1. If you would like, you may want to set up aliases for git-codereview,
|
||||
such that `git codereview change` becomes `git change`. See the
|
||||
[godoc](https://godoc.org/golang.org/x/review/git-codereview) for details.
|
||||
such that `git codereview change` becomes `git change`. See the
|
||||
[godoc](https://godoc.org/golang.org/x/review/git-codereview) for details.
|
||||
1. Should you run into issues with the git-codereview tool, please note
|
||||
that all error messages will assume that you have set up these
|
||||
aliases.
|
||||
that all error messages will assume that you have set up these aliases.
|
||||
1. Get the cloud package by running `go get -d cloud.google.com/go`.
|
||||
1. If you have already checked out the source, make sure that the remote git
|
||||
origin is https://code.googlesource.com/gocloud:
|
||||
1. If you have already checked out the source, make sure that the remote
|
||||
git origin is https://code.googlesource.com/gocloud:
|
||||
|
||||
```
|
||||
git remote set-url origin https://code.googlesource.com/gocloud
|
||||
```
|
||||
|
||||
git remote set-url origin https://code.googlesource.com/gocloud
|
||||
1. Make sure your auth is configured correctly by visiting
|
||||
https://code.googlesource.com, clicking "Generate Password", and following
|
||||
the directions.
|
||||
https://code.googlesource.com, clicking "Generate Password", and following the
|
||||
directions.
|
||||
1. Make changes and create a change by running `git codereview change <name>`,
|
||||
provide a commit message, and use `git codereview mail` to create a Gerrit CL.
|
||||
1. Keep amending to the change with `git codereview change` and mail as your receive
|
||||
feedback. Each new mailed amendment will create a new patch set for your change in Gerrit.
|
||||
1. Keep amending to the change with `git codereview change` and mail as your
|
||||
receive feedback. Each new mailed amendment will create a new patch set for
|
||||
your change in Gerrit.
|
||||
|
||||
## Integration Tests
|
||||
|
||||
In addition to the unit tests, you may run the integration test suite.
|
||||
In addition to the unit tests, you may run the integration test suite. These
|
||||
directions describe setting up your environment to run integration tests for
|
||||
_all_ packages: note that many of these instructions may be redundant if you
|
||||
intend only to run integration tests on a single package.
|
||||
|
||||
To run the integrations tests, creating and configuration of a project in the
|
||||
Google Developers Console is required.
|
||||
#### GCP Setup
|
||||
|
||||
After creating a project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount).
|
||||
Ensure the project-level **Owner**
|
||||
[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to the
|
||||
service account. Alternatively, the account can be granted all of the following roles:
|
||||
- **Editor**
|
||||
- **Logs Configuration Writer**
|
||||
- **PubSub Admin**
|
||||
To run the integrations tests, creation and configuration of two projects in
|
||||
the Google Developers Console is required: one specifically for Firestore
|
||||
integration tests, and another for all other integration tests. We'll refer to
|
||||
these projects as "general project" and "Firestore project".
|
||||
|
||||
Once you create a project, set the following environment variables to be able to
|
||||
run the against the actual APIs.
|
||||
After creating each project, you must [create a service account](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount)
|
||||
for each project. Ensure the project-level **Owner**
|
||||
[IAM role](console.cloud.google.com/iam-admin/iam/project) role is added to
|
||||
each service account. During the creation of the service account, you should
|
||||
download the JSON credential file for use later.
|
||||
|
||||
- **GCLOUD_TESTS_GOLANG_PROJECT_ID**: Developers Console project's ID (e.g. bamboo-shift-455)
|
||||
- **GCLOUD_TESTS_GOLANG_KEY**: The path to the JSON key file.
|
||||
Next, ensure the following APIs are enabled in the general project:
|
||||
|
||||
Some packages require additional environment variables to be set:
|
||||
- BigQuery API
|
||||
- BigQuery Data Transfer API
|
||||
- Cloud Dataproc API
|
||||
- Cloud Dataproc Control API Private
|
||||
- Cloud Datastore API
|
||||
- Cloud Firestore API
|
||||
- Cloud Key Management Service (KMS) API
|
||||
- Cloud Natural Language API
|
||||
- Cloud OS Login API
|
||||
- Cloud Pub/Sub API
|
||||
- Cloud Resource Manager API
|
||||
- Cloud Spanner API
|
||||
- Cloud Speech API
|
||||
- Cloud Translation API
|
||||
- Cloud Video Intelligence API
|
||||
- Cloud Vision API
|
||||
- Compute Engine API
|
||||
- Compute Engine Instance Group Manager API
|
||||
- Container Registry API
|
||||
- Firebase Rules API
|
||||
- Google Cloud APIs
|
||||
- Google Cloud Deployment Manager V2 API
|
||||
- Google Cloud SQL
|
||||
- Google Cloud Storage
|
||||
- Google Cloud Storage JSON API
|
||||
- Google Compute Engine Instance Group Updater API
|
||||
- Google Compute Engine Instance Groups API
|
||||
- Kubernetes Engine API
|
||||
- Stackdriver Error Reporting API
|
||||
|
||||
- firestore
|
||||
- **GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID**: project ID for Firestore.
|
||||
- **GCLOUD_TESTS_GOLANG_FIRESTORE_KEY**: The path to the JSON key file.
|
||||
- storage
|
||||
- **GCLOUD_TESTS_GOLANG_KEYRING**: The full name of the keyring for the tests, in the
|
||||
form "projects/P/locations/L/keyRings/R".
|
||||
- translate
|
||||
- **GCLOUD_TESTS_API_KEY**: API key for using the Translate API.
|
||||
- profiler
|
||||
- **GCLOUD_TESTS_GOLANG_ZONE**: Compute Engine zone.
|
||||
Next, create a Datastore database in the general project, and a Firestore
|
||||
database in the Firestore project.
|
||||
|
||||
Some packages can record the RPCs during integration tests to a file for
|
||||
subsequent replay. To record, pass the `-record` flag to `go test`. The
|
||||
recording will be saved to the _package_`.replay` file. To replay integration
|
||||
tests from a saved recording, the replay file must be present, the `-short` flag
|
||||
must be passed to `go test`, and the **GCLOUD_TESTS_GOLANG_ENABLE_REPLAY**
|
||||
environment variable must have a non-empty value.
|
||||
Finally, in the general project, create an API key for the translate API:
|
||||
|
||||
Install the [gcloud command-line tool][gcloudcli] to your machine and use it
|
||||
to create some resources used in integration tests.
|
||||
- Go to GCP Developer Console.
|
||||
- Navigate to APIs & Services > Credentials.
|
||||
- Click Create Credentials > API Key.
|
||||
- Save this key for use in `GCLOUD_TESTS_API_KEY` as described below.
|
||||
|
||||
#### Local Setup
|
||||
|
||||
Once the two projects are created and configured, set the following environment
|
||||
variables:
|
||||
|
||||
- `GCLOUD_TESTS_GOLANG_PROJECT_ID`: Developers Console project's ID (e.g.
|
||||
bamboo-shift-455) for the general project.
|
||||
- `GCLOUD_TESTS_GOLANG_KEY`: The path to the JSON key file of the general
|
||||
project's service account.
|
||||
- `GCLOUD_TESTS_GOLANG_FIRESTORE_PROJECT_ID`: Developers Console project's ID
|
||||
(e.g. doorway-cliff-677) for the Firestore project.
|
||||
- `GCLOUD_TESTS_GOLANG_FIRESTORE_KEY`: The path to the JSON key file of the
|
||||
Firestore project's service account.
|
||||
- `GCLOUD_TESTS_GOLANG_KEYRING`: The full name of the keyring for the tests,
|
||||
in the form
|
||||
"projects/P/locations/L/keyRings/R". The creation of this is described below.
|
||||
- `GCLOUD_TESTS_API_KEY`: API key for using the Translate API.
|
||||
- `GCLOUD_TESTS_GOLANG_ZONE`: Compute Engine zone.
|
||||
|
||||
Install the [gcloud command-line tool][gcloudcli] to your machine and use it to
|
||||
create some resources used in integration tests.
|
||||
|
||||
From the project's root directory:
|
||||
|
||||
``` sh
|
||||
# Set the default project in your env.
|
||||
# Sets the default project in your env.
|
||||
$ gcloud config set project $GCLOUD_TESTS_GOLANG_PROJECT_ID
|
||||
|
||||
# Authenticate the gcloud tool with your account.
|
||||
# Authenticates the gcloud tool with your account.
|
||||
$ gcloud auth login
|
||||
|
||||
# Create the indexes used in the datastore integration tests.
|
||||
$ gcloud preview datastore create-indexes datastore/testdata/index.yaml
|
||||
$ gcloud datastore create-indexes datastore/testdata/index.yaml
|
||||
|
||||
# Create a Google Cloud storage bucket with the same name as your test project,
|
||||
# Creates a Google Cloud storage bucket with the same name as your test project,
|
||||
# and with the Stackdriver Logging service account as owner, for the sink
|
||||
# integration tests in logging.
|
||||
$ gsutil mb gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID
|
||||
$ gsutil acl ch -g cloud-logs@google.com:O gs://$GCLOUD_TESTS_GOLANG_PROJECT_ID
|
||||
|
||||
# Create a PubSub topic for integration tests of storage notifications.
|
||||
# Creates a PubSub topic for integration tests of storage notifications.
|
||||
$ gcloud beta pubsub topics create go-storage-notification-test
|
||||
# Next, go to the Pub/Sub dashboard in GCP console. Authorize the user
|
||||
# "service-<numberic project id>@gs-project-accounts.iam.gserviceaccount.com"
|
||||
# as a publisher to that topic.
|
||||
|
||||
# Create a Spanner instance for the spanner integration tests.
|
||||
$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 1 --description 'Instance for go client test'
|
||||
# NOTE: Spanner instances are priced by the node-hour, so you may want to delete
|
||||
# the instance after testing with 'gcloud beta spanner instances delete'.
|
||||
# Creates a Spanner instance for the spanner integration tests.
|
||||
$ gcloud beta spanner instances create go-integration-test --config regional-us-central1 --nodes 10 --description 'Instance for go client test'
|
||||
# NOTE: Spanner instances are priced by the node-hour, so you may want to
|
||||
# delete the instance after testing with 'gcloud beta spanner instances delete'.
|
||||
|
||||
# For Storage integration tests:
|
||||
# Enable KMS for your project in the Cloud Console.
|
||||
# Create a KMS keyring, in the same location as the default location for your project's buckets.
|
||||
$ gcloud kms keyrings create MY_KEYRING --location MY_LOCATION
|
||||
# Create two keys in the keyring, named key1 and key2.
|
||||
$ gcloud kms keys create key1 --keyring MY_KEYRING --location MY_LOCATION --purpose encryption
|
||||
$ gcloud kms keys create key2 --keyring MY_KEYRING --location MY_LOCATION --purpose encryption
|
||||
# As mentioned above, set the GCLOUD_TESTS_GOLANG_KEYRING environment variable.
|
||||
$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/MY_LOCATION/keyRings/MY_KEYRING
|
||||
# Authorize Google Cloud Storage to encrypt and decrypt using key1.
|
||||
$ export MY_KEYRING=some-keyring-name
|
||||
$ export MY_LOCATION=global
|
||||
# Creates a KMS keyring, in the same location as the default location for your
|
||||
# project's buckets.
|
||||
$ gcloud kms keyrings create $MY_KEYRING --location $MY_LOCATION
|
||||
# Creates two keys in the keyring, named key1 and key2.
|
||||
$ gcloud kms keys create key1 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption
|
||||
$ gcloud kms keys create key2 --keyring $MY_KEYRING --location $MY_LOCATION --purpose encryption
|
||||
# Sets the GCLOUD_TESTS_GOLANG_KEYRING environment variable.
|
||||
$ export GCLOUD_TESTS_GOLANG_KEYRING=projects/$GCLOUD_TESTS_GOLANG_PROJECT_ID/locations/$MY_LOCATION/keyRings/$MY_KEYRING
|
||||
# Authorizes Google Cloud Storage to encrypt and decrypt using key1.
|
||||
gsutil kms authorize -p $GCLOUD_TESTS_GOLANG_PROJECT_ID -k $GCLOUD_TESTS_GOLANG_KEYRING/cryptoKeys/key1
|
||||
```
|
||||
|
||||
Once you've done the necessary setup, you can run the integration tests by running:
|
||||
#### Running
|
||||
|
||||
Once you've done the necessary setup, you can run the integration tests by
|
||||
running:
|
||||
|
||||
``` sh
|
||||
$ go test -v cloud.google.com/go/...
|
||||
```
|
||||
|
||||
#### Replay
|
||||
|
||||
Some packages can record the RPCs during integration tests to a file for
|
||||
subsequent replay. To record, pass the `-record` flag to `go test`. The
|
||||
recording will be saved to the _package_`.replay` file. To replay integration
|
||||
tests from a saved recording, the replay file must be present, the `-short`
|
||||
flag must be passed to `go test`, and the `GCLOUD_TESTS_GOLANG_ENABLE_REPLAY`
|
||||
environment variable must have a non-empty value.
|
||||
|
||||
## Contributor License Agreements
|
||||
|
||||
Before we can accept your pull requests you'll need to sign a Contributor
|
||||
|
|
|
|||
4
vendor/cloud.google.com/go/README.md
generated
vendored
4
vendor/cloud.google.com/go/README.md
generated
vendored
|
|
@ -54,6 +54,7 @@ Google API | Status | Package
|
|||
[Asset][cloud-asset] | alpha | [`godoc.org/cloud.google.com/go/asset/v1beta`][cloud-asset-ref]
|
||||
[BigQuery][cloud-bigquery] | stable | [`godoc.org/cloud.google.com/go/bigquery`][cloud-bigquery-ref]
|
||||
[Bigtable][cloud-bigtable] | stable | [`godoc.org/cloud.google.com/go/bigtable`][cloud-bigtable-ref]
|
||||
[Cloudtasks][cloud-tasks] | beta | [`godoc.org/cloud.google.com/go/cloudtasks/apiv2beta3`][cloud-tasks-ref]
|
||||
[Container][cloud-container] | stable | [`godoc.org/cloud.google.com/go/container/apiv1`][cloud-container-ref]
|
||||
[ContainerAnalysis][cloud-containeranalysis] | beta | [`godoc.org/cloud.google.com/go/containeranalysis/apiv1beta1`][cloud-containeranalysis-ref]
|
||||
[Dataproc][cloud-dataproc] | stable | [`godoc.org/cloud.google.com/go/dataproc/apiv1`][cloud-dataproc-ref]
|
||||
|
|
@ -501,3 +502,6 @@ for more information.
|
|||
[cloud-asset]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory
|
||||
[cloud-asset-docs]: https://cloud.google.com/security-command-center/docs/how-to-asset-inventory
|
||||
[cloud-asset-ref]: https://godoc.org/cloud.google.com/go/asset/apiv1
|
||||
|
||||
[cloud-tasks]: https://cloud.google.com/tasks/
|
||||
[cloud-tasks-ref]: https://godoc.org/cloud.google.com/go/cloudtasks/apiv2beta3
|
||||
|
|
|
|||
58
vendor/cloud.google.com/go/RELEASING.md
generated
vendored
58
vendor/cloud.google.com/go/RELEASING.md
generated
vendored
|
|
@ -1,13 +1,47 @@
|
|||
# How to Release this Repo
|
||||
# How to Create a New Release
|
||||
|
||||
1. Determine the current release version with `git tag -l`. It should look
|
||||
something like `vX.Y.Z`. We'll call the current
|
||||
version `$CV` and the new version `$NV`.
|
||||
1. On master, run `git log $CV..` to list all the changes since the last
|
||||
release.
|
||||
1. Edit `CHANGES.md` to include a summary of the changes.
|
||||
1. Mail the CL containing the `CHANGES.md` changes. When the CL is approved, submit it.
|
||||
1. Without submitting any other CLs:
|
||||
a. Switch to master.
|
||||
b. Tag the repo with the next version: `git tag $NV`.
|
||||
c. Push the tag: `git push origin $NV`.
|
||||
## Prerequisites
|
||||
|
||||
Install [releasetool](https://github.com/googleapis/releasetool).
|
||||
|
||||
## Create a release
|
||||
|
||||
1. `cd` into the root directory, e.g., `~/go/src/cloud.google.com/go`
|
||||
1. Checkout the master branch and ensure a clean and up-to-date state.
|
||||
```
|
||||
git checkout master
|
||||
git pull --tags origin master
|
||||
```
|
||||
1. Run releasetool to generate a changelog from the last version. Note,
|
||||
releasetool will prompt if the new version is a major, minor, or patch
|
||||
version.
|
||||
```
|
||||
releasetool start --language go
|
||||
```
|
||||
1. Format the output to match CHANGES.md.
|
||||
1. Submit a CL with the changes in CHANGES.md. The commit message should look
|
||||
like this (where `v0.31.0` is instead the correct version number):
|
||||
```
|
||||
all: Release v0.31.0
|
||||
```
|
||||
1. Wait for approval from all reviewers and then submit the CL.
|
||||
1. Return to the master branch and pull the release commit.
|
||||
```
|
||||
git checkout master
|
||||
git pull origin master
|
||||
```
|
||||
1. Tag the current commit with the new version (e.g., `v0.31.0`)
|
||||
```
|
||||
releasetool tag --language go
|
||||
```
|
||||
1. Publish the tag to GoogleSource (i.e., origin):
|
||||
```
|
||||
git push origin $NEW_VERSION
|
||||
```
|
||||
1. Visit the [releases page][releases] on GitHub and click the "Draft a new
|
||||
release" button. For tag version, enter the tag published in the previous
|
||||
step. For the release title, use the version (e.g., `v0.31.0`). For the
|
||||
description, copy the changes added to CHANGES.md.
|
||||
|
||||
|
||||
[releases]: https://github.com/GoogleCloudPlatform/google-cloud-go/releases
|
||||
|
|
|
|||
6
vendor/cloud.google.com/go/compute/metadata/metadata.go
generated
vendored
6
vendor/cloud.google.com/go/compute/metadata/metadata.go
generated
vendored
|
|
@ -20,6 +20,7 @@
|
|||
package metadata // import "cloud.google.com/go/compute/metadata"
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
|
@ -31,9 +32,6 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -143,7 +141,7 @@ func testOnGCE() bool {
|
|||
go func() {
|
||||
req, _ := http.NewRequest("GET", "http://"+metadataIP, nil)
|
||||
req.Header.Set("User-Agent", userAgent)
|
||||
res, err := ctxhttp.Do(ctx, defaultClient.hc, req)
|
||||
res, err := defaultClient.hc.Do(req.WithContext(ctx))
|
||||
if err != nil {
|
||||
resc <- false
|
||||
return
|
||||
|
|
|
|||
11
vendor/cloud.google.com/go/regen-gapic.sh
generated
vendored
11
vendor/cloud.google.com/go/regen-gapic.sh
generated
vendored
|
|
@ -23,6 +23,7 @@
|
|||
set -ex
|
||||
|
||||
APIS=(
|
||||
google/api/expr/artman_cel.yaml
|
||||
google/iam/artman_iam_admin.yaml
|
||||
google/cloud/asset/artman_cloudasset_v1beta1.yaml
|
||||
google/iam/credentials/artman_iamcredentials_v1.yaml
|
||||
|
|
@ -37,6 +38,8 @@ google/cloud/oslogin/artman_oslogin_v1.yaml
|
|||
google/cloud/oslogin/artman_oslogin_v1beta.yaml
|
||||
google/cloud/redis/artman_redis_v1beta1.yaml
|
||||
google/cloud/redis/artman_redis_v1.yaml
|
||||
google/cloud/scheduler/artman_cloudscheduler_v1beta1.yaml
|
||||
google/cloud/securitycenter/artman_securitycenter_v1beta1.yaml
|
||||
google/cloud/speech/artman_speech_v1.yaml
|
||||
google/cloud/speech/artman_speech_v1p1beta1.yaml
|
||||
google/cloud/tasks/artman_cloudtasks_v2beta2.yaml
|
||||
|
|
@ -47,7 +50,6 @@ google/cloud/videointelligence/artman_videointelligence_v1beta1.yaml
|
|||
google/cloud/videointelligence/artman_videointelligence_v1beta2.yaml
|
||||
google/cloud/vision/artman_vision_v1.yaml
|
||||
google/cloud/vision/artman_vision_v1p1beta1.yaml
|
||||
google/container/artman_container.yaml
|
||||
google/devtools/artman_clouddebugger.yaml
|
||||
google/devtools/clouderrorreporting/artman_errorreporting.yaml
|
||||
google/devtools/cloudtrace/artman_cloudtrace_v1.yaml
|
||||
|
|
@ -70,6 +72,13 @@ for api in "${APIS[@]}"; do
|
|||
cp -r artman-genfiles/gapi-*/cloud.google.com/go/* $GOPATH/src/cloud.google.com/go/
|
||||
done
|
||||
|
||||
# NOTE(pongad): `sed -i` doesn't work on Macs, because -i option needs an argument.
|
||||
# `-i ''` doesn't work on GNU, since the empty string is treated as a file name.
|
||||
# So we just create the backup and delete it after.
|
||||
ver=$(date +%Y%m%d)
|
||||
find $GOPATH/src/cloud.google.com/go/ -name '*.go' -exec sed -i.backup -e "s/^const versionClient.*/const versionClient = \"$ver\"/" '{}' +
|
||||
find $GOPATH/src/cloud.google.com/go/ -name '*.backup' -delete
|
||||
|
||||
#go list cloud.google.com/go/... | grep apiv | xargs go test
|
||||
|
||||
#go test -short cloud.google.com/go/...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue