mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Changed automatic version numbering with "git describe" to split the third part into mini version (leading numbers) and extra version (string after the numbers)
This commit is contained in:
parent
951be8f9a1
commit
441ba17b53
@ -456,13 +456,26 @@ defined in command line")
|
||||
RS_MINOR_VERSION = $$member(RS_GIT_DESCRIBE_SPLIT, 1)
|
||||
|
||||
RS_GIT_DESCRIBE_SPLIT = $$member(RS_GIT_DESCRIBE_SPLIT, 2)
|
||||
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE_SPLIT, -)
|
||||
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE_SPLIT, )
|
||||
|
||||
RS_MINI_VERSION = $$member(RS_GIT_DESCRIBE_SPLIT, 0)
|
||||
|
||||
RS_GIT_DESCRIBE_SPLIT = $$member(RS_GIT_DESCRIBE_SPLIT, 1, -1)
|
||||
|
||||
RS_EXTRA_VERSION = $$join(RS_GIT_DESCRIBE_SPLIT,-,-)
|
||||
# Split string into mini version (leading numbers) and extra version (string after the numbers)
|
||||
RS_MINI_VERSION =
|
||||
RS_EXTRA_VERSION =
|
||||
for(CHAR, RS_GIT_DESCRIBE_SPLIT) {
|
||||
isEqual(CHAR, 0) | greaterThan(CHAR, 0):lessThan(CHAR, 9) | isEqual(CHAR, 9) {
|
||||
# Number
|
||||
isEmpty(RS_EXTRA_VERSION) {
|
||||
# Add leading numbers to mini version
|
||||
RS_MINI_VERSION = $${RS_MINI_VERSION}$${CHAR}
|
||||
} else {
|
||||
# Add to extra version
|
||||
RS_EXTRA_VERSION = $${RS_EXTRA_VERSION}$${CHAR}
|
||||
}
|
||||
} else {
|
||||
# Add to extra version
|
||||
RS_EXTRA_VERSION = $${RS_EXTRA_VERSION}$${CHAR}
|
||||
}
|
||||
}
|
||||
|
||||
message("RetroShare version\
|
||||
$${RS_MAJOR_VERSION}.$${RS_MINOR_VERSION}.$${RS_MINI_VERSION}$${RS_EXTRA_VERSION}\
|
||||
|
Loading…
Reference in New Issue
Block a user