update improve

This commit is contained in:
qiaofeng1227 2023-08-01 11:12:34 +08:00
parent 3deb00349f
commit cfb9efcd43
5 changed files with 38 additions and 11 deletions

View file

@ -26,9 +26,6 @@ jobs:
echo "CHANGELOG<<EOF" >> $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

View file

@ -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

View file

@ -1 +1,2 @@
fixed update search api bug
1. improve update.sh
2. add docs to artifacts

View file

@ -62,27 +62,51 @@ UpdatePlugins(){
echo "Check plugins if have update ..."
# update appstore
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
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
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
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
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
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

View file

@ -41,5 +41,5 @@
"18.04"
]
},
"VERSION": "0.8.8"
"VERSION": "0.8.9"
}