I was under the impression that RUN.BEFORE and RUN.AFTER worked differently. In fact, I thought that I could do the following (especially valid when you have multiple Runfiles):
The contents of ./commands/homebrew/Runfile:
# RUN.AFTER upgrade
upgrade-homebrew:
echo "Upgrading Homebrew"
The contents of ./commands/aqua/Runfile:
# RUN.AFTER upgrade
upgrade-aqua:
echo "Upgrading aqua"
The contents of ./Runfile:
INCLUDE **/Runfile
upgrade:
echo "Upgrading..."
So, I naively hoped that I could wire in more commands in various ./commands/*/Runfile files without having to wire them in ./Runfile, so, if I would get the following result in the setup above:
$ run upgrade
Upgrading...
Upgrading Homebrew
Upgrading aqua
It came out I was wrong and that RUN.BEFORE and RUN.AFTER are just syntax sugar for "${RUN}" <command>, which is not enormously useful.
So, I propose adding the HOOK.BEFORE and HOOK.AFTER, so that the above could work if I replace RUN.AFTER with HOOK.AFTER.
Another option is to make upgrade call other commands using a wildcard, i.e.
# RUN.AFTER upgrade-*
upgrade:
echo "Upgrading"
I was under the impression that
RUN.BEFOREandRUN.AFTERworked differently. In fact, I thought that I could do the following (especially valid when you have multipleRunfiles):The contents of
./commands/homebrew/Runfile:The contents of
./commands/aqua/Runfile:The contents of
./Runfile:So, I naively hoped that I could wire in more commands in various
./commands/*/Runfilefiles without having to wire them in./Runfile, so, if I would get the following result in the setup above:It came out I was wrong and that
RUN.BEFOREandRUN.AFTERare just syntax sugar for"${RUN}" <command>, which is not enormously useful.So, I propose adding the
HOOK.BEFOREandHOOK.AFTER, so that the above could work if I replaceRUN.AFTERwithHOOK.AFTER.Another option is to make
upgradecall other commands using a wildcard, i.e.