Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

post compile hook and {vsn, git} in .app.src file => relx release not generated #29

Closed
amitizle opened this issue Dec 22, 2016 · 4 comments

Comments

@amitizle
Copy link

amitizle commented Dec 22, 2016

I'm not sure if this is related to this specific provider or to the rebar3 behaviour in general, as I didn't investigate it yet. However I'm posting in here since you might have an idea what this is related to.

I have got an LFE application that is built with rebar3 and this plugin.
It's all working perfectly fine. However, when I'm using a combination of {vsn, git} in the <app>.app.src file AND running this provider as a post compile hook, the git version is not translated to the git tag. Also the generated .app file remains with {vsn, git}.

When I'm changing the hook to run pre compile, everything is generated correctly while creating a relx release.

I assume this is related to rebar3 rather than lfe-compile plugin.
I thought it's worth mentioning it here anyway (and the fact that changing to pre helps).

EDIT: adding versions I have tested the above with:

lfe-compile: 0.7.0, 0.8.0-rc3
rebar3: 3.3.2, 3.3.3
@amitizle
Copy link
Author

I finally got the time to take a look and saw that the first step in compile_normal_apps is to copy the .app.src file to .app file.
This is done without resolving the app version (i.e. {vsn, git}).

I took a further look on how it's done in rebar3 and there it's initially resolving the Vsn (app_vsn) and only then writing the .app file with the resolved vsn.

I guess this can be left that way, but I am wondering why this is done in the plugin?
Also, if so, maybe it's worth adding resolving for the Vsn before copying?

@yurrriq
Copy link
Member

yurrriq commented Jan 29, 2017

@amitizle, you might like to try my WIP simpler rebar_prv_lfe. I tried to keep it as simple as possible and avoid duplicating efforts in rebar3's compile provider.

@amitizle
Copy link
Author

Will give it a shot @yurrriq , thanks!

@oubiwann
Copy link
Member

The new LFE rebar3 plugin will be implementing full release support, as this is going to be what we recommend going forward for LFE applications deployed into production.

Here are the release tickets:

I've added a ticket to ensure that rebar3 lfe compile does the proper thing with vsn.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants