Skip to content

Commit 1cfd0c7

Browse files
committed
feat: add commit infos to PHAR update/release script
1 parent 3fc6ec8 commit 1cfd0c7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/update-release.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@
77
set +e
88

99
VERSION="$(cat ./build/VERSION)"
10+
PHAR_COMMIT="$(git rev-parse --verify HEAD)"
1011

1112
git checkout gh-pages
1213

1314
rm -rf releases/latest
1415
mv build ./releases/latest
1516
git add -A ./releases/latest/*
16-
git commit -S -m "Update latest release" -m "version: ${VERSION}" -m "#latest"
17+
git commit -S -m "Update latest release" -m "version: ${VERSION}" -m "#latest" -m "Commit: ${PHAR_COMMIT}"
1718

1819
if [ ! -d ./releases/${VERSION}/ ]; then
1920
mkdir ./releases/${VERSION}/
2021
cp -rp ./releases/latest/* ./releases/${VERSION}/
2122
git add -A ./releases/${VERSION}/
22-
git commit -S -m "Release ${VERSION}" -m "version: ${VERSION}"
23+
git commit -S -m "Release ${VERSION}" -m "version: ${VERSION}" -m "Commit: ${PHAR_COMMIT}"
2324
else
2425
rm -rf ./releases/${VERSION}/*
2526
cp -rp ./releases/latest/* ./releases/${VERSION}/
2627
git add -A ./releases/${VERSION}/
27-
git commit -S -m "Update version ${VERSION}" -m "version: ${VERSION}"
28+
git commit -S -m "Update version ${VERSION}" -m "version: ${VERSION}" -m "Commit: ${PHAR_COMMIT}"
2829
fi
2930

3031
rm -rf build/*

0 commit comments

Comments
 (0)