From ed697c0ad21f0bb0da71699946833aa54b2bd31d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 6 Jun 2024 22:46:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20[CI/CD]=20Fixed=20build-ui.sh=20?= =?UTF-8?q?script.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After doing "cd $SRCDIR", it should reference the `dist` directory in the webapp by full relative path. --- .drone/build-ui.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.drone/build-ui.sh b/.drone/build-ui.sh index 18317364f6..2a4161d2e1 100755 --- a/.drone/build-ui.sh +++ b/.drone/build-ui.sh @@ -1,12 +1,13 @@ #!/bin/sh export SRCDIR="$PWD" +export WEBAPP_DIR="$SRCDIR/platypush/backend/http/webapp" export SKIPCI="$PWD/.skipci" rm -rf "$SKIPCI" . .drone/macros/configure-git.sh -cd platypush/backend/http/webapp +cd "$WEBAPP_DIR" if [ $(git log --pretty=oneline $DRONE_COMMIT_AFTER...$DRONE_COMMIT_BEFORE . | wc -l) -eq 0 ]; then echo "No UI changes detected, skipping build" exit 0 @@ -35,8 +36,8 @@ cd "$SRCDIR" . .drone/macros/configure-ssh.sh . .drone/macros/configure-gpg.sh -git add dist -git commit dist -S -m "[Automatic] Updated UI files" --no-verify +git add "${WEBAPP_DIR}/dist" +git commit "${WEBAPP_DIR}/dist" -S -m "[Automatic] Updated UI files" --no-verify git remote rm origin git remote add origin git@git.platypush.tech:platypush/platypush.git git push -f origin master