From facb8a7adb1f1519f67064d28b7b87c2343e7e63 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Thu, 10 Aug 2023 16:51:07 +0800 Subject: [PATCH] navagitor plugin change --- CHANGELOG.md | 4 ++++ changelog_latest.md | 4 +--- docker/w9appmanage/.env | 2 +- install/install.sh | 6 ++++-- install/update.sh | 23 ++++++++++++++++++++--- version.json | 7 ++++--- 6 files changed, 34 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52f2c4e3..aeb2c7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.12 release on 2023-08-10 + +1. navigator plugin install way change + ## 0.8.11 release on 2023-08-03 1. Optimize interface calls diff --git a/changelog_latest.md b/changelog_latest.md index 3634d140..7f467871 100644 --- a/changelog_latest.md +++ b/changelog_latest.md @@ -1,3 +1 @@ -1. Optimize interface calls -2. library artifacts directory: websoft9/plugin/library -3. add init apps: nocobase, affine +1. navigator plugin install way change diff --git a/docker/w9appmanage/.env b/docker/w9appmanage/.env index fd4d3cfc..dc38425b 100644 --- a/docker/w9appmanage/.env +++ b/docker/w9appmanage/.env @@ -1,4 +1,4 @@ APP_NAME=websoft9-appmanage -APP_VERSION=0.8.10 +APP_VERSION=0.8.11 APP_HTTP_PORT=5000 APP_NETWORK=websoft9 diff --git a/install/install.sh b/install/install.sh index 07e0ce61..64886005 100644 --- a/install/install.sh +++ b/install/install.sh @@ -362,10 +362,12 @@ unzip nginx-$nginx_version.zip settings_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .SETTINGS | tr -d '"') wget $urls/plugin/settings/settings-$settings_version.zip unzip settings-$settings_version.zip -rm -f *.zip # install navigator -cp -r /data/apps/websoft9/cockpit/navigator.zip /usr/share/cockpit && unzip navigator.zip && rm -f navigator.zip +navigator_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .NAVIGATOR | tr -d '"') +wget $urls/plugin/navigator/navigator-$navigator_version.zip +unzip navigator-$navigator_version.zip +rm -f *.zip # install library cd /data diff --git a/install/update.sh b/install/update.sh index 1d1352a3..64bea734 100644 --- a/install/update.sh +++ b/install/update.sh @@ -120,6 +120,14 @@ else fi new_nginx_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .NGINX | tr -d '"') +## update navigator +if [ -f "/usr/share/cockpit/navigator/navigator.json" ]; then + old_navigator_version=$(cat /usr/share/cockpit/navigator/navigator.json | jq .Version | tr -d '"') +else + old_navigator_version="0.0.0" +fi +new_navigator_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .NAVIGATOR | tr -d '"') + ## update library if [ -f "/data/library/library.json" ]; then old_library_version=$(cat /data/library/library.json | jq .Version | tr -d '"') @@ -142,6 +150,18 @@ else else echo "appstore is not need to update" fi + + compare_versions $old_navigator_version $new_navigator_version + if [[ $? -eq 0 ]]; then + echo "navigator plugin need to update" + cd /usr/share/cockpit + wget $urls/plugin/navigator/navigator-$new_navigator_version.zip + rm -rf navigator + unzip navigator-$navigator_version.zip + rm -f navigator-$navigator_version.zip + else + echo "navigator is not need to update" + fi compare_versions $old_settings_version $new_settings_version if [[ $? -eq 0 ]]; then @@ -213,12 +233,9 @@ new_appmanage=$(cat /data/apps/websoft9/docker/w9appmanage/.env |grep APP_VERSIO compare_versions $old_appmanage $new_appmanage if [[ $? -eq 0 ]]; then echo "start to update w9appmanage..." - rm -rf /tmp/database.sqlite && sudo docker cp websoft9-appmanage:/usr/src/app/database.sqlite /tmp rm -f /data/apps/w9services/w9appmanage/.env && cp /data/apps/websoft9/docker/w9appmanage/.env /data/apps/w9services/w9appmanage/.env rm -f /data/apps/w9services/w9appmanage/docker-compose.yml && cp /data/apps/websoft9/docker/w9appmanage/docker-compose.yml /data/apps/w9services/w9appmanage/docker-compose.yml cd /data/apps/w9services/w9appmanage && sudo docker compose down && sudo docker compose pull && sudo docker compose up -d - sudo docker exec -it websoft9-appmanage rm -f /usr/src/app/database.sqlite && sudo docker cp /tmp/database.sqlite websoft9-appmanage:/usr/src/app - docker restart websoft9-appmanage else echo "appmanage is not need to update" fi diff --git a/version.json b/version.json index b60251ef..de72e3c9 100644 --- a/version.json +++ b/version.json @@ -2,15 +2,16 @@ "SERVICES": { "PORTAINER": "2.18.3", "NGINX": "2.10.3", - "APPMANAGE": "0.8.10", + "APPMANAGE": "0.8.11", "REDIS": "7.0.11" }, "PLUGINS": { - "PORTAINER": "0.0.2", + "PORTAINER": "0.0.3", "NGINX": "0.0.2", "MYAPPS": "0.0.3", "APPSTORE": "0.0.4", "SETTINGS": "0.0.2", + "NAVIGATOR": "0.5.10", "LIBRARY": "0.5.3" }, "OS_SUPPORT": { @@ -42,5 +43,5 @@ "18.04" ] }, - "VERSION": "0.8.11" + "VERSION": "0.8.12" } \ No newline at end of file