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 | 251016d | 2016-06-01 17:46:14 -0700 | [diff] [blame] | 12 | find . -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 Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 17 | |
Thomas Vachuska | d7c85e3 | 2016-03-02 15:05:31 -0800 | [diff] [blame] | 18 | if [ -s $aux ]; then |
| 19 | echo "There are files containing SNAPSHOT references:" |
| 20 | cat $aux |
| 21 | exit 1 |
| 22 | fi |
Thomas Vachuska | f765933 | 2016-03-02 00:36:55 -0800 | [diff] [blame] | 23 | exit 0 |