end-to-end/forgejo/build.sh

24 lines
626 B
Bash
Raw Normal View History

2023-10-26 21:39:08 +00:00
#!/bin/bash
set -ex
SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
version=$1
DIR=$2
v=$(echo $version | sed -E -e 's/([0-9]+\.[0-9]+).*/\1/')
read url branch semver < $SELF_DIR/sources/$v
rm -fr $DIR/src
git clone --depth 1 -b $branch $url $DIR/src
cd $DIR/src
export TAGS="bindata sqlite sqlite_unlock_notify"
make deps-backend backend
#
# use the gitea target here so that branches that do not contain the commit that adds
# the `forgejo` target to the Makefile can build successfully
#
make VERSION=v$version GITEA_VERSION=v$version FORGEJO_VERSION=$semver generate gitea
mv gitea $DIR/forgejo-$version