Reputation: 65
Does any one know how can i extract the revision number using groovy from a svn tag
-r revision http://svn/....
output : revision
is there a equivalent of sed in groovy or something?
Thanks in advance
Upvotes: 2
Views: 1193
Reputation: 7868
You can run a Groovy script, using the GString.execute()
method to accomplish this:
def url = "http://your.subversion.url/svn/YourRepository"
println "svn info --show-item last-changed-revision $url".execute().text
Which will print out the latest revision number for that SVN path.
Upvotes: 3