While Mix is not the main build tool, we remove the commited
`mix.lock` file to reduce friction when updating dependencies, since
it requires remembering to run `mix deps.get` to update the
`mix.lock`, used by a CI check in
`scripts/check-elixir-deps-discrepancies.exs`. We change said script
to produce the required file on the fly.
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.
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.
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.
- 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.
The compile flag was introduced in EQM X 4.3 series
where CE and EE code was diverged large enough which made
non-practicle to determin edition at runtime.
such approach made testing quite challenging as we'll have to
build with different compile flags inorder to run per-edition
test cases
In this commit, we try to retrieve edition info from EMQX's
description text, (put to PT for fast access) at runtime
so we can test ALL editions from a super-set edition (EE).
* refactor(dashboard): rename 'password' field to 'pwdhash'
rename as it is not plaintext password stored in db
* refactor(emqx_dashboard): rename records
* test(emqx_dashboard_token): add test case to cover match specs