chore(tools): resume git checkout in initialization

This commit is contained in:
Cotes Chung 2023-03-18 00:49:26 +08:00
parent 3cd81e7128
commit 471e8c4018
No known key found for this signature in database
GPG key ID: 0D9E54843167A808

View file

@ -77,6 +77,11 @@ check_env() {
_check_init
}
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
@ -109,6 +114,7 @@ commit() {
main() {
check_env
checkout_latest_tag
init_files
commit
}