hack/module.sh
sets MOD_DIR
for module tasks
This is to allow tasks which need to be executed in a module-specific context to detect that they are being invoked appropriately.
This commit is contained in:
parent
ccefc29eb0
commit
a45748f020
@ -51,6 +51,7 @@ function with_modules() {
|
|||||||
for mod_file in $(find . -maxdepth 4 -name go.mod | sort); do
|
for mod_file in $(find . -maxdepth 4 -name go.mod | sort); do
|
||||||
mod_dir="$(dirname "${mod_file}")"
|
mod_dir="$(dirname "${mod_file}")"
|
||||||
(
|
(
|
||||||
|
export MOD_DIR="$(pwd)"
|
||||||
echo "=> " && \
|
echo "=> " && \
|
||||||
echo " cd ${mod_dir} && ${cmd}" && \
|
echo " cd ${mod_dir} && ${cmd}" && \
|
||||||
cd "${mod_dir}" && ${cmd}
|
cd "${mod_dir}" && ${cmd}
|
||||||
|
Loading…
Reference in New Issue
Block a user