emqx/scripts
Thales Macedo Garitezi 8342b3711d
chore(update_appup): Improve `update_appup.escript` (5.0)
Port of #6480 .

* Make the script regex-aware

This change makes the `update_appup.escript` check whether the new
version of an application (the _current_ one) is already contained in
entries in the _new_ .appup file for that application if such .appup
file contains regexes.

* Do not use `load_module` instructions if `restart_application` is present

Since the appup instruction `restart_application` already loads all
modules of a given application, there is no need to introduce those
instructions if a restart is already present.

* Do not force `.appup.src` render if contents are the same

To avoid losing comments and/or manual indentation in appup files that
are already up to date, we now check whether the contents have the
exact same terms as those we are about to write to an existint .appup
file.

* Insert `load_module`s after `application:stop`, if present

If there is already any `application:stop(Application)` call in the
appup instructions, we prefer to add `load_module` instructions after
it, so we can be sure that the load is replaced safely.

* Add expected versions check

For apps inside emqx umbrella, we try to bump only the patch part of
their version numbers, and use only 3-part version
numbers (`Major.Minor.Patch`).  With those assumptions, we may infer
all versions that need to be covered in a given upgrade, and check if
those are covered in regexes.
2021-12-28 10:06:42 -03:00
..
apps-version-check.sh fix: portable shebang 2021-12-27 15:45:12 +01:00
check-deps-integrity.escript refactor: no more EMQX_ENTERPRISE compile flag 2021-11-20 20:41:06 +01:00
check-nl-at-eof.sh fix: portable shebang 2021-12-27 15:45:12 +01:00
elvis-check.sh ci: fix job syntax 2021-11-04 18:32:03 +01:00
ensure-rebar3.sh chore(script): silent download rebar3 2021-07-30 10:40:14 +02:00
fail-on-old-otp-version.escript chore(build): Fail fast on old version OTP 2021-03-01 19:48:27 +01:00
find-apps.sh refactor: delete lib-extra 2021-12-16 12:48:13 +01:00
find-props.sh build(test): add proper checking targets for each application 2021-04-13 18:10:21 +08:00
find-suites.sh build: work with new emqx app location 2021-06-07 09:09:28 +02:00
get-dashboard.sh chore(dashboard): change dashboard repo and version 2021-12-09 11:31:31 +08:00
get-distro.sh fix: portable shebang 2021-12-27 15:45:12 +01:00
get-otp-vsn.sh fix: portable shebang 2021-12-27 15:45:12 +01:00
git-hook-pre-push.sh refactor: no more EMQX_ENTERPRISE compile flag 2021-11-20 20:41:06 +01:00
git-hooks-init.sh chore(CI): fix build error on windows 2021-03-15 07:31:53 +01:00
merge-config.escript refactor(eqmx_limiter): use the new hierarchical token bucket to replace the old ratelimit code 2021-12-10 14:37:23 +08:00
shellcheck.sh build(CI): fix build error on windows in github actions 2021-03-03 19:48:34 +08:00
start-two-nodes-in-docker.sh build(CI): fix build error on windows in github actions 2021-03-03 19:48:34 +08:00
update_appup.escript chore(update_appup): Improve `update_appup.escript` (5.0) 2021-12-28 10:06:42 -03:00