Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

snapcraft.yaml 2.6KB

Add logic to build stable and edge builds (#12052) This adds some logic to enable the snapcraft builds of the gitea snap to create both builds of the latest tip of master for edge channels, and stable releases. The logic simply looks for a new upstream release in github, and if that latest tagged release is not the same as the release in the candidate channel in the snap store, then it must be new, and so we checkout that tag and build that. If the current released tag is the same as what's in candidate, we build whatever is in git master. The process for using this is: Initially: When this lands, it will build the latest stable release of gitea and push to the edge channel in the snap store. Someone on the release team can go to https://snapcraft.io/gitea/releases and release that build to stable and candidate. Ongoing: The next build to be triggered will be a git master build, and can just sit in edge, nothing for the release team to do. On new release: The next build triggered will contain the stable release, and will be published to edge. Someone on the release team can login to the above URL and release that again to stable & candidate. Alternatively they can release to candidate, do some additional testing on that release before releasing to stable. Hope that all makes sense. Questions / comments welcome. I'm super keen to see stable releases of Gitea in the stable channel of the Snap Store. I'd like to promote it but I can't really until it's in stable. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
vor 3 Jahren
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: gitea
  2. summary: Gitea - A painless self-hosted Git service
  3. description: |
  4. The goal of this project is to make the easiest, fastest, and most painless
  5. way of setting up a self-hosted Git service. With Go, this can be done with
  6. an independent binary distribution across ALL platforms that Go supports,
  7. including Linux, Mac OS X, Windows and ARM.
  8. icon: public/assets/img/logo.png
  9. confinement: strict
  10. base: core22
  11. adopt-info: gitea
  12. architectures:
  13. - build-on: armhf
  14. - build-on: amd64
  15. - build-on: arm64
  16. environment:
  17. GITEA_CUSTOM: "$SNAP_COMMON"
  18. GITEA_WORK_DIR: "$SNAP_COMMON"
  19. GIT_TEMPLATE_DIR: "$SNAP/usr/share/git-core/templates"
  20. GIT_EXEC_PATH: "$SNAP/usr/lib/git-core"
  21. apps:
  22. gitea:
  23. command: gitea
  24. plugs: [network, network-bind, removable-media]
  25. web:
  26. command: gitea web
  27. daemon: simple
  28. plugs: [network, network-bind, removable-media]
  29. dump:
  30. command: gitea dump
  31. plugs: [home, removable-media]
  32. version:
  33. command: gitea --version
  34. sqlite:
  35. command: usr/bin/sqlite3
  36. parts:
  37. gitea:
  38. plugin: make
  39. source: .
  40. stage-packages: [ git, sqlite3, openssh-client ]
  41. build-packages: [ git, libpam0g-dev, libsqlite3-dev, build-essential]
  42. build-snaps: [ go/1.22/stable, node/20/stable ]
  43. build-environment:
  44. - LDFLAGS: ""
  45. override-pull: |
  46. craftctl default
  47. git config --global --add safe.directory /root/parts/gitea/src
  48. last_committed_tag="$(git for-each-ref --sort=taggerdate --format '%(tag)' refs/tags | tail -n 1)"
  49. last_released_tag="$(snap info gitea | awk '$1 == "latest/candidate:" { print $2 }')"
  50. # If the latest tag from the upstream project has not been released to
  51. # stable, build that tag instead of master.
  52. if [ "${last_committed_tag}" != "${last_released_tag}" ]; then
  53. git fetch
  54. git checkout "${last_committed_tag}"
  55. fi
  56. version="$(git describe --always | sed -e 's/-/+git/;y/-/./')"
  57. [ -n "$(echo $version | grep "+git")" ] && grade=devel || grade=stable
  58. craftctl set version="$version"
  59. craftctl set grade="$grade"
  60. override-build: |
  61. set -x
  62. sed -i 's/os.Getuid()/1/g' modules/setting/setting.go
  63. TAGS="bindata sqlite sqlite_unlock_notify pam cert" make build
  64. install -D gitea "${SNAPCRAFT_PART_INSTALL}/gitea"
  65. cp -r options "${SNAPCRAFT_PART_INSTALL}/"
  66. prime:
  67. - -etc
  68. - -usr/lib/systemd
  69. - -usr/lib/gcc
  70. - -usr/lib/sasl2
  71. - -usr/lib/x86_64-linux-gnu/krb5
  72. - -usr/share/apport
  73. - -usr/share/bash-completion
  74. - -usr/share/git-core/contrib
  75. - -usr/share/man
  76. - -usr/share/upstart
  77. - -var