Skip to content

Commit

Permalink
Merge pull request #1 from mgeramb/SmartHome
Browse files Browse the repository at this point in the history
Smart home
  • Loading branch information
lkn94 authored Jul 17, 2019
2 parents 43e8144 + 0b9b438 commit 3dd6b57
Show file tree
Hide file tree
Showing 328 changed files with 5,603 additions and 1,421 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.DS_Store
*.iml
npm-debug.log
.build.log

.metadata/
bin/
Expand All @@ -16,3 +17,6 @@ xtend-gen/
bundles/**/src/main/history
features/**/src/main/history
features/**/src/main/feature

.vscode
.factorypath
46 changes: 11 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,18 @@ jdk:
cache:
directories:
- $HOME/.m2
- $HOME/.p2
- $HOME/.bnd/cache/

before_cache:
# remove resolver-status.properties, they change with each run and invalidate the cache
- find $HOME/.m2 -name resolver-status.properties -exec rm {} \;

before_install:
- echo "MAVEN_OPTS='-Xms1g -Xmx2g -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'" > ~/.mavenrc
install:
- |
function prevent_timeout() {
local i=0
while [ -e /proc/$1 ]; do
# print zero width char every 3 minutes while building
if [ "$i" -eq "180" ]; then printf %b '\u200b'; i=0; else i=$((i+1)); fi
sleep 1
done
}
function print_reactor_summary() {
sed -ne '/\[INFO\] Reactor Summary:/,$ p' "$1" | sed 's/\[INFO\] //'
}
function mvnp() {
set -o pipefail # exit build with error when pipes fail
local command=(mvn $@)
exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout
tee .build.log | # write output to log
stdbuf -oL grep -E '^\[INFO\] Building .+ \[.+\]$' | # filter progress
sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress
sed -e :a -e 's/^.\{1,6\}|/ &/;ta' & # right align progress with padding
local pid=$!
prevent_timeout $pid &
wait $pid
}
after_success:
- print_reactor_summary .build.log
after_failure:
- tail -n 2000 .build.log
script:
- mvnp clean install -B -DskipChecks=true -DskipTests=true

notifications:
webhooks: https://www.travisbuddy.com/

travisBuddy:
insertMode: update
successBuildLog: true

install: true
script: ./buildci.sh "$TRAVIS_COMMIT_RANGE"
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
/bundles/org.openhab.binding.plugwise/ @wborn
/bundles/org.openhab.binding.powermax/ @lolodomo
/bundles/org.openhab.binding.pulseaudio/ @peuter
/bundles/org.openhab.binding.pushbullet/ @hakan42
/bundles/org.openhab.binding.regoheatpump/ @crnjan
/bundles/org.openhab.binding.rfxcom/ @martinvw @paulianttila
/bundles/org.openhab.binding.rme/ @kgoderis
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,11 @@
<artifactId>org.openhab.binding.pulseaudio</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.pushbullet</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.regoheatpump</artifactId>
Expand Down
69 changes: 69 additions & 0 deletions buildci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash

function prevent_timeout() {
local i=0
while [ -e /proc/$1 ]; do
# print zero width char every 3 minutes while building
if [ "$i" -eq "180" ]; then printf %b '\u200b'; i=0; else i=$((i+1)); fi
sleep 1
done
}

function print_reactor_summary() {
sed -ne '/\[INFO\] Reactor Summary:/,$ p' "$1" | sed 's/\[INFO\] //'
}

function mvnp() {
set -o pipefail # exit build with error when pipes fail
local command=(mvn $@)
exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout
stdbuf -o0 grep -vE "Download(ed|ing) from [a-z.]+: https:" | # filter out downloads
tee .build.log | # write output to log
stdbuf -oL grep -E '^\[INFO\] Building .+ \[.+\]$' | # filter progress
stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress
stdbuf -o0 sed -e :a -e 's/^.\{1,6\}|/ &/;ta' & # right align progress with padding
local pid=$!
prevent_timeout $pid &
wait $pid
}

COMMITS=${1:-"master...HEAD"}

# Determine if this is a new addon -> Perform tests + integration tests and all SAT checks with increased warning level
CHANGED_DIR=`git diff --dirstat=files,0 $COMMITS bundles/ | sed 's/^[ 0-9.]\+% bundles\///g' | grep -o -P "^([^/]*)" | uniq`
CDIR=`pwd`

if [ ! -z "$CHANGED_DIR" ] && [ -e "bundles/$CHANGED_DIR" ]; then
echo "Single addon pull request: Building $CHANGED_DIR"
echo "MAVEN_OPTS='-Xms1g -Xmx2g -Dorg.slf4j.simpleLogger.log.org.openhab.tools.analysis.report.ReportUtility=DEBUG -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN'" > ~/.mavenrc
cd "bundles/$CHANGED_DIR"
mvn clean install -B 2>&1 |
stdbuf -o0 grep -vE "Download(ed|ing) from [a-z.]+: https:" | # Filter out Download(s)
stdbuf -o0 grep -v "target/code-analysis" | # filter out some debug code from reporting utility
tee $CDIR/.build.log
if [ $? -ne 0 ]; then
exit 1
fi

if [ -e "../itests/$CHANGED_DIR" ]; then
echo "Single addon pull request: Building itest $CHANGED_DIR"
cd "../itests/$CHANGED_DIR"
mvn clean install -B 2>&1 |
stdbuf -o0 grep -vE "Download(ed|ing) from [a-z.]+: https:" | # Filter out Download(s)
stdbuf -o0 grep -v "target/code-analysis" | # filter out some debug code from reporting utility
tee -a $CDIR/.build.log
if [ $? -ne 0 ]; then
exit 1
fi
fi
else
echo "Build all"
echo "MAVEN_OPTS='-Xms1g -Xmx2g -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'" > ~/.mavenrc
mvnp clean install -B -DskipChecks=true -DskipTests=true
if [ $? -eq 0 ]; then
print_reactor_summary .build.log
else
tail -n 1000 .build.log
exit 1
fi
fi
Binary file not shown.
Binary file not shown.
11 changes: 8 additions & 3 deletions bundles/org.openhab.binding.allplay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@

<name>openHAB Add-ons :: Bundles :: AllPlay Binding</name>

<properties>
<bnd.importpackage>org.slf4j.impl.*;resolution:=optional,de.kaizencode.tchaikovsky.*</bnd.importpackage>
</properties>
<dependencies>
<dependency>
<groupId>org.openhab.osgiify</groupId>
<artifactId>de.kaizencode.tchaikovsky</artifactId>
<version>0.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<feature name="openhab-binding-allplay" description="AllPlay Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle dependency="true">mvn:org.openhab.osgiify/de.kaizencode.tchaikovsky/0.0.1</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.allplay/${project.version}</bundle>
</feature>
</features>
8 changes: 4 additions & 4 deletions bundles/org.openhab.binding.amazondashbutton/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.pcap4j</groupId>
<artifactId>pcap4j-core</artifactId>
<groupId>org.openhab.osgiify</groupId>
<artifactId>org.pcap4j.pcap4j-core</artifactId>
<version>1.6.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.pcap4j</groupId>
<artifactId>pcap4j-packetfactory-static</artifactId>
<groupId>org.openhab.osgiify</groupId>
<artifactId>org.pcap4j.pcap4j-packetfactory-static</artifactId>
<version>1.6.6</version>
<scope>provided</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

<feature name="openhab-binding-amazondashbutton" description="Amazon Dash Button Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<feature prerequisite="true">wrap</feature>
<bundle dependency="true">mvn:net.java.dev.jna/jna/4.2.1</bundle>
<bundle dependency="true">wrap:mvn:org.pcap4j/pcap4j-core/1.6.6$Bundle-Name=Pcap4J%20Core&amp;Bundle-SymbolicName=org.pcap4j.pcap4j-core&amp;Bundle-Version=1.6.6</bundle>
<bundle dependency="true">wrap:mvn:org.pcap4j/pcap4j-packetfactory-static/1.6.6$Bundle-Name=Pcap4J%20Static%20Packet%20Factory&amp;Bundle-SymbolicName=org.pcap4j.pcap4j-packetfactory-static&amp;Bundle-Version=1.6.6</bundle>
<bundle dependency="true">mvn:org.openhab.osgiify/org.pcap4j.pcap4j-core/1.6.6</bundle>
<bundle>mvn:org.openhab.osgiify/org.pcap4j.pcap4j-packetfactory-static/1.6.6</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.amazondashbutton/${project.version}</bundle>
</feature>
</features>
12 changes: 8 additions & 4 deletions bundles/org.openhab.binding.amazonechocontrol/.classpath
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Expand All @@ -19,6 +18,11 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
Expand Down
18 changes: 1 addition & 17 deletions bundles/org.openhab.binding.amazonechocontrol/.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
Loading

0 comments on commit 3dd6b57

Please sign in to comment.