Created
October 31, 2013 23:06
-
-
Save d235j/7258653 to your computer and use it in GitHub Desktop.
fixup script for gradle/maven versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This fixes the versioning in the generated .pom files. | |
| # Gradle simply copies the version string overs, which causes Maven to choke if the string ends with a plus. | |
| find . -name '*.pom' -exec perl -i -pe 's/>((\.?[0-9]?)*)(\.?([0-9]))(\.?)\+</$5 eq "." ? ">[".$1.$3.",".$1.($3+1).")<" : ">[".$1.$3.",)<"/ge' {} \; | |
| find . -name "*.pom" -exec sh -c "openssl md5 < {} > {}.md5" \; | |
| find . -name "*.pom" -exec sh -c "openssl sha1 < {} > {}.sha1" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment