1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-19 04:42:23 +03:00

update snap package ()

This commit is contained in:
Sienna Lloyd 2023-09-12 06:47:53 -06:00 committed by GitHub
parent e33f112e01
commit e986265ecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

1
.gitignore vendored
View file

@ -95,6 +95,7 @@ cpu.out
/.go-licenses /.go-licenses
# Snapcraft # Snapcraft
/gitea_a*.txt
snap/.snapcraft/ snap/.snapcraft/
parts/ parts/
stage/ stage/

View file

@ -8,7 +8,7 @@ description: |
icon: public/assets/img/logo.png icon: public/assets/img/logo.png
confinement: strict confinement: strict
base: core18 base: core22
adopt-info: gitea adopt-info: gitea
architectures: architectures:
@ -44,12 +44,13 @@ parts:
source: . source: .
stage-packages: [ git, sqlite3, openssh-client ] stage-packages: [ git, sqlite3, openssh-client ]
build-packages: [ git, libpam0g-dev, libsqlite3-dev, build-essential] build-packages: [ git, libpam0g-dev, libsqlite3-dev, build-essential]
build-snaps: [ go, node/18/stable ] build-snaps: [ go/1.21/stable, node/18/stable ]
build-environment: build-environment:
- LDFLAGS: "" - LDFLAGS: ""
override-pull: | override-pull: |
snapcraftctl 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_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 }')" 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 # If the latest tag from the upstream project has not been released to
@ -61,8 +62,8 @@ parts:
version="$(git describe --always | sed -e 's/-/+git/;y/-/./')" version="$(git describe --always | sed -e 's/-/+git/;y/-/./')"
[ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable [ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable
snapcraftctl set-version "$version" craftctl set version "$version"
snapcraftctl set-grade "$grade" craftctl set grade="$grade"
override-build: | override-build: |
set -x set -x