upgrade: RELEASE_NUMBERS is a variable with all known releases
the development branch is not build for v1.21 & v1.20 because they pre-date the hard fork and near EOL
This commit is contained in:
parent
aa83694fd7
commit
be86fe2e44
4 changed files with 23 additions and 13 deletions
|
@ -12,18 +12,22 @@ DIR=$2
|
||||||
v=$(echo $version | sed -E -e 's/^([0-9]+\.[0-9]+).*/\1/')
|
v=$(echo $version | sed -E -e 's/^([0-9]+\.[0-9]+).*/\1/')
|
||||||
read url ref semver < $SELF_DIR/sources/$v
|
read url ref semver < $SELF_DIR/sources/$v
|
||||||
|
|
||||||
rm -fr $DIR/src
|
if ! test -d $DIR/src ; then
|
||||||
if [[ "$ref" =~ ^refs/ ]] ; then
|
mkdir -p $DIR/src
|
||||||
git clone --depth 1 $url $DIR/src
|
|
||||||
cd $DIR/src
|
cd $DIR/src
|
||||||
git fetch origin +$ref:$ref
|
git init
|
||||||
git checkout -b $v $ref
|
git remote add origin $url
|
||||||
else
|
else
|
||||||
git clone --depth 1 -b $ref $url $DIR/src
|
|
||||||
cd $DIR/src
|
cd $DIR/src
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! [[ "$ref" =~ ^refs/ ]] ; then
|
||||||
|
ref=refs/heads/$ref
|
||||||
|
fi
|
||||||
|
git fetch --update-head-ok origin +$ref:$ref
|
||||||
|
git switch --force-create $v $ref
|
||||||
|
|
||||||
export TAGS="bindata sqlite sqlite_unlock_notify" FORGEJO_VERSION=$semver
|
export TAGS="bindata sqlite sqlite_unlock_notify" FORGEJO_VERSION=$semver
|
||||||
make deps-backend backend
|
make deps-backend backend
|
||||||
make generate forgejo
|
make generate forgejo
|
||||||
mv forgejo $DIR/forgejo-$version
|
cp -a forgejo $DIR/forgejo-$v-dev
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
https://codeberg.org/forgejo/forgejo v1.20/forgejo 5.0.0+0-gitea-1.20.0
|
|
|
@ -1 +0,0 @@
|
||||||
https://codeberg.org/forgejo/forgejo v1.21/forgejo 6.0.0+0-gitea-1.21.0
|
|
|
@ -11,6 +11,11 @@
|
||||||
# Everything happens in /tmp/forgejo-upgrades
|
# Everything happens in /tmp/forgejo-upgrades
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Forgejo releases for which a branch exists (7.0/forgejo etc.)
|
||||||
|
#
|
||||||
|
RELEASE_NUMBERS="7.0"
|
||||||
|
|
||||||
PREFIX===============
|
PREFIX===============
|
||||||
HOST_PORT=0.0.0.0:3000
|
HOST_PORT=0.0.0.0:3000
|
||||||
STORAGE_PATHS="attachments avatars lfs packages repo-archive repo-avatars"
|
STORAGE_PATHS="attachments avatars lfs packages repo-archive repo-avatars"
|
||||||
|
@ -26,6 +31,7 @@ SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
: ${FORGEJO_USER:=root}
|
: ${FORGEJO_USER:=root}
|
||||||
: ${FORGEJO_REPO:=fixture}
|
: ${FORGEJO_REPO:=fixture}
|
||||||
: ${FORGEJO_PASSWORD:=admin1234}
|
: ${FORGEJO_PASSWORD:=admin1234}
|
||||||
|
RELEASE_NUMBERS_AND_DEV="$(for r in $RELEASE_NUMBERS ; do echo -n $r $r-dev ; done)"
|
||||||
|
|
||||||
source $SELF_DIR/fixtures.sh
|
source $SELF_DIR/fixtures.sh
|
||||||
|
|
||||||
|
@ -65,8 +71,10 @@ function dependencies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_all() {
|
function build_all() {
|
||||||
log_info 7.0.0-dev
|
for dev in $RELEASE_NUMBERS ; do
|
||||||
$SELF_DIR/../build.sh 7.0.0-dev $DIR
|
log_info $dev-dev
|
||||||
|
$SELF_DIR/../build.sh $dev $DIR
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function retry() {
|
function retry() {
|
||||||
|
@ -500,7 +508,7 @@ function test_storage_stable_s3() {
|
||||||
|
|
||||||
log_info "See also https://codeberg.org/forgejo/forgejo/issues/1338"
|
log_info "See also https://codeberg.org/forgejo/forgejo/issues/1338"
|
||||||
|
|
||||||
for version in 1.18 1.19 1.20.2-0 1.20.3-0 1.20 1.21 7.0 ; do
|
for version in 1.18 1.19 1.20.2-0 1.20.3-0 1.20 1.21 $RELEASE_NUMBERS_AND_DEV ; do
|
||||||
log_info "Forgejo $version & $s3_backend"
|
log_info "Forgejo $version & $s3_backend"
|
||||||
stop
|
stop
|
||||||
reset stable-s3
|
reset stable-s3
|
||||||
|
@ -564,7 +572,7 @@ function test_successful_upgrades() {
|
||||||
log_info "using $config app.ini"
|
log_info "using $config app.ini"
|
||||||
reset $config
|
reset $config
|
||||||
|
|
||||||
for version in 1.18 1.19 1.20.2-0 1.20.3-0 1.20 1.21 7.0 ; do
|
for version in 1.18 1.19 1.20.2-0 1.20.3-0 1.20 1.21 $RELEASE_NUMBERS_AND_DEV ; do
|
||||||
log_info "run $version"
|
log_info "run $version"
|
||||||
cleanup_storage
|
cleanup_storage
|
||||||
start $version
|
start $version
|
||||||
|
|
Loading…
Add table
Reference in a new issue