Files
Maagap/ioneapps-maagapp-ee31119a522d/update-revision.sh
2025-08-06 13:49:11 +08:00

8 lines
365 B
Bash

if [ -z "$GIT_BRANCH" ]
then
# GIT_BRANCH is empty use git
echo '{ "branch": "'$(git branch | grep \* | cut -d ' ' -f2)'", "commit": "'$(git rev-parse --short=5 --verify HEAD)'"}' > ./src/config/revision.json
else
# user GIT_BRANCH
echo '{ "branch": "'$GIT_BRANCH'", "commit": "'$(git rev-parse --short=5 --verify HEAD)'"}' > ./src/config/revision.json
fi