mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-09 21:10:24 +00:00
- Adds `make lint-shell`. uses local `shellcheck` if its version matches, otherwise runs the pinned image via docker or podman - `.shellcheckrc` disables the most annoying rules - Fixes findings across existing scripts Fixes: #37648 Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-authored-by: Nicolas <bircni@icloud.com>
22 lines
603 B
Bash
Executable File
22 lines
603 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
if [ ! -f go.mod ] || [ ! -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}/"
|