build from sources
This commit is contained in:
parent
86be00a014
commit
4201713606
17 changed files with 25 additions and 15 deletions
|
@ -34,7 +34,7 @@ jobs:
|
||||||
adduser --quiet --comment forgejo --disabled-password forgejo
|
adduser --quiet --comment forgejo --disabled-password forgejo
|
||||||
chown -R forgejo:forgejo .
|
chown -R forgejo:forgejo .
|
||||||
- run: |
|
- run: |
|
||||||
script=$(pwd)/.forgejo/upgrades/test-upgrade.sh
|
script=$(pwd)/forgejo/upgrades/test-upgrade.sh
|
||||||
$script run dependencies
|
$script run dependencies
|
||||||
$script clobber
|
$script clobber
|
||||||
su forgejo -c "$script test_upgrades"
|
su forgejo -c "$script test_upgrades"
|
||||||
|
|
19
forgejo/build.sh
Executable file
19
forgejo/build.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/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
|
||||||
|
make VERSION=v$version GITEA_VERSION=v$version FORGEJO_VERSION=$semver generate forgejo
|
||||||
|
mv forgejo $DIR/forgejo-$version
|
1
forgejo/sources/1.20
Normal file
1
forgejo/sources/1.20
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://codeberg.org/forgejo/forgejo v1.20/forgejo 5.0.0+0-gitea-1.20.0
|
1
forgejo/sources/1.21
Normal file
1
forgejo/sources/1.21
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://codeberg.org/forgejo/forgejo v1.21/forgejo 6.0.0+0-gitea-1.21.0
|
1
forgejo/sources/1.22
Normal file
1
forgejo/sources/1.22
Normal file
|
@ -0,0 +1 @@
|
||||||
|
https://codeberg.org/forgejo/forgejo forgejo 7.0.0+0-gitea-1.22.0
|
|
@ -64,20 +64,8 @@ function dependencies() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function build() {
|
|
||||||
local version=$1
|
|
||||||
local semver=$2
|
|
||||||
|
|
||||||
if ! test -f $DIR/forgejo-$version ; then
|
|
||||||
mkdir -p $DIR
|
|
||||||
make VERSION=v$version GITEA_VERSION=v$version FORGEJO_VERSION=$semver TAGS='bindata sqlite sqlite_unlock_notify' generate gitea
|
|
||||||
mv gitea $DIR/forgejo-$version
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function build_all() {
|
function build_all() {
|
||||||
test -f Makefile
|
$SELF_DIR/../build.sh 1.22.0-0 $DIR
|
||||||
build 1.21.0-0 6.0.0+0-gitea-1.21.0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function retry() {
|
function retry() {
|
||||||
|
@ -617,7 +605,7 @@ function run() {
|
||||||
function test_upgrades() {
|
function test_upgrades() {
|
||||||
run stop
|
run stop
|
||||||
run dependencies
|
run dependencies
|
||||||
# run build_all
|
run build_all
|
||||||
run test_successful_upgrades
|
run test_successful_upgrades
|
||||||
run test_bug_storage_misplace
|
run test_bug_storage_misplace
|
||||||
run test_bug_storage_merged
|
run test_bug_storage_merged
|
Loading…
Add table
Reference in a new issue