rclone/vendor/cloud.google.com/go/regen-gapic.sh

69 lines
2.4 KiB
Bash
Raw Normal View History

2018-03-19 15:51:38 +00:00
#!/bin/bash
# This script generates all GAPIC clients in this repo.
# One-time setup:
# cd path/to/googleapis # https://github.com/googleapis/googleapis
# virtualenv env
# . env/bin/activate
# pip install googleapis-artman
# deactivate
#
# Regenerate:
# cd path/to/googleapis
# . env/bin/activate
# $GOPATH/src/cloud.google.com/go/regen-gapic.sh
# deactivate
#
# Being in googleapis directory is important;
# that's where we find YAML files and where artman puts the "artman-genfiles" directory.
#
# NOTE: This script does not generate the "raw" gRPC client found in google.golang.org/genproto.
# To do that, use the regen.sh script in the genproto repo instead.
set -ex
APIS=(
2018-06-17 16:59:12 +00:00
google/iam/artman_iam_admin.yaml
2018-03-19 15:51:38 +00:00
google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml
google/cloud/dataproc/artman_dataproc_v1.yaml
2018-06-17 16:59:12 +00:00
google/cloud/dialogflow/artman_dialogflow_v2.yaml
2018-03-19 15:51:38 +00:00
google/cloud/language/artman_language_v1.yaml
google/cloud/language/artman_language_v1beta2.yaml
google/cloud/oslogin/artman_oslogin_v1beta.yaml
2018-06-17 16:59:12 +00:00
google/cloud/redis/artman_redis_v1beta1.yaml
2018-03-19 15:51:38 +00:00
google/cloud/speech/artman_speech_v1.yaml
google/cloud/speech/artman_speech_v1beta1.yaml
2018-06-17 16:59:12 +00:00
google/cloud/speech/artman_speech_v1p1beta1.yaml
google/cloud/tasks/artman_cloudtasks.yaml
2018-03-19 15:51:38 +00:00
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
google/devtools/cloudtrace/artman_cloudtrace_v2.yaml
google/firestore/artman_firestore.yaml
google/logging/artman_logging.yaml
google/longrunning/artman_longrunning.yaml
google/monitoring/artman_monitoring.yaml
google/privacy/dlp/artman_dlp_v2.yaml
2018-03-19 15:51:38 +00:00
google/pubsub/artman_pubsub.yaml
google/spanner/admin/database/artman_spanner_admin_database.yaml
google/spanner/admin/instance/artman_spanner_admin_instance.yaml
google/spanner/artman_spanner.yaml
)
for api in "${APIS[@]}"; do
rm -rf artman-genfiles/*
artman --config "$api" generate go_gapic
cp -r artman-genfiles/gapi-*/cloud.google.com/go/* $GOPATH/src/cloud.google.com/go/
done
2018-06-17 16:59:12 +00:00
#go list cloud.google.com/go/... | grep apiv | xargs go test
2018-03-19 15:51:38 +00:00
2018-06-17 16:59:12 +00:00
#go test -short cloud.google.com/go/...
2018-03-19 15:51:38 +00:00
2018-06-17 16:59:12 +00:00
#echo "googleapis version: $(git rev-parse HEAD)"