A chat with @Sirex in the community forums today yielded a nice hack to speed up development of packages in the local Studio (if you work in the Studio often you probably have felt the pain of waiting for artifact creation to complete after every build).
This hack makes use of the fact that each package is installed under under /hab/pkgs
inside the Studio before the artifact is created. This means we can test packages and services from within the Studio before the time-consuming process of artifact creation begins. To implement the hack, add this callback to your plan.sh
:
do_after() {
if [ $HAB_CREATE_PACKAGE == 'false' ]
then
build_line "WARN: Skipping artifact creation because 'HAB_CREATE_PACKAGE=false'"
_generate_artifact() {
return 0
}
_prepare_build_outputs() {
return 0
}
fi
}
To actually enable it, you should set HAB_CREATE_PACKAGE=false
either on the command-line or in your .studiorc
file before initializing the Studio.
Enjoy the speed boost!