|
| 1 | +#!/bin/bash |
| 2 | +# Copyright 2020 Google LLC |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | + |
| 16 | +#!/bin/bash |
| 17 | + |
| 18 | +set -eo pipefail |
| 19 | + |
| 20 | +# Start the releasetool reporter |
| 21 | +python3 -m pip install gcp-releasetool |
| 22 | +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script |
| 23 | + |
| 24 | +# Ensure that we have the latest versions of Twine, Wheel, and Setuptools. |
| 25 | +python3 -m pip install --upgrade twine wheel setuptools |
| 26 | + |
| 27 | +# Disable buffering, so that the logs stream through. |
| 28 | +export PYTHONUNBUFFERED=1 |
| 29 | + |
| 30 | +# Move into the package, build the distribution and upload. |
| 31 | +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password") |
| 32 | +cd github/google-api-python-client |
| 33 | +python3 setup.py sdist bdist_wheel |
| 34 | +twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/* |
0 commit comments