-
Notifications
You must be signed in to change notification settings - Fork 45
Improve the best practices for the creation of custom scripts #781
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
Conversation
| 2. Create a new branch for your script | ||
| When writing your own script you'll need to test it. To test a script Phoenicis doesn't only require the script, but also some context information. For example a miniature image used in the library after the script has been installed. Some other context information is extracted by Phoenicis via the directory structure, the script is located in. | ||
|
|
||
| Therefore to test a script it needs to be embedded inside a repository. For this a local repository, which is based on the official script repository, is recommended. To setup your own local repository proceed the following steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add an option to "run a directory script"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure a "run a directory script" option would work.
Currently we require for the script to be correctly displayed in the applications tab of Phoenicis, that the script is contained inside a category directory. (@plata I can't find this in the script repository documentation?)
I know this is only for the representation in the applications tab, which is not really required to when directly executing a script, but I'm not sure which other information is extracted from the directory structure during script execution.
I think @plata has more knowledge about this than I.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scripts require information about their location in the repository. This is injected from Java (otherwise you would have to set it for every single script). We have an open issue to change this behavior but until then, it's not possible. To be honest, I also don't see the point of doing this: If you want to provide a script, you must put it in git anyways.
|
|
||
| Therefore to test a script it needs to be embedded inside a repository. For this a local repository, which is based on the official script repository, is recommended. To setup your own local repository proceed the following steps: | ||
|
|
||
| 1. Fork the official scripts repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change the README to use a fork as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right
See PhoenicisOrg/phoenicis#1711