druid/upload.sh

22 lines
412 B
Bash
Raw Normal View History

#!/bin/bash -e
#
# Script to upload tarball of assembly build to static.druid.io for serving
#
2015-02-18 20:25:09 -05:00
if [ $# -lt 1 ]; then
echo "Usage: $0 <version>" >&2
exit 2
fi
VERSION=$1
TAR=druid-$VERSION-bin.tar.gz
S3PATH=s3://static.druid.io/artifacts/releases
if [ ! -z "`s3cmd ls "$S3PATH/$TAR"`" ]; then
echo "ERROR: Refusing to overwrite $S3PATH/$TAR" >&2
exit 2
fi
s3cmd put services/target/$TAR $S3PATH/$TAR