Skip to content

Commit 458c721

Browse files
1 parent 1051786 commit 458c721

File tree

2 files changed

+4
-74
lines changed

2 files changed

+4
-74
lines changed

‎.kokoro/build.sh

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,13 @@ if [[ -z "${PROJECT_ROOT:-}" ]]; then
2020
fi
2121

2222
cd "${PROJECT_ROOT}"
23-
# Need enchant for spell check
24-
sudo apt-get update
25-
sudo apt-get -y install dictionaries-common aspell aspell-en \
26-
hunspell-en-us libenchant1c2a enchant
27-
28-
set -eo pipefail
29-
30-
cd github/python-crc32c
3123

3224
# Disable buffering, so that the logs stream through.
3325
export PYTHONUNBUFFERED=1
3426

3527
# Debug: show build environment
3628
env | grep KOKORO
3729

38-
# Setup firestore account credentials
39-
export FIRESTORE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/firebase-credentials.json
40-
4130
# Setup service account credentials.
4231
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
4332

@@ -68,19 +57,3 @@ if [[ -n "${NOX_SESSION:-}" ]]; then
6857
else
6958
python3 -m nox
7059
fi
71-
# Find out if this package was modified.
72-
# Temporarily use Thea's fork of ci-diff-helper w/ Kokoro support.
73-
# python3.6 -m pip install --quiet git+https://github.com/theacodes/ci-diff-helper.git
74-
# python3.6 test_utils/scripts/get_target_packages_kokoro.py > ~/target_packages
75-
# cat ~/target_packages
76-
77-
# if [[ ! -n $(grep -x "$PACKAGE" ~/target_packages) ]]; then
78-
# echo "$PACKAGE was not modified, returning."
79-
# exit;
80-
# fi
81-
82-
# cd "$PACKAGE"
83-
84-
# Some system tests require indexes. Use gcloud to create them.
85-
gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS --project=$PROJECT_ID
86-
#gcloud --quiet --verbosity=debug datastore indexes create tests/system/index.yaml

‎.kokoro/release.sh

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,59 +14,16 @@
1414
# limitations under the License.
1515

1616
set -eo pipefail
17-
echo "Release script started"
18-
19-
if [ "$(uname)" == "Darwin" ]; then
20-
# Mac OS
21-
PYTHON=$(PYENV_VERSION=3.9 pyenv which python)
22-
PYTHON_BIN=$(dirname ${PYTHON})
23-
24-
RELEASETOOL=${PYTHON_BIN}/releasetool
25-
TWINE=${PYTHON_BIN}/twine
26-
${PYTHON} -m pip install gcp-releasetool twine --user
27-
28-
echo "Change to code directory"
29-
REPO_ROOT=$(pwd)
30-
cd "${REPO_ROOT}"
31-
ls
32-
33-
else
34-
# Kokoro Linux
35-
mv /keys/73713_google-cloud-pypi-token-keystore-1 /73713_google-cloud-pypi-token-keystore-1
36-
37-
PATH=/opt/python/cp39-cp39/bin/:$PATH
38-
PYTHON_BIN=/opt/python/cp39-cp39/bin/
39-
RELEASETOOL=${PYTHON_BIN}/releasetool
40-
PYTHON=${PYTHON_BIN}/python
41-
TWINE=${PYTHON_BIN}/twine
42-
${PYTHON} -m pip install gcp-releasetool twine
43-
44-
echo "Change to code directory"
45-
REPO_ROOT=/var/code/python-crc32c/
46-
cd "${REPO_ROOT}"
47-
ls
48-
49-
fi
50-
51-
echo "Download dependencies for release script"
5217

5318
# Start the releasetool reporter
54-
${PYTHON} -m pip install --require-hashes -r ${REPO_ROOT}/.kokoro/requirements.txt
55-
${RELEASETOOL} publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
56-
57-
# Ensure that we have the latest versions of Twine, Wheel, and Setuptools.
58-
${PYTHON} -m pip install --upgrade twine wheel setuptools --user
19+
python3 -m pip install --require-hashes -r github/python-crc32c/.kokoro/requirements.txt
20+
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
5921

6022
# Disable buffering, so that the logs stream through.
6123
export PYTHONUNBUFFERED=1
62-
echo "## RELASE WORKFLOW SUCCESSFUL ##"
63-
echo "## Uploading Wheels ##"
64-
# TODO: ONE OF THE BELOW WORKS
24+
6525
# Move into the package, build the distribution and upload.
6626
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
6727
cd github/python-crc32c
6828
python3 setup.py sdist bdist_wheel
69-
#twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
70-
71-
${PYTHON} setup.py sdist
72-
# ${TWINE} upload --skip-existing --username gcloudpypi --password "${TWINE_PASSWORD}" dist/* wheels/*
29+
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*

0 commit comments

Comments
 (0)