StreakyCobra / gws

Colorful KISS helper for git workspaces
https://streakycobra.github.io/gws/
MIT License
234 stars 22 forks source link

Execute command in all repos #31

Closed JohanSpaedtke closed 7 years ago

JohanSpaedtke commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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
StreakyCobra commented 7 years ago

@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 commented 7 years ago

Well, I don't want to implement it.... 😇 Like you I'm not that excited by the prospect of developing in bash. Bug fixes and minor improvements are one thing, but I'm reluctant to develop new features.

On Sat, 10 Jun 2017, 18:31 Fabien Dubosson, notifications@github.com wrote:

@emlun https://github.com/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

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/StreakyCobra/gws/issues/31#issuecomment-307575685, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTezh4fHFAECcU9XZdHeKUQPRLzHI4tks5sCsTFgaJpZM4NjwvR .

JohanSpaedtke commented 7 years ago

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