Thomas Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 1 | #!/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 Vachuska | d7c85e3 | 2016-03-02 15:05:31 -0800 | [diff] [blame] | 8 | aux=$(mktemp) |
Thomas Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 9 | trap "rm -f $aux 2>/dev/null" EXIT |
| 10 | |
Thomas Vachuska | d7c85e3 | 2016-03-02 15:05:31 -0800 | [diff] [blame] | 11 | cd $ONOS_ROOT |
Thomas Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 12 | grep -r SNAPSHOT . | \ |
Thomas Vachuska | d7c85e3 | 2016-03-02 15:05:31 -0800 | [diff] [blame] | 13 | egrep -v -f $ONOS_ROOT/tools/build/onos-validate-change-version.excludes >$aux |
Thomas Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 14 | |
Thomas Vachuska | d7c85e3 | 2016-03-02 15:05:31 -0800 | [diff] [blame] | 15 | if [ -s $aux ]; then |
| 16 | echo "There are files containing SNAPSHOT references:" |
| 17 | cat $aux |
| 18 | exit 1 |
| 19 | fi |
Thomas Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 20 | exit 0 |