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

add --relnames option to allow selectively building of multiple releases #2630

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

TheGeorge
Copy link

We have a use-case where we have alot of releases in an umbrella project. Building all releases takes a long time, and usually we only need a selected hand full. However, building them one at a time is also slow.

The release provider has already the functionality to build releases in parallel. This PR adds a --relnames option the works like --all in that it builds the highest version, but it takes a list of release names.

e.g.

rebar3 release --relnames=rel1,rel2

If a release is not found, it fails on the first release, and does not start building any release:

rebar3 release --relnames=rel1,relnonsense
...
===> No releases exists in the system for relnonsense!

@TheGeorge
Copy link
Author

I wanted to add a test case but didn't find a good place where this is tested e2e. What is your suggestion?

@tsloughter
Copy link
Collaborator

@TheGeorge you can send a test to https://github.com/tsloughter/rebar3_tests/ if you think that fits it better (which it probably does in this case). You can either create a new project in it or use one of the existing ones that builds a release and add a step in the .test file that uses --relnames.

Comment on lines 46 to 49
XrefIgnores = rebar_state:get(State, xref_ignores, []),
RelxState = rlx_state:filter_xref_warning(RelxState_0,
fun(Warnings) ->
rebar_prv_xref:filter_xref_results(undefined_function_calls, XrefIgnores, Warnings) end),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these removed?

@TheGeorge
Copy link
Author

TheGeorge commented Oct 27, 2021 via email

@TheGeorge
Copy link
Author

TheGeorge commented Oct 27, 2021 via email

@TheGeorge
Copy link
Author

@tsloughter I made a PR with tests here: tsloughter/rebar3_tests#10

They succeed with the rebar3 produced from this pr:

+ shelltest -c --diff --all --execdir releases_test/releases.test
:releases_test/releases.test:1: [OK]
:releases_test/releases.test:2: [OK]
:releases_test/releases.test:3: [OK]
:releases_test/releases.test:4: [OK]

         Test Cases  Total
 Passed  4           4
 Failed  0           0
 Total   4           4

@TheGeorge
Copy link
Author

@tsloughter @ferd
Is there anything else I can do to progress the PR?

@tsloughter
Copy link
Collaborator

Sorry about that.

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

2 participants