2 @echo make verify-versions
5 @echo check pom.xml against setup.py and types.yaml files
6 @for i in */pom.xml; do \
9 v=$$(grep "<version>" $$i | sed 2q | tail -n 1 | sed -e 's!</\?version>!!g' -e 's/-SNAPSHOT//' -e 's/[[:space:]]//g'); \
10 if grep 'version[[:space:]]*=[[:space:]]*["'"']$$v['"'"]' $$p/setup.py > /dev/null; then \
11 echo "$$i version $$v verified in $$p/setup.py"; \
13 grep -n "<version>" $$i /dev/null | sed 2q | tail -n 1; \
14 grep -n "version[[:space:]]*=" $$p/setup.py /dev/null; \
15 echo "$$i version $$v not found in $$p/setup.py. Instead found the above version."; \
18 typefiles=$$( grep -l "package_version[[:space:]]*:" $$p/* 2>/dev/null ); \
19 if [ -z "$$typefiles" ]; then \
20 echo "No type files found in $$p"; \
23 for typefile in $$typefiles; do \
24 if grep "package_version:[[:space:]]*$$v" "$$typefile" > /dev/null 2>&1; then \
25 echo "$$i version $$v verified in" "$$typefile"; \
27 grep -n "<version>" $$i /dev/null | sed 2q | tail -n 1; \
28 grep -n "package_version:" "$$typefile" /dev/null; \
35 @pomv=$$(grep "<version>" pom.xml | sed 2q | tail -n 1 | sed -e 's!</\?version>!!g' -e 's/[[:space:]]//g'); \
36 for i in */pom.xml; do \
37 v=$$(grep "<version>" $$i | sed 1q | sed -e 's!</\?version>!!g' -e 's/[[:space:]]//g'); \
38 if [ "$$pomv" = "$$v" ]; then \
39 echo "pom.xml version $$pomv verified in $$i"; \
41 grep -n "<version>" $$i /dev/null | sed 1q; \
42 echo "pom.xml version $$pomv not found in $$i. Instead found $$v"; \