blob: 826b6934f334e7624bca2a0fd67f20b76f4339fe [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 Vachuska2dec3542016-06-01 17:46:14 -070012find . -type f | \
13 egrep -v -f $ONOS_ROOT/tools/build/onos-validate-change-version.excludes | \
14 xargs grep SNAPSHOT >$aux
15
16 # FIXME: deal properly with files with white-space in them
Thomas Vachuskaf7659332016-03-02 00:36:55 -080017
Thomas Vachuskad7c85e32016-03-02 15:05:31 -080018if [ -s $aux ]; then
19 echo "There are files containing SNAPSHOT references:"
20 cat $aux
21 exit 1
22fi
Thomas Vachuskaf7659332016-03-02 00:36:55 -080023exit 0