onos/tools/build/onos-validate-change-version
Thomas Vachuska d7c85e3377 Enhancing onos-release to check for no SNAPSHOTs.
Change-Id: I6fda5cb6b80a1418f9d7e76f8b7d38a4a037a4c4
2016-03-02 15:05:31 -08:00

20 lines
580 B
Bash
Executable File

#!/bin/bash
# -----------------------------------------------------------------------------
# Validates that no pom versions contain SNAPSHOT.
# -----------------------------------------------------------------------------
[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
aux=$(mktemp)
trap "rm -f $aux 2>/dev/null" EXIT
cd $ONOS_ROOT
grep -r SNAPSHOT . | \
egrep -v -f $ONOS_ROOT/tools/build/onos-validate-change-version.excludes >$aux
if [ -s $aux ]; then
echo "There are files containing SNAPSHOT references:"
cat $aux
exit 1
fi
exit 0