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