From 0d36a0b88d943d7516159a0714000fad0ec6b61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bro=C4=8Dko?= Date: Mon, 3 Sep 2018 02:25:10 +0200 Subject: [PATCH] automatic deployment --- deploy.sh | 12 ++++++++++++ pom.xml | 26 ++++++++++++++++++++++++++ plugin.yml => resources/plugin.yml | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100755 deploy.sh rename plugin.yml => resources/plugin.yml (78%) diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..a5b7e66 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +LXC_CONT="marw" +MC_USER="mc" +MC_PATH="/home/mc/factions" + + +lxc file push "$1" "$LXC_CONT$MC_PATH/plugins/$2.jar" +lxc exec $LXC_CONT chown $MC_USER:$MC_USER "$MC_PATH/plugins/$2.jar" +lxc exec $LXC_CONT -- sudo -u $MC_USER "$MC_PATH/cmd.sh" "plugman reload $2" + +exit 0 \ No newline at end of file diff --git a/pom.xml b/pom.xml index fc4212a..438fd08 100644 --- a/pom.xml +++ b/pom.xml @@ -16,6 +16,11 @@ src + + + resources + + maven-compiler-plugin @@ -24,6 +29,26 @@ 10 + + exec-maven-plugin + org.codehaus.mojo + + + Version Calculation + deploy + + exec + + + + + ${basedir}/deploy.sh + + ${project.build.directory}/${project.build.finalName}.jar + ${artifactId} + + + @@ -36,6 +61,7 @@ + spigot-repo diff --git a/plugin.yml b/resources/plugin.yml similarity index 78% rename from plugin.yml rename to resources/plugin.yml index f4b925d..72405d1 100644 --- a/plugin.yml +++ b/resources/plugin.yml @@ -1,6 +1,6 @@ name: MarwCore main: cz.marwland.mc.core.MarwCore -version: 1.0 +version: 0.0.1 api-version: 1.12 commands: first: