1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 13:44:15 +00:00

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

View File

@@ -77,6 +77,11 @@ check_env() {
_check_init _check_init
} }
checkout_latest_tag() {
tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
git reset --hard "$tag"
}
init_files() { init_files() {
if $_no_gh; then if $_no_gh; then
rm -rf .github rm -rf .github
@@ -109,6 +114,7 @@ commit() {
main() { main() {
check_env check_env
checkout_latest_tag
init_files init_files
commit commit
} }