Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
8810b60e5This file is pinned to the selected release. Download the original to open it in your design tool.
#!/bin/sh
##
## This code should be copied into .git/hooks/post-checkout
## It will run automatically after every new commit, and will copy the newest GIT hash
## into a file to be included by the c code.
version_str=`git rev-parse --short HEAD`
top_level_dir=$(git rev-parse --show-toplevel)
filename=Code_for_microcontroller/YbTempCtrl/latest_hash.h
echo Writing latest version value = $version_str
echo to "$top_level_dir/$filename"
echo \#define LATEST_HASH \""$version_str"\" > "$top_level_dir/$filename"
echo Marking file as unchanged so git ignores it
git update-index --assume-unchanged "$top_level_dir/$filename"
exit 0