Skip to content

Commit a27c33a

Browse files
committed
Added git hash to the rig structure in hw.devices
1 parent 747629c commit a27c33a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

+hw/devices.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
end
3535
rig.useDaq = pick(rig, 'useDaq', 'def', true);
3636

37+
%% If Git is installed, determine hash of latest commit to code
38+
[status, hash] = system(sprintf('git -C "%s" rev-parse HEAD',...
39+
fileparts(which('addRigboxPaths'))));
40+
if status == 0
41+
rig.GitHash = hash;
42+
end
43+
3744
%% Configure common devices, if present
3845
configure('mouseInput');
3946
configure('lickDetector');

0 commit comments

Comments
 (0)