diff options
author | George Hazan <ghazan@miranda.im> | 2022-11-30 17:48:47 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-11-30 17:48:47 +0300 |
commit | 0ece30dc7c0e34b4c5911969b8fa99c33c6d023c (patch) | |
tree | 671325d3fec09b999411e4e3ab84ef8259261818 /protocols/Telegram/tdlib/td/gen_git_commit_h.ps1 | |
parent | 46c53ffc6809c67e4607e99951a2846c382b63b2 (diff) |
Telegram: update for TDLIB
Diffstat (limited to 'protocols/Telegram/tdlib/td/gen_git_commit_h.ps1')
-rw-r--r-- | protocols/Telegram/tdlib/td/gen_git_commit_h.ps1 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Telegram/tdlib/td/gen_git_commit_h.ps1 b/protocols/Telegram/tdlib/td/gen_git_commit_h.ps1 index 2893f89c2a..dadc225cdc 100644 --- a/protocols/Telegram/tdlib/td/gen_git_commit_h.ps1 +++ b/protocols/Telegram/tdlib/td/gen_git_commit_h.ps1 @@ -1,6 +1,6 @@ -$commit = git rev-parse HEAD -git diff-index --quiet HEAD -$dirty = $LASTEXITCODE +$commit = try { git rev-parse HEAD } catch { "unknown" } +try { git diff-index --quiet HEAD } catch {} +$dirty = if ($LASTEXITCODE) { "true" } else { "false" } echo "#pragma once`r`n#define GIT_COMMIT `"$commit`"`r`n#define GIT_DIRTY $dirty" | out-file -encoding ASCII auto/git_info.h.new if (-not (Test-Path .\auto\git_info.h) -or (Compare-Object $(Get-Content .\auto\git_info.h.new) $(Get-Content .\auto\git_info.h))) { mv -Force auto/git_info.h.new auto/git_info.h |