fetch new and build new version automatically

This commit is contained in:
2025-02-14 03:48:31 +05:00
parent fc5140d237
commit 99fccde008
10 changed files with 102 additions and 57 deletions

10
.build/get_latest_version.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# URL of the page containing the files
URL="https://download.nextcloud.com/server/releases/"
# Extract tar.bz2 file names and get the latest version number
latest_version=$(curl -s $URL | grep -oP 'nextcloud-\d+\.\d+\.\d+\.tar\.bz2' | sort -V | tail -1 | grep -oP '\d+\.\d+\.\d+')
# json encode and print the version, download url and filename
echo "{\"version\":\"${latest_version}\",\"url\":\"${URL}nextcloud-${latest_version}.tar.bz2\",\"filename\":\"nextcloud-${latest_version}.tar.bz2\"}"