From 27aaab3d34f5c0fe49bf2b101a99c07576f6cba3 Mon Sep 17 00:00:00 2001 From: naskya Date: Wed, 15 Nov 2023 13:50:54 +0900 Subject: [PATCH] dev: add a delimiter in the version number --- neko/update/native.sh | 4 ++-- neko/update/utils | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/neko/update/native.sh b/neko/update/native.sh index 6fa1a74c2..0445c0ffd 100755 --- a/neko/update/native.sh +++ b/neko/update/native.sh @@ -24,8 +24,8 @@ fi # write version info say "Writing version info to package.json..." -running "sed -e \"s/\\\"version\\\": \\\"\\([^+][^+]*\\).*\\\",$/\\\"version\\\": \\\"\\\\1+neko:$(version)\\\",/\" package.json > package.json.new && mv -- package.json.new package.json" -sed -e "s/\"version\": \"\([^+][^+]*\).*\",$/\"version\": \"\\1+neko:$(version)\",/" package.json > package.json.new && mv -- package.json.new package.json +running "sed \"s/\\\"version\\\": \\\"\\([^+][^+]*\\).*\\\",$/\\\"version\\\": \\\"\\\\1+neko:$(version)\\\",/\" package.json > package.json.new && mv -- package.json.new package.json" +sed "s/\"version\": \"\([^+][^+]*\).*\",$/\"version\": \"\\1+neko:$(version)\",/" package.json > package.json.new && mv -- package.json.new package.json say "Done!" br diff --git a/neko/update/utils b/neko/update/utils index 156fc7e72..ca10d4cac 100644 --- a/neko/update/utils +++ b/neko/update/utils @@ -23,5 +23,5 @@ 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) - printf "%s%s" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}" + printf "%s.%s" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}" }