Skip to content

Commit dfc52e8

Browse files
committed
Use the official AWS CLI tools to upload to S3
1 parent 998d8f3 commit dfc52e8

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

tools/make_release

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ if ! which json >/dev/null 2>&1; then
88
exit 1
99
fi
1010

11-
if ! which s3cmd >/dev/null 2>&1; then
12-
echo "$(basename "$0"): this tool requires s3cmd! (try 'brew install s3cmd && s3cmd --configure')" >&2
11+
if ! which aws >/dev/null 2>&1; then
12+
echo "$(basename "$0"): this tool requires awscli! (try 'pip install awscli')" >&2
1313
exit 1
1414
fi
1515

@@ -109,15 +109,22 @@ git tag "v${VERSION}" "${commit}"
109109
git reset HEAD pkg/
110110

111111
# Upload release to S3
112+
pushd pkg/
112113

113114
echo "Uploading release to S3"
114-
[ -n "$S3CFG" ] && S3ARGS="-c $S3CFG"
115-
maybe s3cmd $S3ARGS --acl-public sync pkg/*.{js,css} "s3://assets.annotateit.org/annotator/v${VERSION}/"
115+
maybe aws s3 sync --acl public-read \
116+
--exclude "*" \
117+
--include "annotator*.js" \
118+
--include "annotator*.css" \
119+
--include "annotator*.map" \
120+
--include "_preamble.coffee" \
121+
--include "*_mapsrc*" \
122+
. \
123+
"s3://assets.annotateit.org/annotator/v${VERSION}/"
116124

117125
# Make zips
118126

119127
echo "Making zips for GitHub"
120-
pushd pkg/
121128

122129
mkdir "annotator.${VERSION}"
123130
ln annotator.*min.{js,css} "annotator.${VERSION}"

0 commit comments

Comments
 (0)