2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2019 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
11 echo "---> pypi-upload.sh"
13 # Script to publish Python distributions from a folder
14 # to the PyPI repository in $REPOSITORY which must be a
15 # key in the .pypirc file
17 # Ensure we fail the job if any steps fail.
20 # shellcheck disable=SC1090
23 # Version controlled by JJB_VERSION
24 lf-activate-venv setuptools twine wheel readline
27 echo "INFO: cd to tox-dir $TOX_DIR"
28 cd "$WORKSPACE/$TOX_DIR"
30 cmd="twine upload -r $REPOSITORY dist/*"
32 echo "INFO: dry-run is set, echoing command only"
35 echo "INFO: uploading distributions to repo $REPOSITORY"
37 # emit message and files on single line for release-job
38 # shellcheck disable=SC2046
39 echo "INFO: successfully uploaded distributions: " $(ls dist)
42 echo "---> pypi-upload.sh ends"