Files
gitea/snap/snapcraft.yaml
Lunny Xiao 929962833d fix: snap build (main branch) (#37685)
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)

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-13 17:31:47 -07:00

70 lines
1.7 KiB
YAML

name: gitea
summary: Gitea - A painless self-hosted Git service
description: |
The goal of this project is to make the easiest, fastest, and most painless
way of setting up a self-hosted Git service with GitHub-like experiences,
including issue tracking, code review, project management, wikis, package registry,
Gitea Actions and more.
icon: public/assets/img/logo.png
confinement: strict
base: core24
adopt-info: gitea
platforms:
armhf:
build-on: [armhf]
build-for: [armhf]
amd64:
build-on: [amd64]
build-for: [amd64]
arm64:
build-on: [arm64]
build-for: [arm64]
environment:
GITEA_CUSTOM: "$SNAP_COMMON"
GITEA_WORK_DIR: "$SNAP_COMMON"
GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
apps:
gitea:
command: gitea
plugs: [network, network-bind, removable-media]
web:
command: gitea web
daemon: simple
plugs: [network, network-bind, removable-media]
dump:
command: gitea dump
plugs: [home, removable-media]
version:
command: gitea --version
sqlite:
command: usr/bin/sqlite3
parts:
gitea:
plugin: make
source: .
stage-packages: [ git, sqlite3, openssh-client ]
build-packages: [ git, libpam0g-dev, libsqlite3-dev, build-essential]
build-snaps: [ go/1.26/stable, node/24/stable ]
build-environment:
- LDFLAGS: ""
override-pull: craftctl default && ./snap/part-gitea-pull.sh
override-build: ./snap/part-gitea-build.sh
prime:
- -etc
- -usr/lib/systemd
- -usr/lib/gcc
- -usr/lib/sasl2
- -usr/lib/x86_64-linux-gnu/krb5
- -usr/share/apport
- -usr/share/bash-completion
- -usr/share/git-core/contrib
- -usr/share/man
- -usr/share/upstart
- -var