Skip to content

Commit 3f0300a

Browse files
authored
Merge pull request #229 from qianmoQ/2026.0.0
feat: 重构 Layout 组件
2 parents 91e18b4 + 4e6e5a9 commit 3f0300a

15 files changed

Lines changed: 331 additions & 363 deletions

configure/publish/publish-newVersion.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@ job_before_checked() {
2121
printf "============================================\n\n"
2222
}
2323

24+
job_switch_to_version_branch() {
25+
printf "\n\tJob switch to version branch \n"
26+
printf "============================================\n"
27+
28+
# 检查分支是否存在
29+
if git show-ref --verify --quiet "refs/heads/$VERSION"; then
30+
printf "Branch '%s' exists, switching...\n" "$VERSION"
31+
git checkout "$VERSION"
32+
else
33+
printf "Branch '%s' does not exist, creating...\n" "$VERSION"
34+
git checkout -b "$VERSION"
35+
fi
36+
37+
if [ $? -ne 0 ]; then
38+
printf "Failed to switch to branch '%s'\n" "$VERSION"
39+
exit 1
40+
fi
41+
42+
printf "Now on branch: %s\n" "$VERSION"
43+
printf "============================================\n\n"
44+
}
45+
2446
job_check_version_diff() {
2547
printf "\n\tJob check version difference \n"
2648
printf "============================================\n"
@@ -121,6 +143,7 @@ job_runner_apply_playground() {
121143

122144
job_before_echo_basic
123145
job_before_checked
146+
job_switch_to_version_branch
124147
job_check_version_diff
125148
job_runner_apply
126-
job_runner_apply_playground
149+
job_runner_apply_playground

0 commit comments

Comments
 (0)