@@ -9,9 +9,13 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99SRC_DIR=" $SCRIPT_DIR /../src"
1010
1111# 加载模块
12+ # shellcheck source=src/checks.sh
1213source " $SRC_DIR /checks.sh"
14+ # shellcheck source=src/submit.sh
1315source " $SRC_DIR /submit.sh"
16+ # shellcheck source=src/watch.sh
1417source " $SRC_DIR /watch.sh"
18+ # shellcheck source=src/fix.sh
1519source " $SRC_DIR /fix.sh"
1620
1721# 颜色定义
@@ -123,7 +127,7 @@ cmd_init() {
123127# 创建 Rust CI
124128create_rust_ci () {
125129 if [ ! -f " .github/workflows/ci.yml" ]; then
126- cat > .github/workflows/ci.yml << 'EOF '
130+ cat > .github/workflows/ci.yml << 'CIEOF '
127131name: CI
128132
129133on:
@@ -157,15 +161,15 @@ jobs:
157161
158162 - name: Tests
159163 run: cargo test
160- EOF
164+ CIEOF
161165 log_success " 创建 Rust CI workflow"
162166 fi
163167}
164168
165169# 创建 Node.js CI
166170create_node_ci () {
167171 if [ ! -f " .github/workflows/ci.yml" ]; then
168- cat > .github/workflows/ci.yml << 'EOF '
172+ cat > .github/workflows/ci.yml << 'CIEOF '
169173name: CI
170174
171175on:
@@ -199,15 +203,15 @@ jobs:
199203
200204 - name: Build
201205 run: npm run build || true
202- EOF
206+ CIEOF
203207 log_success " 创建 Node.js CI workflow"
204208 fi
205209}
206210
207211# 创建 Python CI
208212create_python_ci () {
209213 if [ ! -f " .github/workflows/ci.yml" ]; then
210- cat > .github/workflows/ci.yml << 'EOF '
214+ cat > .github/workflows/ci.yml << 'CIEOF '
211215name: CI
212216
213217on:
@@ -237,15 +241,15 @@ jobs:
237241
238242 - name: Test
239243 run: pytest || true
240- EOF
244+ CIEOF
241245 log_success " 创建 Python CI workflow"
242246 fi
243247}
244248
245249# 创建 Go CI
246250create_go_ci () {
247251 if [ ! -f " .github/workflows/ci.yml" ]; then
248- cat > .github/workflows/ci.yml << 'EOF '
252+ cat > .github/workflows/ci.yml << 'CIEOF '
249253name: CI
250254
251255on:
@@ -273,7 +277,7 @@ jobs:
273277
274278 - name: Build
275279 run: go build ./...
276- EOF
280+ CIEOF
277281 log_success " 创建 Go CI workflow"
278282 fi
279283}
@@ -282,15 +286,15 @@ EOF
282286create_dependabot () {
283287 local ecosystem=$1
284288 if [ ! -f " .github/dependabot.yml" ]; then
285- cat > .github/dependabot.yml << EOF
289+ cat > .github/dependabot.yml << DEPEOF
286290version: 2
287291updates:
288292 - package-ecosystem: "$ecosystem "
289293 directory: "/"
290294 schedule:
291295 interval: "weekly"
292296 open-pull-requests-limit: 5
293- EOF
297+ DEPEOF
294298 log_success " 创建 Dependabot 配置"
295299 fi
296300}
0 commit comments