#!/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 < /dev/null`" = "Cygwin" ]; then INCR_PATH=$(cygpath -w "$INCR_PATH") fi mkdir -p "$DIST_DIR" aws s3 cp $S3_URL "$INCR_PATH" >&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 # TEMP: Don't include 6.0 versions #tail -n $NUM_VERSIONS "$INCR_PATH" tail -n $NUM_VERSIONS "$INCR_PATH" | grep -v '^6\.0' fi rm "$INCR_PATH"