#!/bin/bash # # Manage list of deployed version numbers for a channel in order to generate incremental builds # set -euo pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$(dirname "$SCRIPT_DIR")" . "$ROOT_DIR/config.sh" function usage { cat >&2 <&2 # Add version to file and reupload if [ "$VERSION" ]; then echo "Adding $VERSION to incrementals-$PLATFORM" echo $VERSION >> $INCR_PATH aws s3 cp $INCR_PATH $S3_URL # Show last n versions elif [ "$NUM_VERSIONS" ]; then tail -n $NUM_VERSIONS $INCR_PATH fi rm $INCR_PATH