From cfb9efcd43453f5806c87346ad9aba02749f227b Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Tue, 1 Aug 2023 11:12:34 +0800 Subject: [PATCH] update improve --- .github/workflows/upload_artifact.yml | 3 --- CHANGELOG.md | 5 ++++ changelog_latest.md | 3 ++- install/update.sh | 36 ++++++++++++++++++++++----- version.json | 2 +- 5 files changed, 38 insertions(+), 11 deletions(-) diff --git a/.github/workflows/upload_artifact.yml b/.github/workflows/upload_artifact.yml index 1cb0aa8e..54a37929 100644 --- a/.github/workflows/upload_artifact.yml +++ b/.github/workflows/upload_artifact.yml @@ -26,9 +26,6 @@ jobs: echo "CHANGELOG<> $GITHUB_OUTPUT echo "$changelog" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - current_date=$(date +%Y-%m-%d) - printf "## $version release on $current_date\n$changelog\n" < CHANGELOG.md > temp.txt - mv temp.txt CHANGELOG.md mkdir websoft9 artifacts cp -r docker websoft9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d10c91b..3a5c5eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.8.9 release on 2023-08-01 + +1. improve update.sh +2. add docs to artifacts + ## 0.8.8 release on 2023-07-27 fixed update search api bug diff --git a/changelog_latest.md b/changelog_latest.md index 7b7ea221..38a79181 100644 --- a/changelog_latest.md +++ b/changelog_latest.md @@ -1 +1,2 @@ -fixed update search api bug +1. improve update.sh +2. add docs to artifacts diff --git a/install/update.sh b/install/update.sh index 11ddd60a..65f5803a 100644 --- a/install/update.sh +++ b/install/update.sh @@ -62,27 +62,51 @@ UpdatePlugins(){ echo "Check plugins if have update ..." # update appstore -old_appstore_version=$(cat /usr/share/cockpit/appstore/appstore.json | jq .Version | tr -d '"') +if [ -f "/usr/share/cockpit/appstore/appstore.json" ]; then + old_appstore_version=$(cat /usr/share/cockpit/appstore/appstore.json | jq .Version | tr -d '"') +else + old_appstore_version="0.0.0" +fi new_appstore_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .APPSTORE | tr -d '"') # update settings -old_settings_version=$(cat /usr/share/cockpit/settings/settings.json | jq .Version | tr -d '"') +if [ -f "/usr/share/cockpit/settings/settings.json" ]; then + old_settings_version=$(cat /usr/share/cockpit/settings/settings.json | jq .Version | tr -d '"') +else + old_settings_version="0.0.0" +fi new_settings_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .SETTINGS | tr -d '"') # update myapps -old_myapps_version=$(cat /usr/share/cockpit/myapps/myapps.json | jq .Version | tr -d '"') +if [ -f "/usr/share/cockpit/myapps/myapps.json" ]; then + old_myapps_version=$(cat /usr/share/cockpit/myapps/myapps.json | jq .Version | tr -d '"') +else + old_myapps_version="0.0.0" +fi new_myapps_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .MYAPPS | tr -d '"') ## update container -old_container_version=$(cat /usr/share/cockpit/container/portainer.json | jq .Version | tr -d '"') +if [ -f "/usr/share/cockpit/container/portainer.json" ]; then + old_container_version=$(cat /usr/share/cockpit/container/portainer.json | jq .Version | tr -d '"') +else + old_container_version="0.0.0" +fi new_container_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .PORTAINER | tr -d '"') ## update nginx -old_nginx_version=$(cat /usr/share/cockpit/nginx/nginx.json | jq .Version | tr -d '"') +if [ -f "/usr/share/cockpit/nginx/nginx.json" ]; then + old_nginx_version=$(cat /usr/share/cockpit/nginx/nginx.json | jq .Version | tr -d '"') +else + old_nginx_version="0.0.0" +fi new_nginx_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .NGINX | tr -d '"') ## update library -old_library_version=$(cat /data/library/library.json | jq .Version | tr -d '"') +if [ -f "/data/library/library.json" ]; then + old_library_version=$(cat /data/library/library.json | jq .Version | tr -d '"') +else + old_library_version="0.0.0" +fi new_library_version=$(cat /data/apps/websoft9/version.json | jq .PLUGINS |jq .LIBRARY | tr -d '"') if [ "$old_appstore_version" = "$new_appstore_version" ] && [ "$old_settings_version" = "$new_settings_version" ] && [ "$old_myapps_version" = "$new_myapp_version" ] && [ "$old_container_version" = "$new_container_version" ] && [ "$old_nginx_version" \< "$new_nginx_version" ]; then diff --git a/version.json b/version.json index 0a3206a6..16d8a58f 100644 --- a/version.json +++ b/version.json @@ -41,5 +41,5 @@ "18.04" ] }, - "VERSION": "0.8.8" + "VERSION": "0.8.9" } \ No newline at end of file