mainframer icon indicating copy to clipboard operation
mainframer copied to clipboard

Add possibility to configure remote machine name via command line parameters

Open ghostbuster91 opened this issue 7 years ago • 13 comments

A possible situation: I have two machines for remote compilation but none of them is accessible from public network. One is in my home and the other in the office.

To change the name I have to change the config file. It would be easier to specify it just through command line arguments e.g. ./mainframer.sh -r REMOTE_MACHINE_NAME taskName

In additions it would make intellij idea integration with plugin easier ;)

Such configuration might override configuration in config file.

ghostbuster91 avatar May 29 '17 20:05 ghostbuster91

Hm, but isn't it easier to change it just in the file and keep running Mainframer without any additional parameters?

artem-zinnatullin avatar May 29 '17 22:05 artem-zinnatullin

But if I had such parameter I could create two separate command aliases or scripts. With file I have to create script which will replace my remoteMachineName in mainframer configuration.

Ofc this parameter would be optional.

ghostbuster91 avatar May 30 '17 07:05 ghostbuster91

Ok I'm pretty open for such a parameter, @ming13 what do you think?

artem-zinnatullin avatar May 30 '17 09:05 artem-zinnatullin

We’ve discussed config and argument parity some time ago. At this time we used it on a single project using a single machine, so we shut it down. I guess we should rethink it in the light of plans to provide Mainframer as a system-wide tool.

arturdryomov avatar May 30 '17 10:05 arturdryomov

+1 for this. I have a script I run as an alias for mainframer that writes the server I want to the config file and then calls mainframer.

When I'm home and developing from the couch it goes to my local machine but when I'm at a client I'm accessing that machine through the internet.

PaulWoitaschek avatar May 30 '17 10:05 PaulWoitaschek

Ok, let's do it, I suppose we should support both short and long form of argument passing, i.e:

--remote-machine
-rm????
-r?

--local-compression-level
-lcl

--remote-compression-level
-rcl

artem-zinnatullin avatar May 30 '17 14:05 artem-zinnatullin

Why not just something like:

./mainframer -c configFile ./gradlew assembleRelease

So you just point to a config file? When absent it uses the default config file.

PaulWoitaschek avatar May 30 '17 14:05 PaulWoitaschek

Yup, that could also be added, however just passing config values as arguments is valuable as well since it does not require managing files

On Tue, May 30, 2017, 17:19 Paul Woitaschek [email protected] wrote:

Why not just something like:

./mainframer -c configFile ./gradlew assembleRelease

So you just point to a config file? When absent it uses the default config file.

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/gojuno/mainframer/issues/173#issuecomment-304892840, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7B3EqA0Hl4mN0R3efNEo1NOMG0BF0Gks5r_CVbgaJpZM4NpnI0 .

artem-zinnatullin avatar May 31 '17 19:05 artem-zinnatullin

+1. I am in the same situation, two remote machines in two different locations. All team is using mainframer and configs are in the repo. Sometimes I accidentally push these configs. It is quite annoying to fixing it.

neworld avatar Jul 21 '17 11:07 neworld

@neworld for now you can temporary ignore changes you do in this file if you use git so you don't accidentally commit it http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html

But we heard you :)

artem-zinnatullin avatar Jul 22 '17 23:07 artem-zinnatullin

Any updates on this?

ghostbuster91 avatar Mar 26 '18 08:03 ghostbuster91

Yep, I think this is important feature, let me add it to 3.x milestone

I'm also thinking about splitting project/.mainframer/config into two files, so one could be committed to the repo and the other one could be ignored, like local.properties

artem-zinnatullin avatar Mar 26 '18 12:03 artem-zinnatullin

@artem-zinnatullin How is it going? As for us that's an urgent feature especially to speed up particular build configuration. For example for the app build we just need an apk but it wouldn't be enough for tests etc. At 2.0.0 version we don't have any other option except general ignore rules

BelooS avatar Sep 02 '20 08:09 BelooS