Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
build: Added integrations.library branch support
Browse files Browse the repository at this point in the history
  • Loading branch information
zehnm committed Jun 7, 2020
1 parent cc3fdd1 commit 40dfaa8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dock.pro
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ isEmpty(INTG_LIB_PATH) {
unix {
INTG_LIB_VERSION = $$system(cat $$PWD/dependencies.cfg | awk '/^integrations.library:/$$system_quote("{print $2}")')
INTG_GIT_VERSION = "$$system(cd $$INTG_LIB_PATH && git describe --match "v[0-9]*" --tags HEAD --always)"
message("Required integrations.library version: $$INTG_LIB_VERSION Local version: $$INTG_GIT_VERSION")
INTG_GIT_BRANCH = "$$system(cd $$INTG_LIB_PATH && git rev-parse --abbrev-ref HEAD)"
message("Required integrations.library version: $$INTG_LIB_VERSION Local version: $$INTG_GIT_VERSION ($$INTG_GIT_BRANCH)")
# this is a simple check but qmake only provides limited tests and 'versionAtLeast' doesn't work with 'v' prefix.
!contains(INTG_GIT_VERSION, $$re_escape($${INTG_LIB_VERSION}).*) {
error("Invalid integrations.library version: \"$$INTG_GIT_VERSION\". Please check out required version \"$$INTG_LIB_VERSION\"")
!contains(INTG_GIT_VERSION, $$re_escape($${INTG_LIB_VERSION}).*)) {
!equals(INTG_GIT_BRANCH, $$INTG_LIB_VERSION) {
error("Invalid integrations.library version: \"$$INTG_GIT_VERSION\". Please check out required version \"$$INTG_LIB_VERSION\"")
}
}
}

Expand Down

0 comments on commit 40dfaa8

Please sign in to comment.