假设我在我的 javascript/php/html 等顶部有一些评论,我想在 Aptana Studio 中添加自动版本号...我该怎么做。 我的所有项目都在 Aptana 中使用 git,我真的只想要插入文件的 git 版本号吗?
在其他开发应用程序中,我可以在文件中执行类似 $VERSION
的操作,但我无法在 Aptana 中找到相关引用。
非常感谢
最佳答案
您可以设置一个过滤器驱动程序,以便用从 git 描述中推导出的当前版本号替换 $VERSION
:
- 有关
git describe
的更多信息,请参阅“Is it possible to add a version number using git / github” - 请参阅“how to add revision and build date to source”以获取内容过滤器驱动程序的示例
但是,还有其他方式来放置该信息,如“Enable ident string for Git repos”中所述:
Recommended way of embedding version info in product is to use build system for that; see below for details and alternate approaches.
关于javascript - 在 Aptana Studio 中自动插入版本号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12026574/