Parcourir la source

chore: force appup for emqx_dashboard app in each release

Zaiming Shi il y a 4 ans
Parent
commit
1d9f5ea133
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10 1
      scripts/apps-version-check.sh

+ 10 - 1
scripts/apps-version-check.sh

@@ -22,6 +22,15 @@ while read -r app; do
         if [ "$changed" -gt 0 ]; then
         if [ "$changed" -gt 0 ]; then
             echo "$src_file needs a vsn bump"
             echo "$src_file needs a vsn bump"
             bad_app_count=$(( bad_app_count + 1))
             bad_app_count=$(( bad_app_count + 1))
+        elif [[ ${app_path} = *emqx_dashboard* ]]; then
+            ## emqx_dashboard is ensured to be upgraded after all other plugins
+            ## at the end of its appup instructions, there is the final instruction
+            ## {apply, {emqx_plugins, load, []}
+            ## since we don't know which plugins are stopped during the upgrade
+            ## for safty, we just force a dashboard version bump for each and every release
+            ## even if there is nothing changed in the app
+            echo "$src_file needs a vsn bump to ensure plugins loaded after upgrade"
+            bad_app_count=$(( bad_app_count + 1))
         fi
         fi
     fi
     fi
 done < <(./scripts/find-apps.sh)
 done < <(./scripts/find-apps.sh)
@@ -29,5 +38,5 @@ done < <(./scripts/find-apps.sh)
 if [ $bad_app_count -gt 0 ]; then
 if [ $bad_app_count -gt 0 ]; then
     exit 1
     exit 1
 else
 else
-    echo "apps version check successfully"       
+    echo "apps version check successfully"
 fi
 fi