Initial commit

This commit is contained in:
严浩
2024-10-11 15:55:27 +08:00
commit 2466f5a927
9 changed files with 115 additions and 0 deletions

23
scripts/02.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
rm -f CHANGELOG.md
git fetch
latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
git tag -l | xargs -I {} git push origin :refs/tags/{}
git tag -l | xargs git tag -d
git switch main
git checkout --orphan temp_branch
git add .
git commit -m "Initial commit"
git branch -D main
git branch -m main
git branch --set-upstream-to=origin/main main
for branch in $(git branch | grep -v "main"); do
git push origin --delete "$branch"
git branch -D "$branch"
done
git push -f origin main
git tag "$latest_tag"
git push origin "$latest_tag"