-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from fluffypony/master
versioning now includes the commit hash, or -final for tagged releases
- Loading branch information
Showing
7 changed files
with
38 additions
and
42 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
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 |
---|---|---|
@@ -1,11 +1,25 @@ | ||
execute_process(COMMAND "${GIT}" describe --dirty --match "v${VERSION}" RESULT_VARIABLE RET OUTPUT_VARIABLE DESCRIPTION OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
execute_process(COMMAND "${GIT}" rev-parse --short HEAD RESULT_VARIABLE RET OUTPUT_VARIABLE COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
|
||
if(RET) | ||
message(WARNING "Cannot determine current revision. Make sure that you are building either from a Git working tree or from a source archive.") | ||
set(VERSION "${COMMIT}") | ||
message(WARNING "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive.") | ||
set(VERSIONTAG "unknown") | ||
configure_file("src/version.h.in" "${TO}") | ||
else() | ||
string(REGEX MATCH "([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])?(-dirty)? $" COMMIT "${DESCRIPTION} ") | ||
string(STRIP "${COMMIT}" COMMIT) | ||
set(VERSION "${COMMIT}") | ||
message(STATUS "You are currently on commit ${COMMIT}") | ||
execute_process(COMMAND "${GIT}" show-ref --tags -d --abbrev COMMAND awk "END{print $1}" RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
if(RET) | ||
message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.") | ||
set(VERSIONTAG "${COMMIT}") | ||
else() | ||
message(STATUS "The most recent tag was at ${TAGGEDCOMMIT}") | ||
if(COMMIT MATCHES TAGGEDCOMMIT) | ||
message(STATUS "You are building a tagged release") | ||
set(VERSIONTAG "release") | ||
else() | ||
message(STATUS "You are ahead or behind of a tagged release") | ||
set(VERSIONTAG "${COMMIT}") | ||
endif() | ||
endif() | ||
|
||
configure_file("src/version.h.in" "${TO}") | ||
endif() |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#define BUILD_COMMIT_ID "@VERSION@" | ||
#define PROJECT_VERSION "0.8.8" | ||
#define PROJECT_VERSION_BUILD_NO "4" | ||
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO "(" BUILD_COMMIT_ID ")" | ||
#define MONERO_VERSION_TAG "@VERSIONTAG@" | ||
#define MONERO_VERSION "0.8.8.4" | ||
#define MONERO_VERSION_FULL MONERO_VERSION "-" MONERO_VERSION_TAG |