Skip to content

Make list of updated inputs available as variable #363

@srstrong

Description

@srstrong

A suggestion that would certainly be useful for my environment would be for bob to expose a variable containing the list of inputs that have been updated and require a rebuild. So enabling something like:

build:
  build:
    input: |-
      src/*.erl
    cmd: |-
      erlc $UPDATED_INPUTS
   target: ebin

this example is showing erlang files and using the erlc compiler. Without this feature, I'd either have to compile everything whenever anything changed in the src directory, or create a build entry per file. The latter would work, but on a large rebuild it would cause repeated execution of erlc, which is not optimal from a performance perspective - running erlc 5 times is considerably slower than running erlc once and giving it 5 files.

I could also imagine that it might be useful for languages where the compile tool can only take a single output:

build:
  build:
    input: |-
      src/*
    cmd: |-
      for (input in $UPDATED_INPUTS); do compile $input
   target: ebin

(ignore my probably bad sh syntax for the for-loop, but you get the idea :) )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions