Convert Cygwin paths passed to AWS CLI

AWS CLI v2 (or possibly some other config change on our new build
system) doesn't like POSIX paths, so convert to Windows paths
This commit is contained in:
Dan Stillman 2023-05-18 10:45:08 +01:00
parent 82a00b1f7b
commit dec508542d
2 changed files with 9 additions and 1 deletions

View file

@ -68,6 +68,10 @@ INCR_FILENAME="incrementals-$CHANNEL-$PLATFORM"
S3_URL="s3://$S3_BUCKET/$S3_DIST_PATH/$CHANNEL/incrementals-$PLATFORM"
INCR_PATH="$DIST_DIR/$INCR_FILENAME"
if [ "`uname -o 2> /dev/null`" = "Cygwin" ]; then
INCR_PATH=$(cygpath -w "$INCR_PATH")
fi
mkdir -p "$DIST_DIR"
aws s3 cp $S3_URL $INCR_PATH >&2

View file

@ -20,5 +20,9 @@ if [[ -z "$CHANNEL" ]] || [[ -z "$VERSION" ]]; then
usage
fi
source_dir="$DIST_DIR"
if [ "`uname -o 2> /dev/null`" = "Cygwin" ]; then
source_dir=$(cygpath -w "$source_dir")
fi
url="s3://$S3_BUCKET/$S3_DIST_PATH/$CHANNEL/$VERSION/"
aws s3 sync --exclude "files-*" --exclude build_id "$DIST_DIR" $url
aws s3 sync --exclude "files-*" --exclude build_id "$source_dir" $url