1
0
Fork 1
mirror of https://example.com synced 2024-11-22 23:26:39 +09:00

dev: minor refactor of update scripts

This commit is contained in:
naskya 2023-11-21 21:33:56 +09:00
parent a7d4afa729
commit 5473bc228b
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 3 additions and 4 deletions

View file

@ -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}"
}

View file

@ -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