command sample:
shcf_cli getlib <project_name> shcf-lib/abs_value:v1.0
underneath, it would be (tag abs_value-v1.0 in https://github.com/icasimpan/shcf-lib):
git clone --branch abs_value-v1.0 https://github.com/icasimpan/shcf-lib
or, without the ":v1.0" specified at the end, latest tag will be used and is always the same as branch "stable/abs_value in https://github.com/icasimpan/shcf-lib.
.shcf-vendor.lock - lock file similar in purpose to composer.json.lock
create a
shcf-vendor.lock
with format:
[repodomain.ext/username/]<libname>:vX.Y:sha256sum
[repodomain.ext/username] -> defaults to github.com/icasimpan/shcf-lib
---> so that external repositories can be made like github.com/maeng/shcf-lib/
in "getlib", make sure:
stable/<lib_name>
\- lib/<lib_name>.bash.inc => goes to lib/
\- etc/init.conf => app_defs.conf
\- etc/binaries.conf => binaries.conf (filter out existing one)
\- dependencies.cfg => dependency libraries of <lib_name>.in each line
\- version_hash.cfg. => [repodomain.ext/username/]<libname>:vX.Y:<hash>
where hash is taken as follows:
~$ for x in $(find ./shcf-lib/abs_value -type f|grep -v .git|grep -v version_hash.cfg); do sha256sum $x; done|sha256sum|cut -d' ' -f1
17eafc47d1e9919168aeaaaef1038a1bf953a7c8adaf4731453e9559593c9b26
Libraries are written into 'vendor' folder in shcf core for audit purposes but copied into corresponding project's 'lib' directory.