Skip to content

Instantly share code, notes, and snippets.

@michaelvolz
Created November 11, 2023 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelvolz/88aa1820aea826eef7e91ac472e7cbbe to your computer and use it in GitHub Desktop.
Save michaelvolz/88aa1820aea826eef7e91ac472e7cbbe to your computer and use it in GitHub Desktop.
Git version number pre-commit hook
#!/bin/sh
echo "pre-commit started"
version=$(cat redmuffin.Blazor.Static/wwwroot/Version.txt); y=$((version=version+1)); echo $y > redmuffin.Blazor.Static/wwwroot/Version.txt
git add redmuffin.Blazor.Static/wwwroot/Version.txt
cat redmuffin.Blazor.Static/wwwroot/Version.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment