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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zehnm committed Aug 30, 2020
2 parents ef1c410 + a9490ad commit 1daa474
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dependencies.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions openhab.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -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\" }
]
}
9 changes: 6 additions & 3 deletions openhab.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 1daa474

Please sign in to comment.