mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-15 07:06:06 +00:00
929962833d
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>
22 lines
599 B
Bash
Executable File
22 lines
599 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
if [ ! -f go.mod -o ! -d snap ]; then
|
|
echo "This script should be run from the root of the gitea repository"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "$SNAPCRAFT_PART_INSTALL" ]; then
|
|
SNAPCRAFT_PART_INSTALL="./dist/snap"
|
|
echo "* using mock install path: $SNAPCRAFT_PART_INSTALL"
|
|
fi
|
|
|
|
command -v pnpm >/dev/null 2>&1 || npm install -g pnpm
|
|
|
|
# build tags for 1.26: "bindata sqlite sqlite_unlock_notify pam cert"
|
|
# for 1.27: sqlite is not needed, "cert" seems doing nothing
|
|
TAGS="bindata pam" make build
|
|
|
|
install -D gitea "${SNAPCRAFT_PART_INSTALL}/gitea"
|
|
cp -r options "${SNAPCRAFT_PART_INSTALL}/"
|