#!/bin/sh
#
# Upload 'next' release to S3
#

set -eu

cd "$(dirname "$0")"
cd ..

echo "Generating package files" >&2
make clean
make

# This passes through passed arguments so you can call, for example:
#
#     tools/push_next --dryrun
#
echo "Uploading 'next' to S3" >&2
aws s3 sync --delete --acl public-read \
  pkg/ s3://assets.annotateit.org/annotator/next/ \
  "$@"
