瀏覽代碼

Hide commit signature information when fetching commit hash

If someone configures git to always show a commit’s signing information,
this breaks the definition of GitVersion in revision.h:

```
#ifndef ASSIMP_REVISION_H_INC
#define ASSIMP_REVISION_H_INC

#define GitVersion 0xgpg: Signature faite le Fri 15 Jun 2018 20:39:53 CEST
gpg:                avec la clef RSA 4AEE18F83AFDEB23
gpg: Impossible de vérifier la signature : Pas de clef publique
878b4b2c
#define GitBranch "master"

#endif // ASSIMP_REVISION_H_INC
```

This can be avoided by passing the `--no-show-signature` to the `git
log` command for retrieving the hash.
Pierre Moreau 7 年之前
父節點
當前提交
8334bb579c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -152,7 +152,7 @@ EXECUTE_PROCESS(
 
 # Get the latest abbreviated commit hash of the working branch
 EXECUTE_PROCESS(
-  COMMAND git log -1 --format=%h
+  COMMAND git log -1 --format=%h --no-show-signature
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE GIT_COMMIT_HASH
   OUTPUT_STRIP_TRAILING_WHITESPACE