• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to find the latest tag using ant script

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

My repository directory structure like this...



1. I want to build a script which has to checkout the LATEST TAG(our case tag3.0.3)
2. When I want to check-in(after some modification), ant script pick the latest tag name and increment by 1 (this case the next tag tag3.0.3)

How can we achive this in ant? or any workaround?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shankar,
You could use a custom tag (implemented in Java) or embed a scripting language (like BSH) in the Ant script itself. Then you can do anything that code can do - parse, increment, etc.
 
Shankar sanjay
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply.. and

1. could you please tell me what do you mean "embed a scripting language (like BSH) in the Ant script " sorry i am not clear in this.
2. as you said, i can call Java from ant and try, in java, is there any way to get dir list using http protocal

 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) See the Script tag. It lets you embed custom logic in the XML file. (I don't like it for anything too complicated for the same reason I don't like scriplets in JSPs.)
2) Yes. You can call any Ant task from a Java Ant task. It's probably easier to call svn list from Ant directly though and read that property from Java.
 
reply
    Bookmark Topic Watch Topic
  • New Topic