kyleburton / bake

Pure bash, very lightweight scripting and build framework.
29 stars 8 forks source link

allow bake_require to find fully or locally pathed files, or local to the Bakefile #28

Closed kyleburton closed 6 years ago

kyleburton commented 6 years ago

I'd like bake to take . off of the BAKEPATH by default and to support a few approaches to finding file system based requires. I'd like bake to ...

... support fully pathed requires:

bake_require "$(bake_bakefile_dir)/bake/utils.sh"
bake_require "$(bake_bakefile_dir)/bake/docker.sh"
bake_require "$(bake_bakefile_dir)/bake/db.sh"
bake_require "$(bake_bakefile_dir)/bake/migrations.sh"
bake_require "$(bake_bakefile_dir)/bake/aws.sh"

... relatively pathed requires

bake_require "../shared-bake/utils.sh"
bake_require "../shared-bake/docker.sh"
bake_require "../shared-bake/db.sh"
bake_require "../shared-bake/migrations.sh"
bake_require "../shared-bake/aws.sh"

... and paths local to the bakefile

bake_require "./bake/utils.sh"
bake_require "./bake/docker.sh"
bake_require "./bake/db.sh"
bake_require "./bake/migrations.sh"
bake_require "./bake/aws.sh"