blob: 1bf7645590a2b5fd4daa3f62b13d7a9394b7bfb0 [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
8aux=/tmp/pom-$$.log
9trap "rm -f $aux 2>/dev/null" EXIT
10
11grep -r SNAPSHOT . | \
12 grep -v -f $(dirname $0)/onos-validate-change-version.excludes > $aux
13
14[ ! -s $aux ] && echo "There are files containing SNAPSHOT references:" && \
15 cat $aux && exit 1
16exit 0