Skip to content

fix(build.sh): remove rm -rf .git/#2703

Merged
elysia-best merged 1 commit into
OpenListTeam:mainfrom
multiarchstore:main
Jul 1, 2026
Merged

fix(build.sh): remove rm -rf .git/#2703
elysia-best merged 1 commit into
OpenListTeam:mainfrom
multiarchstore:main

Conversation

@elysia-best

Copy link
Copy Markdown
Member

Summary / 摘要

移除构建脚本中的 rm -rf .git/,防止gh-cli报错。同时限制了checkout深度,以免仓库过大。

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。
  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。
  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

  • OpenList-Frontend:
  • OpenList-Docs:

Related Issues / 关联 Issue

Testing / 测试

  • go test ./...
  • Manual test / 手动测试:

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmtgo fmtprettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

Signed-off-by: elysia <a.elysia@proton.me>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes destructive cleanup of the repository’s .git/ directory from build.sh to avoid breaking Git-based tooling during builds (e.g., gh CLI), and updates the release workflow checkout to use a shallow fetch while still fetching tags.

Changes:

  • Removed rm -rf .git/ from multiple build entrypoints in build.sh.
  • Updated .github/workflows/release.yml to use fetch-depth: 1 and enable tag fetching during checkout.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
build.sh Stops deleting .git/ during build targets to keep Git metadata available for tooling.
.github/workflows/release.yml Uses a shallow checkout while attempting to preserve tag availability for release builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@elysia-best elysia-best merged commit a92d59d into OpenListTeam:main Jul 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants