#!/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" scp "$INCR_PATH" $DEPLOY_HOST:"$REMOTE_PATH" # Show last n versions elif [ "$NUM_VERSIONS" -gt 0 ]; then # TEMP: Don't include 6.0 versions #tail -n $NUM_VERSIONS "$INCR_PATH" set +e tail -n $NUM_VERSIONS "$INCR_PATH" | grep -v '^6\.0' set -e fi rm "$INCR_PATH"