[英]Use the git hash code in Eclipse CDT build process
We need to pass the short git hash code git rev-parse --short HEAD
, to the eclipse build process. 我们需要将短git哈希码
git rev-parse --short HEAD
传递给Eclipse构建过程。 we use the Eclipse CDT internal builder. 我们使用Eclipse CDT内部构建器。 I tried to store the git hash in a environment variable, using a pre-build script.
我试图使用预构建脚本将git哈希存储在环境变量中。 But in the build the variable is empty.
但是在构建中变量为空。 Our development system is based on windows eclipse CDT with a cross c compiler.
我们的开发系统基于带有跨C编译器的Windows eclipse CDT。 How can this be achieved?
如何做到这一点?
The only solution that I find for the moment is write a eclipse plugin. 我目前发现的唯一解决方案是编写一个eclipse插件。 Working in progress...
工程进行中...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.