Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generate Version.json
$o = @{}
$o.DeployUtc = Get-Date -format u;
$o.ShortHash = git log -1 --pretty=format:%h;
$o.FullHash = git log -1 --pretty=format:%H;
$o.Subject = git log -1 --pretty=format:%s;
$o.Name = git log -1 --pretty=format:%cn;
$o.Email = git log -1 --pretty=format:%ce;
$o | ConvertTo-Json | Out-File "version.json" -Encoding ascii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.