From f5e3a13f4465ee0e44c89f38add5d1608b75e2f6 Mon Sep 17 00:00:00 2001 From: Alan Pope Date: Tue, 19 Mar 2024 09:16:02 +0000 Subject: [PATCH] Delete redundant snap packaging receipe I'm working on the snap packaging over at https://codeberg.org/forgejo-contrib/snap which makes this snapcraft.yaml outdated, redundant and potentially confusing for other developers. Signed-off-by: Alan Pope --- snap/snapcraft.yaml | 86 --------------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 snap/snapcraft.yaml diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml deleted file mode 100644 index 7c10074bc5..0000000000 --- a/snap/snapcraft.yaml +++ /dev/null @@ -1,86 +0,0 @@ -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 Go, this can be done with - an independent binary distribution across ALL platforms that Go supports, - including Linux, Mac OS X, Windows and ARM. - -icon: public/assets/img/logo.png -confinement: strict -base: core22 -adopt-info: gitea - -architectures: - - build-on: armhf - - build-on: amd64 - - build-on: 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.21/stable, node/18/stable ] - build-environment: - - LDFLAGS: "" - override-pull: | - craftctl default - - git config --global --add safe.directory /root/parts/gitea/src - last_committed_tag="$(git for-each-ref --sort=taggerdate --format '%(tag)' refs/tags | tail -n 1)" - last_released_tag="$(snap info gitea | awk '$1 == "latest/candidate:" { print $2 }')" - # If the latest tag from the upstream project has not been released to - # stable, build that tag instead of master. - if [ "${last_committed_tag}" != "${last_released_tag}" ]; then - git fetch - git checkout "${last_committed_tag}" - fi - - version="$(git describe --always | sed -e 's/-/+git/;y/-/./')" - [ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable - craftctl set version="$version" - craftctl set grade="$grade" - - override-build: | - set -x - sed -i 's/os.Getuid()/1/g' modules/setting/setting.go - TAGS="bindata sqlite sqlite_unlock_notify pam cert" make build - install -D gitea "${SNAPCRAFT_PART_INSTALL}/gitea" - cp -r options "${SNAPCRAFT_PART_INSTALL}/" - - 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