chore(tools): checkout latest tag on initialization

This commit is contained in:
Cotes Chung 2022-12-28 01:11:27 +08:00
parent 5a191e79af
commit 6fa1777eb0
No known key found for this signature in database
GPG Key ID: 0D9E54843167A808
1 changed files with 7 additions and 0 deletions

View File

@ -46,6 +46,11 @@ check_init() {
fi
}
checkout_latest_tag() {
tag=$(git describe --tags $(git rev-list --tags --max-count=1))
git reset --hard "$tag"
}
init_files() {
if $_no_gh; then
rm -rf .github
@ -100,4 +105,6 @@ while (($#)); do
esac
done
checkout_latest_tag
init_files