#!/usr/bin/env bash
#
# Scan a branch directory for source tarballs and rebuild the releases.json
# file for that branch. md5 and sha256 are added if present. The highest
# numbered version is referenced as the latest release.
#
# Usage: $0 [-b branch] [-o outfile] /path/to/download/branch
#

USAGE="Usage: ${0##*/} [-b branch] [-o outfile] DIR"
OUTPUT=
BRANCH=
DIR=

die() {
	[ "$#" -eq 0 ] || echo "$*" >&2
	exit 1
}

err() {
	echo "$*" >&2
}

quit() {
	[ "$#" -eq 0 -o -n "$QUIET" ] || echo "$*"
	exit 0
}

emit_json() {
	printf '{\n  "branch": "%s",\n' ${BRANCH}
	latest=""
	for file in $(find "$DIR/src" -name 'haproxy-[0-9]*.gz' -printf "%P\n" |grep -v '[0-9]-patches*' | sort -rV ); do
		rel="${file##*haproxy-}"
		rel="${rel%%.tar.*}"
		if [ -z "$latest" ]; then
			latest="$rel";
			printf '  "latest_release": "%s",\n' ${latest}
			printf '  "releases": {\n'
		else
			printf ",\n"
		fi
		printf '    "%s": {\n' ${rel}
		printf '      "file": "%s"' ${file}
		if [ -s "$DIR/src/$file.md5" ]; then
			printf ',\n      "md5": "%s"' $(awk '{print $1}' "$DIR/src/$file.md5")
		fi
		if [ -s "$DIR/src/$file.sha256" ]; then
			printf ',\n      "sha256": "%s"' $(awk '{print $1}' "$DIR/src/$file.sha256")
		fi
		printf '\n    }'
	done

	if [ -n "$latest" ]; then
		printf "\n  }"  ## "releases"
	fi

	printf '\n}\n'
}


### main

while [ -n "$1" -a -z "${1##-*}" ]; do
	case "$1" in
		-b)        BRANCH="$2"    ; shift 2 ;;
		-o)        OUTPUT="$2"    ; shift 2 ;;
		-h|--help) quit "$USAGE" ;;
		*)         die  "$USAGE" ;;
	esac
done

if [ $# -ne 1 ]; then
	die "$USAGE"
fi

DIR="$1" ; shift
if [ -z "$DIR" ]; then
	die "Missing download directory name."
fi

if [ ! -d "$DIR/." ]; then
	die "Download directory doesn't exist : $DIR"
fi

if [ ! -d "$DIR/src" ]; then
	die "Download directory must contain 'src' : $DIR"
fi

if [ -z "$BRANCH" ]; then
	BRANCH=${DIR##*/}
	if [ -n "${BRANCH//[0-9.]}" ]; then
		die "Couldn't determine branch number from dir name: $BRANCH"
	fi
fi

# echo "debug: DIR=$DIR BRANCH=$BRANCH"
if [ -n "$OUTPUT" ]; then
	emit_json > "$OUTPUT.tmp"
	mv -f "$OUTPUT.tmp" "$OUTPUT"
	rm -f "$OUTPUT.tmp"
else
	emit_json
fi
