dev: add version_ci helper function for CI
This commit is contained in:
parent
f676cc1f19
commit
f631154835
1 changed files with 7 additions and 0 deletions
|
@ -27,3 +27,10 @@ version() {
|
|||
COMMIT_HASH_INITIAL=$(printf '%s' "$(git rev-parse FETCH_HEAD)" | cut -c 1)
|
||||
printf '%s+neko:%s.%s' "${UPSTREAM_VERSION}" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}"
|
||||
}
|
||||
|
||||
version_ci() {
|
||||
UPSTREAM_VERSION=$(grep '"version":' package.json | cut -d '"' -f 4)
|
||||
COMMIT_DATE=$(git show --no-patch --pretty='%cs' HEAD | sed -e 's/-//g' | cut -c 3-)
|
||||
COMMIT_HASH_INITIAL=$(printf '%s' "$(git rev-parse HEAD)" | cut -c 1)
|
||||
printf '%s+neko:%s.%s' "${UPSTREAM_VERSION}" "${COMMIT_DATE}" "${COMMIT_HASH_INITIAL}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue