Skip to content

Commit

Permalink
Check if in CI before running rapids-package-name (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr authored Nov 26, 2024
1 parent 2cdbae8 commit f5b37cc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/rapids-upload-wheels-to-s3
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# 1) wheel path to tar up
set -e

if [ "${CI:-false}" = "false" ]; then
rapids-echo-stderr "Packages from local builds cannot be uploaded to S3."
rapids-echo-stderr "Open a PR to have successful builds uploaded."
exit 0
fi

# For legacy reasons, allow this script to be run without the pkg_type being the first arg
pkg_name="$(rapids-package-name "wheel_python")"

Expand All @@ -14,10 +20,4 @@ if [ "${pkg_type}" = "cpp" ] || [ "${pkg_type}" = "python" ]; then
pkg_name="$(rapids-package-name "wheel_${pkg_type}")"
fi

if [ "${CI:-false}" = "false" ]; then
rapids-echo-stderr "Packages from local builds cannot be uploaded to S3."
rapids-echo-stderr "Open a PR to have successful builds uploaded."
exit 0
fi

rapids-upload-to-s3 "${pkg_name}" "$@"

0 comments on commit f5b37cc

Please sign in to comment.