Browse Source

update snap package (#27021)

tags/v1.21.0-rc0
Sienna Lloyd 8 months ago
parent
commit
e986265ecb
No account linked to committer's email address
2 changed files with 7 additions and 5 deletions
  1. 1
    0
      .gitignore
  2. 6
    5
      snap/snapcraft.yaml

+ 1
- 0
.gitignore View File

@@ -95,6 +95,7 @@ cpu.out
/.go-licenses

# Snapcraft
/gitea_a*.txt
snap/.snapcraft/
parts/
stage/

+ 6
- 5
snap/snapcraft.yaml View File

@@ -8,7 +8,7 @@ description: |

icon: public/assets/img/logo.png
confinement: strict
base: core18
base: core22
adopt-info: gitea

architectures:
@@ -44,12 +44,13 @@ parts:
source: .
stage-packages: [ git, sqlite3, openssh-client ]
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:
- LDFLAGS: ""
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_released_tag="$(snap info gitea | awk '$1 == "latest/candidate:" { print $2 }')"
# 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/-/./')"
[ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable
snapcraftctl set-version "$version"
snapcraftctl set-grade "$grade"
craftctl set version "$version"
craftctl set grade="$grade"

override-build: |
set -x

Loading…
Cancel
Save