Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix relup cmd arguments and add validation #2427

Merged
merged 1 commit into from Nov 11, 2020

Conversation

garazdawi
Copy link
Contributor

There seems to be an intention in the relx:build_relup code to support Release, ToVsn and FromVsn to be undefined, but that does not work nor does the spec allow for it. So this PR fixes rebar_relx to work with --relname and --relvsn and informs the user that you have to give these options.

Another option would be to also fix relx:build_relup/4 to allow Release, ToVsn and FromVsn to be undefined to be undefined.

relx:build_relup does not allow for undefined Release or ToVsn
so we verify that they have been given on the command line
before running relx:build_relup/4.
@tsloughter
Copy link
Collaborator

Thanks, this looks good. Currently we keep tests of the cli separately in relx itself https://github.com/erlware/relx/tree/master/shelltests and a separate repo that runs tests nightly, https://github.com/tsloughter/rebar3_tests

So I'll get a tested added to one of those, unless you feel like it :)

@garazdawi
Copy link
Contributor Author

See tsloughter/rebar3_tests#3 for test

@tsloughter tsloughter merged commit e43dd6b into erlang:master Nov 11, 2020
@garazdawi garazdawi deleted the lukas/fix-relup-arguments branch November 11, 2020 13:33
@jwheare
Copy link

jwheare commented Feb 9, 2021

I believe this breaks a pattern we were using where the relname and relvsn are passed along when running the chained command: rebar3 release relup -u <upfrom>

@tsloughter
Copy link
Collaborator

Chained commands don't work like that anymore. Do you mean, rebar3 do release, relup -u <upfrom>?

@jwheare
Copy link

jwheare commented Feb 9, 2021

Hmm, I think there are actually quite a lot of things that have changed that break our setup. I've rolled back to the version we were on before (3.9.1). Will try to dig into this some more another time.

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

Successfully merging this pull request may close these issues.

None yet

3 participants