From 5473bc228bfb33054a722fa59f772ef5f1a312c8 Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 21 Nov 2023 21:33:56 +0900 Subject: [PATCH] dev: minor refactor of update scripts --- neko/update/utils | 4 ++-- update.sh | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/neko/update/utils b/neko/update/utils index 35a45d82b..ad36922ef 100644 --- a/neko/update/utils +++ b/neko/update/utils @@ -22,7 +22,7 @@ br() { } version() { - COMMIT_DATE=$(git show --no-patch --pretty="%cs" FETCH_HEAD | sed -e "s/-//g" | cut -c 3-) - COMMIT_HASH_INITIAL=$(printf "%s" "$(git rev-parse FETCH_HEAD)" | cut -c 1) + COMMIT_DATE=$(git show --no-patch --pretty='%cs' FETCH_HEAD | sed -e 's/-//g' | cut -c 3-) + COMMIT_HASH_INITIAL=$(printf '%s' "$(git rev-parse FETCH_HEAD)" | cut -c 1) printf '%s.%s' "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}" } diff --git a/update.sh b/update.sh index 1018d7208..a9395a9ae 100755 --- a/update.sh +++ b/update.sh @@ -11,12 +11,11 @@ br OLD_COMMIT=$(git rev-parse HEAD) say 'Pulling changes from the remote repo...' - run 'git checkout -- package.json packages/backend/assets' - run 'git pull --ff --no-edit --autostash --strategy-option theirs' NEW_COMMIT=$(git rev-parse HEAD) + say 'Pulled successfully!' br