lrascao/rebar3_appup_plugin

Do "rebar3 appup generate" work with git?

Closed this issue · 6 comments

dcy commented

Hi!
Do "rebar3 appup generate" work with git?
I rm -rf .git, and follow the UPGRADE_DOWNGRADE,
change the code, and modify the version of rebar.config

dcy@dcy-dcy:~/test/relapp1$ rebar3 appup generate
dcy@dcy-dcy:~/test/relapp1$ 

Nothing generated.

The example project is based on changes introduced through several git tags.
You need to generate a release for appup generate to detect any changes

dcy commented

Does it mean if i want to use rebar3 appup generate to generate appup file, i should use git tag?

I recommend always using some kind of version control system, however appup generate only needs two built releases in order to perform the comparison, how that is achieved is entirely up to you. If you're trying out the relapp1 then yes, you need to checkout the git tags and build the release

dcy commented

I am trying relapp1, I git checkout 1.0.11 and rebar3 release, Then i did not checkout 1.0.12, I modify the code of relapp_app.erl, and change the version to 1.0.12 from rebar.config.

dcy@dcy-dcy:~/app/relapp1$ rebar3 release
===> Verifying dependencies...
===> Compiling relapp
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
          /home/dcy/app/relapp1/_build/default/lib
          /home/dcy/app/relapp1/apps
          /usr/lib/erlang/lib
          /home/dcy/app/relapp1/_build/default/rel
===> Resolved relapp-1.0.12
===> release successfully created!
dcy@dcy-dcy:~/app/relapp1$ rebar3 appup generate
dcy@dcy-dcy:~/app/relapp1$ 

appup not generated.

I rebar3 new app create a new app, build two different releases, and rebar3 appup generate does not generate appup file.

if you compare tags between 1.0.11 and 1.0.12 you'll see more changes, the .app.src file is also different

dcy commented

Thanks. It works.