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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow semi-permanent selection of a subset of projects #282

Open
klarkent opened this issue Oct 7, 2021 · 7 comments
Open

Allow semi-permanent selection of a subset of projects #282

klarkent opened this issue Oct 7, 2021 · 7 comments

Comments

@klarkent
Copy link

klarkent commented Oct 7, 2021

馃殌 Feature Proposal

Add the possibility to select a subset of the projects defined in .meta so that commands executed have an effect only on those.

Motivation

As a maintainer/developer of 50+ microservices, I have frequently the need to select and work only on a subset of those based on criteria X. This is a temporary filter that lasts only for the time needed to implement a feature, for example.

Example

In a meta-repository, the user could create a .meta-filter file that contains the projects to work on, either separated by a comma or new-line. Once this file is present, meta will apply all commands issued only to this subset of projects so that, for example, I can run npm install --save my-updated-library@new-version only in the projects I know need that update. Then I can commit and open a Merge Request via other commands for those repositories only.
Once I am done I can remove the file and meta behaves normally.

@patrickleet
Copy link
Collaborator

patrickleet commented Oct 7, 2021

We've talked about something similar a few times.

I have frequently the need to select and work only on a subset of those based on criteria X. This is a temporary filter that lasts only for the time needed to implement a feature, for example.

FWIW, this can be accomplished with an environment variable in a single shell

export PROJECTS=one,two,three
meta git status --include-only=$PROJECTS

If you're ok with changing the .meta file with current projects (which would be committed to git) may I suggest a workaround that you can use to accomplish this today?

Makefile
PROJECTS?=one,two,three
COMMAND?=git status

meta:
	meta $(COMMAND) --include-only=$(PROJECTS)
> COMMAND="exec pwd" make meta 
# command that's run: meta exec pwd --include-only=one,two,three

or

PROJECTS=one COMMAND="exec pwd" make meta

And when you want to change the default set you could update that in the Makefile.

I agree the syntax could be nicer by including it in meta, but I think it probably accomplishes the task.

@patrickleet
Copy link
Collaborator

you can also execute things inline

meta exec "npm install --save my-updated-library@new-version" --include-only=$(sh get-node-projects.sh)

I've done something like this in the past - created a script that returns each folder name that contains package.json - you could even grep for a particular package.

@stale
Copy link

stale bot commented Jan 8, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 8, 2022
@stale
Copy link

stale bot commented Mar 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 30, 2022
@alajmo
Copy link

alajmo commented May 3, 2022

I did some similar work for https://github.com/alajmo/mani, allowing me to filter on tags, paths, and current working directory, so perhaps you add tags to each project to allow really granular selections.

@patrickleet
Copy link
Collaborator

yea I think tags would be a good solution as well

@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants