This is a simulation of providing a wrapper called toolw for a tool called tool.
https://example.repo/tool-wrapper/toolw-up.sh- script to installtoolwinto the current directory.project_dir/toolw- project-level wrapper script.project_dir/.tool/wrapper/tool-wrapper.properties- project-level tool wrapper configuration.distributionUrl=https://example.repo/location/0.0.1/tool.zip
tool_user_home/wrapper/dists/tmp-*/- temporary location for local tool installation.tool_user_home/wrapper/dists/tool-*/- location of local tool installations.
TOOLW_DEBUG- enables trace debugging of wrapper if non-blank.
./build.sh- creates
toolwvia a template and content fromtoolwand.tool/wrapper/tool-wrapper.properties. - copies wrapper to
target/toolw-repo. - creates dummy tool archive in
target/tool-repo. - from
target/project:- creates
toolwand config dir by callingtoolw-upscript intarget/toolw-repo. - sets
TOOL_USER_HOMEtotarget/tool_user_homeand re-writesdistributionUrltotarget/tool-repo. - calls
./toolwto trigger install oftool.
- creates
- execute tests.
- (todo) upload new version to distribution repo.
- creates
The dummy tool used to demonstrate wrapper has the following behaviour:
- tool installation directory has executables under
/bin - user-level configuration expected to reside in
tool_user_home - project-level configuration expected to reside in
project_dir/.tool/ - distributions are in
zipformat, containing a single subdirectory, e.g.tool-0.0.1/. - tool repo has layout like:
https://example.repo/location/0.0.1/tool.zip - environment variables:
TOOL_USER_HOME- where to install tool locally, defaults to$HOME/.tool
Note that the locally installed versions of the tool will go into $TOOL_USER_HOME/wrapper
Some of these behaviours will be encoded into build.sh and toolw
TODO: provide an init script to allow developers customise for their own tool.