Skip to content

Remove .build.env and modify scripts directly #9

@angry-dan

Description

@angry-dan

I can see the appeal here - having a configuration file that holds the actual commands being run means that in theory we shouldn't have to make any changes to the underlying scripts that call those commands.

The thing is, those scripts don't really do anything else other than call those commands, which means that all the real logic is being contained within configuration files - and it just makes stepping through the logic harder than it would have been before.

My understanding of the quickstart is that it acts as a stable upstream from which we can pull consistently and therefore keep some semblance of co-ordination between our projects. But I don't think it's meant to take away our ability to write and modify code. If that is meant to be the case then I'd suggest those make scripts belong in a separate repository and should be included via some kind of dependency manager (npm/composer)

I'll give you an example that hurt my head:

  • bitbucket-pipelines.yml calls make pipelines-build-frontend
  • which is defined in the Makefile and calls a script in ./scripts/make/build-frontend.sh
  • which then reads options from .build.env
  • and actually if you look at the script, it's just running two commands if a condition is met and those two commands are defined. You could, generically, rewrite this as:
function  (shouldRun, command1, command2) {
  if (shouldRun) {
    command1 && command1();
    command2 && command2();
  }

My point is, having that ^ bit out of my control, but letting me define what shouldRun, command1, and command2 are is limiting. I think it'd be better if we just supplied a sensible default script in our quickstart, and then allow it to be changed if necessary, knowing that any time that we want to merge with the quickstart it is going to require a manual process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions