diff --git a/dependencies.cfg b/dependencies.cfg index 3dcb7ea..556b82a 100644 --- a/dependencies.cfg +++ b/dependencies.cfg @@ -3,4 +3,4 @@ # name: dependency name # separator: colon + optional white space # version: git branch or tag -integrations.library: v0.4.3 +integrations.library: v0.5.1 diff --git a/openhab.json.in b/openhab.json.in index c88057a..5939a39 100644 --- a/openhab.json.in +++ b/openhab.json.in @@ -30,7 +30,7 @@ ], \"url\": \"https://github.com/YIO-Remote/integration.openhab\", \"dependencies\" : [ - { \"name\" : \"app\", \"version\" : \"0.2.0\" }, - { \"name\" : \"remoteOS\", \"version\" : \"0.2.0\" } + { \"name\" : \"app\", \"version\" : \"0.5.0\" }, + { \"name\" : \"remoteOS\", \"version\" : \"0.4.0\" } ] } diff --git a/openhab.pro b/openhab.pro index 8d058e9..eaa26ec 100755 --- a/openhab.pro +++ b/openhab.pro @@ -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\"") + } } }