mayan-edms - get latest version online
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
toolName="Mayan EDMS"
|
||||
toolVersion="4.2.5"
|
||||
toolRoot="/opt/mayan-edms"
|
||||
toolMediaFolder="/opt/mayan-edms/media"
|
||||
|
||||
@@ -36,6 +35,8 @@ seq_config() {
|
||||
## Apt cmdline option to suppress user interaction
|
||||
quiet && APTOPT="-y"
|
||||
|
||||
toolVersion="$(getLatestVersion)"
|
||||
|
||||
## Return of non zero value will abort the sequence
|
||||
return 0
|
||||
}
|
||||
@@ -84,7 +85,7 @@ step_5() {
|
||||
# upgrade pip first
|
||||
step upgradepip
|
||||
|
||||
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir mayan-edms==$toolVersion
|
||||
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir mayan-edms=="${toolVersion}"
|
||||
endReturn -o $? "pip install for $toolName failed"
|
||||
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir psycopg2==2.8.4 redis==3.4.1
|
||||
endReturn -o $?
|
||||
@@ -121,7 +122,7 @@ databases 2"
|
||||
|
||||
step_10_info() {
|
||||
echoinfoArgs "[OPTIONS]"
|
||||
echo "Upgrade $toolName to $toolVersion"
|
||||
echo "Upgrade $toolName to ${toolVersion:-"latest Version"}"
|
||||
echoinfo " [OPTIONS]"
|
||||
echoinfo " super : update also supervisor configuration"
|
||||
echoinfo " (manual redis password update may be needed)"
|
||||
@@ -134,7 +135,7 @@ step_10() {
|
||||
exe sudo -u mayan ${toolRoot}/bin/pip uninstall -r "$uninstallRemovalsLoc"
|
||||
endReturn -o $?
|
||||
exe systemctl stop supervisor
|
||||
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir mayan-edms==$toolVersion
|
||||
exe sudo -u mayan ${toolRoot}/bin/pip install --no-cache-dir mayan-edms=="${toolVersion}"
|
||||
endReturn -o $?
|
||||
toolScript performupgrade
|
||||
#toolScript preparestatic --noinput # only < 3.4
|
||||
@@ -221,6 +222,10 @@ readDatabaseInfos() {
|
||||
info
|
||||
}
|
||||
|
||||
getLatestVersion() {
|
||||
curl --silent -L https://docs.mayan-edms.com/releases/index.html | sed -n 's/.*Version \([0-9.]\+\).*/\1/p' | head -1
|
||||
}
|
||||
|
||||
# Needs readDatabaseInfos() to execute some commands
|
||||
toolScript() {
|
||||
if [ -n "${1:-}" ] ; then
|
||||
|
Reference in New Issue
Block a user