diff --git a/conf/source/arm.src b/conf/source/arm.src index 8f37252..6187fd0 100644 --- a/conf/source/arm.src +++ b/conf/source/arm.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-6 -SOURCE_SUM=c38394be40634b0e1bd0fac0898474ff50e4535af610c12ee16ec3cabd2d4771 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-arm-6 +SOURCE_SUM=c4996c2f413945bb131e7096751838ef49c5e9e40ce33b280f45ecd13e895274 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/arm_1.7.src b/conf/source/arm_1.7.src new file mode 100644 index 0000000..8f37252 --- /dev/null +++ b/conf/source/arm_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-6 +SOURCE_SUM=c38394be40634b0e1bd0fac0898474ff50e4535af610c12ee16ec3cabd2d4771 +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/conf/source/armv7.src b/conf/source/armv7.src index 5eb2360..2fe7b3b 100644 --- a/conf/source/armv7.src +++ b/conf/source/armv7.src @@ -1,5 +1,8 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-7 -SOURCE_SUM=fd4ba028a30eb2fac1f8570fd3f6157f0c46c21992a2062dd7a6751cc8a47f2f +# The armv7 build is brocken +# See : https://github.com/go-gitea/gitea/issues/6700 +# Use temporary the armv6 binary +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-arm-6 +SOURCE_SUM=c4996c2f413945bb131e7096751838ef49c5e9e40ce33b280f45ecd13e895274 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/armv7_1.7.src b/conf/source/armv7_1.7.src new file mode 100644 index 0000000..5eb2360 --- /dev/null +++ b/conf/source/armv7_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-arm-7 +SOURCE_SUM=fd4ba028a30eb2fac1f8570fd3f6157f0c46c21992a2062dd7a6751cc8a47f2f +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/conf/source/i386.src b/conf/source/i386.src index 2fcf64e..285cfe6 100644 --- a/conf/source/i386.src +++ b/conf/source/i386.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-386 -SOURCE_SUM=a420bccb17e6e1c317c014475ce5a5bf8091da123cc55b0569660ae43ababf44 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-386 +SOURCE_SUM=6fad1b9eede60e270d845ad962b61520af1673e7f7c6a1422c29e32947019409 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/i386_1.7.src b/conf/source/i386_1.7.src new file mode 100644 index 0000000..2fcf64e --- /dev/null +++ b/conf/source/i386_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-386 +SOURCE_SUM=a420bccb17e6e1c317c014475ce5a5bf8091da123cc55b0569660ae43ababf44 +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/conf/source/x86-64.src b/conf/source/x86-64.src index ce97cc3..2d54d0b 100644 --- a/conf/source/x86-64.src +++ b/conf/source/x86-64.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-amd64 -SOURCE_SUM=49b733a3272dc49cb869c1ba9624a9880168f27b8112197d0c7fa32411dbf625 +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.8.1/gitea-1.8.1-linux-amd64 +SOURCE_SUM=cc985b7947cdd50cb47a68bbb51e3a8519d0d2710a9696255928ae9912dca598 SOURCE_SUM_PRG=sha256sum SOURCE_FILENAME=gitea SOURCE_EXTRACT=false diff --git a/conf/source/x86-64_1.7.src b/conf/source/x86-64_1.7.src new file mode 100644 index 0000000..ce97cc3 --- /dev/null +++ b/conf/source/x86-64_1.7.src @@ -0,0 +1,5 @@ +SOURCE_URL=https://github.com/go-gitea/gitea/releases/download/v1.7.3/gitea-1.7.3-linux-amd64 +SOURCE_SUM=49b733a3272dc49cb869c1ba9624a9880168f27b8112197d0c7fa32411dbf625 +SOURCE_SUM_PRG=sha256sum +SOURCE_FILENAME=gitea +SOURCE_EXTRACT=false diff --git a/manifest.json b/manifest.json index a02bf1e..37df4e4 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ }, "url": "http://gitea.io", "license": "MIT", - "version": "1.7.3~ynh1", + "version": "1.8.0~ynh1", "maintainer": { "name": "rafi59", "email": "rafi59_dev@srvmaison.fr.nf" diff --git a/scripts/upgrade b/scripts/upgrade index 72ff9c9..127e9bd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,8 +99,16 @@ config_nginx # DB migration #================================================= -# Support for the time when the upstream_version was not updated -upstream_version=${upstream_version:-1.7} +# Before the version 1.7 the upstream version was not stored +# The way to find the version for the install < 1.7 is to parse the binary file to find which version is installed +if [ -z ${upstream_version:-} ]; then + for version in "0.0." "1.0." "1.1." "1.2." "1.3." "1.4." "1.5." "1.6." "1.7."; do + if strings $final_path/gitea | grep -P "^${version//./\\.}\d"; then + upstream_version="${version}0" + break + fi + done +fi restart_gitea() { # Set permissions @@ -112,7 +120,7 @@ restart_gitea() { } case $upstream_version in -"0.0.1" ) +"0.0."* ) ynh_setup_source $final_path source/${architecture}_1.0 set_permission systemctl start $app @@ -143,6 +151,10 @@ case $upstream_version in ynh_setup_source $final_path source/${architecture}_1.6 restart_gitea ;& +"1.6."* ) + ynh_setup_source $final_path source/${architecture}_1.7 + restart_gitea +;& esac # Install gitea