Skip to content

Commit 471e8c4

Browse files
committed
chore(tools): resume git checkout in initialization
1 parent 3cd81e7 commit 471e8c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/init

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ check_env() {
7777
_check_init
7878
}
7979

80+
checkout_latest_tag() {
81+
tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
82+
git reset --hard "$tag"
83+
}
84+
8085
init_files() {
8186
if $_no_gh; then
8287
rm -rf .github
@@ -109,6 +114,7 @@ commit() {
109114

110115
main() {
111116
check_env
117+
checkout_latest_tag
112118
init_files
113119
commit
114120
}

0 commit comments

Comments
 (0)