取消
显示结果 
搜索替代 
您的意思是: 

Reliably recording Git commit hashes

Hi all,

 

How does everyone here go about adding your commit revisions to software logs in a way that is agnostic to the location of the software?

 

This would be the ideal behavior for me:

 

1. If you're running on a dev machine, simple use the git command line to grab the current hash, updating a cache of some kind for later use

2. If you're deployed in the wild, try using the git command line, and when it fails, fall back on the cached value

 

Here's my attempt:

 

Get the current revision

current git rev.png

 

Update the Git revisionupdate git rev.png

 

 

So here's the rub: when you run the update code above, it only works when the "current git revision" VI is nowhere in the call stack; therefore you have the run the update code before running your application to have it work as expected.

 

That's easy to do in an application builder scenario (just add the update VI to your pre-build actions), but less easy on the dev machine.

 

Should I just add that same git code to the "current git revision vi"? That might work but doesn't have the best code smell IMO

0 项奖励
1 条消息(共 7 条)
2,636 次查看

Looks like when the snippet saved in the "current git revision" VI, it disconnected the "git revision" indicator from those property nodes. Just link them back up and it should work as expected.

0 项奖励
2 条消息(共 7 条)
2,635 次查看

I know its four years old, but looks quit nice, any idea, why the snippets are only integrated as decorators?

0 项奖励
3 条消息(共 7 条)
1,528 次查看

You have to download the original, i.e. click in the image and download the image that pops up. The inline view does not contain the VI data, just the image.

0 项奖励
4 条消息(共 7 条)
1,520 次查看

Thanks for the fast reply. Have you tried for these snippets, its what I usually do and tried again now, but no chance. still only a decorator. other Snippets work fine. Tried Edge and Firefox for download using LV2020.

0 项奖励
5 条消息(共 7 条)
1,515 次查看

They worked fine for me in Firefox with LV2020. Here they are as VIs.

下载全部
0 项奖励
6 条消息(共 7 条)
1,504 次查看

Thank you cordm, I finally managed to get the snippets working, in the two browsers I have available here, it is not the right way to klick the image, as this only opens an enlarged preview. I have to klick on an small icon (Scare with top left pointing arrow) appearing in the top left corner instead. This is bad UX imo but good to know the  problem is fond in front of the screen once more.

0 项奖励
7 条消息(共 7 条)
1,444 次查看