开发者

Inject SVN revision to a variable

开发者 https://www.devze.com 2023-04-12 03:04 出处:网络
Is there a way to inject the current SVN number in a Java variable? I want every class to have a private static variable which holds the SV开发者_如何转开发N revision value?Right answer is not keyword

Is there a way to inject the current SVN number in a Java variable? I want every class to have a private static variable which holds the SV开发者_如何转开发N revision value?


Right answer is not keywords, but

  • using SubWCRev,
  • storing in repo SubWCRev templates
  • processing templates into real code by build-system

When instead of path to WC path to single file used in SubWCRev call, $WCREV$ from template expanded to revision of last modification for file, not global last revision for repo

char *Revision   = "$WCREV$";

will be converted in readable, nice

char *Revision   = "298";
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号