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

Execute command in all repos #31

Closed
JohanSpaedtke opened this issue May 23, 2017 · 5 comments
Closed

Execute command in all repos #31

JohanSpaedtke opened this issue May 23, 2017 · 5 comments
Labels

Comments

@JohanSpaedtke
Copy link

No idea if you think this is in scope for gws or not but i would like to do the following

gws run "mvn clean"

and have that run the command mvn clean in all repos. Please just close if you think this is a stupid idea and then I'll just create my own little script for it.

@bastienpaulfr
Copy link

Hi,

I have made something like you want : https://github.com/CoppernicSoftware/gws/tree/bp-dev

It is the command gws exe, but you will need to make a little change because I prefix all arguments of gws exe by git. Unless you change that, you will not able to execute maven command.

At least it could be a good start for you.

@emlun
Copy link
Collaborator

emlun commented Jun 10, 2017

@bastienpaulfr Thanks for sharing your solution!

@JohanSpaedtke However, I'm going to invoke the README:

Except for cloning repositories, this script has not for goal to interact with your repositories. So no pull all, push all, delete all unused, functionnality will be implemented (except fast-forward). This will imply too much checking to ensure no loose of informations. Instead, just look the satus of the repositories and do needed actions manually on regular basis.

and declare this a wontfix. This is easy enough to as a bash one-liner like

$ for repo in *; do cd "$repo"; echo "\n\n$repo:\n"; do-something cool ; cd ..; done

@emlun emlun closed this as completed Jun 10, 2017
@emlun emlun added the wontfix label Jun 10, 2017
@StreakyCobra
Copy link
Owner

@emlun By the way, the README is not the law [1] 😄 so if you want to implement this kind of behaviour feel free to do so. I didn't wanted to put potentially destructive operations as part of the gws commands, as it would imply that they are supported safely. But having a «gws exe -- command» that only run commands the users want to run, in all repositories managed by gws, would actually be nice. The users would be responsible by themself of potentially destructive operations 😈 .

[1] https://www.youtube.com/watch?v=6GMkuPiIZ2k

@emlun
Copy link
Collaborator

emlun commented Jun 10, 2017 via email

@JohanSpaedtke
Copy link
Author

Well that one liner could replace most of gws ;P But I understand why you don't want to do it :)

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

No branches or pull requests

4 participants