I am interested in using rsconnect.pre.deploy
and rsconnect.post.deploy
options in rsconnect.
FIrst, I am considering using the rsconnect.pre.deploy function to perform a "pre-flight" check on the app. Is this consistent with its purpose? Specifically, if a pre-flight requirement fails, is there a way to safely halt a deployment (e.g. by using stopifnot to test the requirement)?
Second, the hooks seem to have limited knowledge of its execution context. I understand from reading rsconnectOptions documentation and the source code that functions named by these options are called with a single argument, being the appDir.
I would like my rsconnect.post.deploy hook function to somehow determine more of the execution context, specifically the path to the deployment record (.dcf) file.
Is this possible somehow?