| # Update all pom.xml with new build number |
| # TODO(sop) This should be converted to some sort of |
| # Java based Maven plugin so its fully portable. |
| SERVER_POMS=$(git ls-files | grep pom.xml | grep -v /src/main/resources/archetype-resources/pom.xml) |
| PLUGINS="commit-message-length-validator replication reviewnotes" |
| POM_FILES="$POM_FILES $(cd plugins/$p && git ls-files | grep pom.xml | sed s,^,plugins/$p/,)" |
| V=$(echo "$1" | perl -pe 's/^--snapshot=//') |
| echo >&2 "usage: $0 --snapshot=0.n.0" |
| V=$(git describe HEAD) || exit |
| git checkout HEAD -- $SERVER_POMS |
| (cd plugins/$p; git checkout $(git ls-files | grep pom.xml)) |
| echo >&2 "usage: $0 {--snapshot=2.n | --release}" |
| v*) V=$(echo "$V" | perl -pe s/^v//) ;; |
| if ($ARGV ne $old_argv) { |
| s{(<version>).*(</version>)}{${1}'"$V"'${2}}; |