From 67dcec4ae05f5cf4b3ef32e0b28d5e0af8f169b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 8 Aug 2019 05:46:45 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6efb848..0700568 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,13 +53,10 @@ deploy:datapacks: - chmod 644 ~/.ssh/known_hosts - cd datapacks - - rsync -avz out/ "$SERVER_HOST":"$WPD_FOLDER" --delete --exclude bukkit + - rsync -avz out/ "$SERVER_HOST":"$WPD_FOLDER/world/datapacks" --delete --exclude bukkit - ssh "$SERVER_HOST" mcrcon -H localhost -p minecraft "minecraft:reload" - - cd ../resourcepack-out - - sha1sum resourcepack.zip - only: refs: - master @@ -81,9 +78,9 @@ deploy:resourcepack: - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts - - cd ../resourcepack-out - - shasum= $(sha1sum resourcepack.zip | awk '{ print $1 }' - - ssh "$SERVER_HOST" mcrcon -H localhost -p minecraft "minecraft:say Server restart in 2 minutes" + - cd resourcepack-out + - SHASUM= $(sha1sum resourcepack.zip | awk '{ print $1 }' + - ssh "$SERVER_HOST" (cd "WPD_FOLDER" && sed-i server.properties "s/resource-pack-sha1=.*/resource-pack-sha1=$SHASUM") only: refs: