Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#feature Autogenerating version number
- Loading branch information
Showing
3 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import subprocess | ||
|
||
major_version = "2.2.1" | ||
print("-DPP_VERSION=\\\"" + major_version + "_" + subprocess.check_output(["git", "rev-parse", "HEAD"])[0:6] + "\\\"") | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
loredan
Author
Contributor
|
I just tried to build this develop branch in VSCode/Platform and git an error about the print line being bytes and not a string. (Sorry have now lost the exact error). Anyway, casting the check_output to a string allowed me to compile and the version shows when I issue a CONFIG command... , e.g.:
And output: