Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow plugins to hook into AppRun #81

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

Closed
TheAssassin opened this issue Jun 29, 2019 · 1 comment · Fixed by #87
Closed

Allow plugins to hook into AppRun #81

TheAssassin opened this issue Jun 29, 2019 · 1 comment · Fixed by #87

Comments

@TheAssassin
Copy link
Member

Sometimes it's important to perform actions before running the actual app. The classic approach is to tell people to write custom AppRun scripts.

That's not very elegant, though, as the code is pretty much the same every time. Also some plugins might have to set e.g., environment variables to work properly (a good example is #80).

Therefore linuxdeploy should, if necessary, generate an AppRun stub that is prepared to run hooks created by plugins. I guess sourceing all files in some special directory in the AppDir should be sufficient. It'll be best to make a rule that the order must not have any influence on the result.

@TheAssassin
Copy link
Member Author

I drafted a new section in the wiki describing a method how to allow linuxdeploy to auto-generate an AppRun script that automatically sources plugin-created files.

There's two important rules for such scripts:

  • must be idempotent: scripts must be able to deal with previous/multiple executions and shall deal with changes of other scripts
  • must not rely on any special order of execution: scripts must not expect any special order in which they are run

Implementing a prototype of this already.

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

Successfully merging a pull request may close this issue.

1 participant