mirror of
https://example.com
synced 2024-11-22 15:26:38 +09:00
dev: add a delimiter in the version number
This commit is contained in:
parent
ec76d58474
commit
27aaab3d34
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue