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 CLI options for commit and push #121

Open
vv3 opened this issue Feb 14, 2020 · 5 comments
Open

Add CLI options for commit and push #121

vv3 opened this issue Feb 14, 2020 · 5 comments

Comments

@vv3
Copy link

vv3 commented Feb 14, 2020

There are CLI options for cloning a repo and loading a model. I'd like to see options for commiting and pushing as well. Something like:
--modelrepository.commit
--modelrepository.push

The commit option should take an Commit-message argument

Combining this with jArchi scripting, this would make it possible to automatically update the model without using the GUI.
See disussion here:
https://forum.archimatetool.com/index.php?topic=733.msg4491#msg4491

@rich-biker
Copy link

Great idea.
I wonder of the 'push' should be called 'publish' for consistency with the UI?

@Phillipus
Copy link
Member

Phillipus commented Feb 14, 2020

This would require a significant re-write of the code as it does a lot of UI stuff. For example, "Publish" does the following:

  1. Ask user to save model if needed (UI)
  2. Ask user to commit changes if needed (UI)
  3. Pull from remote
  4. If a merge is required present a dialog to user, deal with any merge conflicts (UI)
  5. Push to remote

It would be possible to throw some exceptions or not proceed in cases of (1) and (2) and (4) but all of the code would need to be re-written to do this, quite significantly.

@vv3
Copy link
Author

vv3 commented Feb 19, 2020

Is it easier to create a CLI-option for simply exporting the model as a set of XML files? Something like:
--modelrepository.export-to-XML
The git operations themselves can then be performed from a batch/shell script.

@Phillipus
Copy link
Member

Phillipus commented Feb 19, 2020

A first stage might be to look at "commit". It still requires some refactoring of the code, though.

@mmoreno803user
Copy link

Hi!
Let me bring this thread back to life.
We are using the collaboration plugin too and found ACLI very useful for automating export tasks, but we are limited for import tasks which we are forced to run manually from the Archi application.
We don't really need the git features as we use an environment with an already cloned repo and load the model using "--modelrepository.loadModel".
A "--modelrepository.saveModel" would be extremely useful for running unattended import scripts.

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

5 participants