Skip to content

Instantly share code, notes, and snippets.

@nathanmalishev
Last active March 1, 2020 06:25
Show Gist options
  • Save nathanmalishev/a0bef4ba6162298dbee5f5c2128448fb to your computer and use it in GitHub Desktop.
Save nathanmalishev/a0bef4ba6162298dbee5f5c2128448fb to your computer and use it in GitHub Desktop.
Modd conf showing individual handler rebuilds and global rebuils for utils
handler/handlerX/**.go {
prep: go build -o dist/handlerX ./handler/handlerX/
}
handler/handlerY/**.go {
prep: go build -o dist/handlerY ./handler/handlerY/
}
helper/**.go util/**.go {
prep: for dir in `ls handler`; do \
echo 'building…' "$dir"; \
CGO_ENABLED=0 GOOS=linux go build -o dist/handler/"$dir" <PATH_TO_HANDLER>/handler/"$dir" & done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment