blob: d8f917f72a6b942c3c00c0b3b0413bfb833c9c43 [file] [log] [blame]
Thomas Vachuskaf7659332016-03-02 00:36:55 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Validates that no pom versions contain SNAPSHOT.
4# -----------------------------------------------------------------------------
5
6[ ! -d "$ONOS_ROOT" ] && echo "ONOS_ROOT is not defined" >&2 && exit 1
7
Thomas Vachuskad7c85e32016-03-02 15:05:31 -08008aux=$(mktemp)
Thomas Vachuskaf7659332016-03-02 00:36:55 -08009trap "rm -f $aux 2>/dev/null" EXIT
10
Thomas Vachuskad7c85e32016-03-02 15:05:31 -080011cd $ONOS_ROOT
Thomas Vachuskaf7659332016-03-02 00:36:55 -080012grep -r SNAPSHOT . | \
Thomas Vachuskad7c85e32016-03-02 15:05:31 -080013 egrep -v -f $ONOS_ROOT/tools/build/onos-validate-change-version.excludes >$aux
Thomas Vachuskaf7659332016-03-02 00:36:55 -080014
Thomas Vachuskad7c85e32016-03-02 15:05:31 -080015if [ -s $aux ]; then
16 echo "There are files containing SNAPSHOT references:"
17 cat $aux
18 exit 1
19fi
Thomas Vachuskaf7659332016-03-02 00:36:55 -080020exit 0