xref: /aosp_15_r20/external/pytorch/scripts/release/promote/s3_to_s3.sh (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1#!/usr/bin/env bash
2
3set -eou pipefail
4
5DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6source "${DIR}/common_utils.sh"
7
8# Allow for users to pass PACKAGE_NAME
9# For use with other packages, i.e. torchvision, etc.
10PACKAGE_NAME=${PACKAGE_NAME:-torch}
11PACKAGE_TYPE=${PACKAGE_TYPE:-whl}
12
13PYTORCH_S3_BUCKET=${PYTORCH_S3_BUCKET:-s3://pytorch}
14FROM=${FROM:-test}
15PYTORCH_S3_FROM=${PYTORCH_S3_FROM:-${PYTORCH_S3_BUCKET}/${PACKAGE_TYPE}/${FROM}}
16TO=${TO:-}
17PYTORCH_S3_TO=${PYTORCH_S3_TO:-${PYTORCH_S3_BUCKET}/${PACKAGE_TYPE}/${TO}}
18
19aws_promote "${PACKAGE_NAME}"
20