include commit id in release commit and tag message
This commit is contained in:
parent
ed2962c94f
commit
ddeea2b933
|
@ -4,6 +4,9 @@ set -e
|
||||||
# go to root of repository
|
# go to root of repository
|
||||||
cd $(git rev-parse --show-toplevel)
|
cd $(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
# get commit id
|
||||||
|
COMMIT_ID="$(git rev-parse HEAD)"
|
||||||
|
|
||||||
# extract package name and version from package.json, remove devDependencies and scripts.prepare
|
# extract package name and version from package.json, remove devDependencies and scripts.prepare
|
||||||
ORIG_PKG="$(cat package.json)"
|
ORIG_PKG="$(cat package.json)"
|
||||||
read NAME VERSION < <(node -e '
|
read NAME VERSION < <(node -e '
|
||||||
|
@ -29,8 +32,8 @@ git add -f $(tar tf ${NAME}-${VERSION}.tgz | cut -c 9-)
|
||||||
rm ${NAME}-${VERSION}.tgz
|
rm ${NAME}-${VERSION}.tgz
|
||||||
|
|
||||||
# commit and tag
|
# commit and tag
|
||||||
git commit -m "Release v${VERSION}"
|
git commit -m "v${VERSION} @ ${COMMIT_ID}"
|
||||||
git tag v${VERSION} -a -m "v${VERSION}"
|
git tag v${VERSION} -a -m "v${VERSION} @ ${COMMIT_ID}"
|
||||||
|
|
||||||
# return to original state
|
# return to original state
|
||||||
git reset ${ORIG_BRANCH}
|
git reset ${ORIG_BRANCH}
|
||||||
|
|
Loading…
Reference in New Issue