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

Commit d3f9203

Browse files
committed
build: Added integrations.library branch support
1 parent 2d25578 commit d3f9203

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

openhab.pro

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ isEmpty(INTG_LIB_PATH) {
4343
unix {
4444
INTG_LIB_VERSION = $$system(cat $$PWD/dependencies.cfg | awk '/^integrations.library:/$$system_quote("{print $2}")')
4545
INTG_GIT_VERSION = "$$system(cd $$INTG_LIB_PATH && git describe --match "v[0-9]*" --tags HEAD --always)"
46-
message("Required integrations.library version: $$INTG_LIB_VERSION Local version: $$INTG_GIT_VERSION")
46+
INTG_GIT_BRANCH = "$$system(cd $$INTG_LIB_PATH && git rev-parse --abbrev-ref HEAD)"
47+
message("Required integrations.library version: $$INTG_LIB_VERSION Local version: $$INTG_GIT_VERSION ($$INTG_GIT_BRANCH)")
4748
# this is a simple check but qmake only provides limited tests and 'versionAtLeast' doesn't work with 'v' prefix.
48-
!contains(INTG_GIT_VERSION, $$re_escape($${INTG_LIB_VERSION}).*) {
49-
error("Invalid integrations.library version: \"$$INTG_GIT_VERSION\". Please check out required version \"$$INTG_LIB_VERSION\"")
49+
!contains(INTG_GIT_VERSION, $$re_escape($${INTG_LIB_VERSION}).*)) {
50+
!equals(INTG_GIT_BRANCH, $$INTG_LIB_VERSION) {
51+
error("Invalid integrations.library version: \"$$INTG_GIT_VERSION\". Please check out required version \"$$INTG_LIB_VERSION\"")
52+
}
5053
}
5154
}
5255

0 commit comments

Comments
 (0)