Skip to content

Commit

Permalink
perf(tools): avoid initialization interruption in single branch forks (
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 authored Apr 16, 2023
1 parent 6f6e309 commit e90461a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/init
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ check_env() {
_check_init
}

checkout_latest_tag() {
tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
git reset --hard "$tag"
checkout_latest_release() {
hash=$(git log --grep="chore(release):" -1 --pretty="%H")
git reset --hard "$hash"
}

init_files() {
Expand Down Expand Up @@ -114,7 +114,7 @@ commit() {

main() {
check_env
checkout_latest_tag
checkout_latest_release
init_files
commit
}
Expand Down

0 comments on commit e90461a

Please sign in to comment.