Skip to content

Instantly share code, notes, and snippets.

@roh85
Created December 2, 2016 08:06
Show Gist options
  • Save roh85/e067cc2deab99547fc4c083dd0dfbe40 to your computer and use it in GitHub Desktop.
Save roh85/e067cc2deab99547fc4c083dd0dfbe40 to your computer and use it in GitHub Desktop.
Update AssemblyInfo with git commit hash
$hash = git describe --long --always;gci **/AssemblyInfo.* -recurse | foreach { $content = (gc $_) -replace "\[assembly: Guid?.*", "$&`n[assembly: AssemblyMetadata(`"commithash`", `"$hash`")]" | sc $_ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment