Hi Chris, On Tue, Sep 24, 2019 at 2:48 AM Christopher Collins <ch...@runtime.io> wrote:
> Hello all, > > I have implemented a feature in newt: the ability to run custom shell > commands at build time. > > <https://github.com/apache/mynewt-newt/pull/335> > > Is there any extra functionality that you'd like to see here? All > comments are appreciated. I am duplicating the PR text here, but the > formatting is a little nicer in the PR. > This looks very good! I was thinking if it would be possible to reference other targets (i.e. artifacts) from scripts but with the latest addition of shared folder this does not seem to be a problem since it can be also shared with another newt build invoked from script and we can copy/write data there. I did not yet check how this work in practice but will give it a try and perhaps then I'll have some extra ideas. > Thanks, > Chris > > --- > > A package specifies custom commands in its `pkg.yml` file. There are > two types of commands: 1) pre_cmds (run before the build), and 2) > post_cmds (run after the build). > > ### EXAMPLE > > Example (apps/blinky/pkg.yml): > > pkg.pre_cmds: > scripts/pre_build1.sh: 100 > scripts/pre_build2.sh: 200 > > pkg.post_cmds: > scripts/post_build.sh: 100 > I assume these are relative to package root so perhaps we could assume there is scripts/ subdir and execute from there by default? Just the same as we have src/ and include/. Best, Andrzej