Skip to content

fix: snap build (main branch)#37685

Merged
lunny merged 3 commits into
mainfrom
lunny/cherry_pick_37645
May 14, 2026
Merged

fix: snap build (main branch)#37685
lunny merged 3 commits into
mainfrom
lunny/cherry_pick_37645

Conversation

@lunny
Copy link
Copy Markdown
Member

@lunny lunny commented May 13, 2026

  1. make "pull" and "build" testable and debuggable
  2. add more comments for how the build works
  3. separate 1.26 and main build tags
  4. fix incorrect tag describe (the current snap info gitea outputs version 1.22)

Legacy logic is kept as is although some of them don't seem good (e.g.: snap version grep, tag finding, etc)

ATTENTION:


Cherry pick #37645

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 13, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 13, 2026
@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label May 13, 2026
@silverwind silverwind requested a review from Copilot May 13, 2026 07:23
@silverwind
Copy link
Copy Markdown
Member

If any copilot findings are worth it, replicate the fixes to the other PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 refactors the Snapcraft build logic for the gitea snap to make the pull/build steps easier to debug and to improve how the snap version/grade are derived from Git metadata during snapcraft.io builds.

Changes:

  • Replaces inline override-pull/override-build blocks in snapcraft.yaml with standalone shell scripts.
  • Adds snap/part-gitea-pull.sh to handle tag selection and to set snap version/grade via craftctl.
  • Adds snap/part-gitea-build.sh to build and stage the gitea binary and options/ into the snap install dir.

Reviewed changes

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

File Description
snap/snapcraft.yaml Moves pull/build overrides to scripts and updates snap description text.
snap/part-gitea-pull.sh New script for snapcraft pull-step tag selection and version/grade computation.
snap/part-gitea-build.sh New script for snapcraft build-step compilation and staging.

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

Comment thread snap/snapcraft.yaml Outdated
Comment thread snap/part-gitea-pull.sh
Comment thread snap/part-gitea-pull.sh
lunny and others added 2 commits May 13, 2026 09:41
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 13, 2026
@lunny lunny merged commit 9299628 into main May 14, 2026
25 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone May 14, 2026
@lunny lunny deleted the lunny/cherry_pick_37645 branch May 14, 2026 00:31
silverwind added a commit to bircni/gitea that referenced this pull request May 14, 2026
…thor

* origin/main:
  [skip ci] Updated translations via Crowdin
  fix: snap build (main branch) (go-gitea#37685)
  chore: introduce HTMLBuilder (go-gitea#37688)
  chore: clean up "contrib" dir (go-gitea#37690)
  feat(api): add sort and order query parameters to job list endpoints (go-gitea#37672)
  fix: Sort action run jobs by JobID and Name with matrix examples (go-gitea#37046)
  fix: catch and fix more lint problems (go-gitea#37674)
  docs(agents): update AGENTS.md (go-gitea#37684)
  fix(actions): run `TransferLogs` on `UpdateLog{Rows:[], NoMore:true}` (go-gitea#37631)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants