Commit Graph

8 Commits

Author SHA1 Message Date
Zaiming (Stone) Shi 638a9d1af7 build: change to build .tar.gz instead of zip 2022-01-13 18:54:01 +01:00
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
Thales Macedo Garitezi 2eb7a71e49
chore(appup): make update_appup.escript output only differences for
external dependencies [5.0]

Same as #6307 .

Currently, the update_appup.escript outputs as an error the full appup
file for external dependencies, even if all the changes are already
contained in the depency. Here, we make it only output the missing
actions to be inserted, to aid in seeing what are the differences.
2021-12-01 08:52:40 -03:00
Thales Macedo Garitezi 1a6b4d2d57
chore(appup): minor fixes to update_appup.escript (5.0)
- Fixes clause error on `create_stub/1`.
- Small optimization: do not download the same file multiple times
  with `wget`.
- Fix: remove old file extension (`.app.src`) and preserve dirname
  when creating stubs for apps.
2021-11-25 13:54:31 -03:00
k32 970e6bebde fix(update_appup): Sync version from 4.* branch 2021-11-18 12:33:48 +01:00
Zaiming Shi 54458e3924 chore(appup): ensure emqx_app alwasy loaded in appup 2021-06-03 13:02:49 +02:00
Tobias Lindahl 981364341e chore(appup): load emqx_channel in appup
Note that the large whitespace diff on the appup file is because this
is the first time the new script for modifying appup files is used.
2021-06-03 12:22:58 +02:00
k32 4f425828d6 feat(scripts): Add an appup helper script 2021-06-02 11:50:49 +02:00