2013-07-09 18:10:44 -04:00
|
|
|
#!/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
|
2016-03-16 16:20:47 -04:00
|
|
|
DRUID_TAR=druid-$VERSION-bin.tar.gz
|
|
|
|
MYSQL_TAR=mysql-metadata-storage-$VERSION.tar.gz
|
2015-02-18 20:25:09 -05:00
|
|
|
S3PATH=s3://static.druid.io/artifacts/releases
|
|
|
|
|
2016-03-16 16:20:47 -04:00
|
|
|
if [ ! -z "`s3cmd ls "$S3PATH/$DRUID_TAR"`" ]; then
|
|
|
|
echo "ERROR: Refusing to overwrite $S3PATH/$DRUID_TAR" >&2
|
2015-02-18 20:25:09 -05:00
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2016-03-16 16:20:47 -04:00
|
|
|
if [ ! -z "`s3cmd ls "$S3PATH/$MYSQL_TAR"`" ]; then
|
|
|
|
echo "ERROR: Refusing to overwrite $S3PATH/$MYSQL_TAR" >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
|
|
|
s3cmd put distribution/target/$DRUID_TAR $S3PATH/$DRUID_TAR
|
|
|
|
s3cmd put distribution/target/$MYSQL_TAR $S3PATH/$MYSQL_TAR
|