Skip to content

Instantly share code, notes, and snippets.

@ubaldop
Created January 14, 2017 19:28
Show Gist options
  • Save ubaldop/a75601ba8e40a6581139a5e97b09c3c2 to your computer and use it in GitHub Desktop.
Save ubaldop/a75601ba8e40a6581139a5e97b09c3c2 to your computer and use it in GitHub Desktop.
Script to build and run Freedomotic with a specific plugin
#!/bin/bash
if [[ $# -le 1 ]] ; then
echo 'No plugins parameters provided. Please run the script with a plugin type and name. (e.g.: devices persistence)'
exit 0
fi
freedomoticHome=$(pwd)
echo "Building freedomotic..."
mvn clean install
echo "Building plugin"$1"/"$2" and skipping integration tests, if any."
cd $freedomoticHome/plugins/$1/$2
mvn clean install -DskipITs
echo "Plugin built!"
cd $freedomoticHome
echo
echo "Moving built plugin from IDE to freedomotic environment..."
rm -R $freedomoticHome/framework/freedomotic-core/plugins/$1/$2
mv $freedomoticHome/plugins/$1/$2/target/$2 $freedomoticHome/framework/freedomotic-core/plugins/$1
echo "Built plugin moved properly"
echo "Launch Freedomotic!"
java -jar $freedomoticHome/framework/freedomotic-core/target/freedomotic-core/freedomotic.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment