Embed Git revision in executable during remote build with NetBeans

后端 未结 1 1105
面向向阳花
面向向阳花 2021-01-16 11:43

I\'d like to embed the Git revision (SHA1) in my executables at build time. I can do it locally like this:

 git log -1 --format=\'%h\' >version
 objcopy          


        
相关标签:
1条回答
  • 2021-01-16 12:29

    One solution would be to have that version file already up-to-date when you launch your Netbeans job.

    A post-commit hook could generate that file at the right place, for your Netbean job to read.

    0 讨论(0)
提交回复
热议问题