All Projects → rumkin → Bake

rumkin / Bake

Bake is a bash task runner

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Bake

duty
A simple task runner.
Stars: ✭ 36 (+33.33%)
Mutual labels:  task, runner, task-runner
lets
CLI task runner for developers - a better alternative to make
Stars: ✭ 50 (+85.19%)
Mutual labels:  task, runner, task-runner
Drome
JavaScript task runner
Stars: ✭ 135 (+400%)
Mutual labels:  task, runner, task-runner
EasyJob
🔨 EasyJob - keep and execute your PowerShell and BAT scripts from one interface
Stars: ✭ 228 (+744.44%)
Mutual labels:  task, runner
Task Easy
A simple, customizable, and lightweight priority queue for promises.
Stars: ✭ 244 (+803.7%)
Mutual labels:  task, runner
composer
API-first task runner with three methods: task, run and watch.
Stars: ✭ 35 (+29.63%)
Mutual labels:  task, task-runner
taskrunner
🍑 a configurable task runner written in go
Stars: ✭ 28 (+3.7%)
Mutual labels:  task, runner
rush
🏃‍♀️ Minimalistic CLI Tool for Managing and Running Bash Snippets
Stars: ✭ 35 (+29.63%)
Mutual labels:  task, task-runner
taskit
A Task Runner in Bash
Stars: ✭ 35 (+29.63%)
Mutual labels:  task, runner
tasuku
✅ タスク — The minimal task runner for Node.js
Stars: ✭ 1,488 (+5411.11%)
Mutual labels:  task, runner
concurrent-tasks
A simple task runner which will run all tasks till completion, while maintaining concurrency limits.
Stars: ✭ 27 (+0%)
Mutual labels:  task, task-runner
Phulp
The task manager for php
Stars: ✭ 294 (+988.89%)
Mutual labels:  task, task-runner
Dramatiq
A fast and reliable background task processing library for Python 3.
Stars: ✭ 2,844 (+10433.33%)
Mutual labels:  task, task-runner
Nake
Magic script-based C# task runner for .NET Core
Stars: ✭ 183 (+577.78%)
Mutual labels:  task, runner
nano-staged
Tiny tool to run commands for modified, staged, and committed files in a GIT repository.
Stars: ✭ 347 (+1185.19%)
Mutual labels:  task, runner
Maid
Markdown driven task runner.
Stars: ✭ 1,999 (+7303.7%)
Mutual labels:  task, runner
Tasker
Tasker is a multipurpose task runner
Stars: ✭ 160 (+492.59%)
Mutual labels:  task, task-runner
Runner
Simple, lightweight task runner for Bash.
Stars: ✭ 133 (+392.59%)
Mutual labels:  task, runner
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (+1733.33%)
Mutual labels:  task, task-runner
Task
A task runner / simpler Make alternative written in Go
Stars: ✭ 4,282 (+15759.26%)
Mutual labels:  task, task-runner

Bake

Bake is a modular task running tool written on pure bash.

Usage

All you need is to create bake.sh into root of your project. Run bake bake:init command. It will create empty bake.sh file and bake_modules directory.

Example bakefile:

# bake.sh

# Initialize new node package
task:hello() {
    echo 'Hello'
}

task:say_hello() {
    echo 'Hello again'
}

Now you can run tasks:

bake hello # -> Hello
bake say-hello # -> Hello again

Modules

Modular system is inspired by node.js and golang it uses bake_modules directory and url based package naming. Module requires with command bake:module. Module file could contain tasks and custom functions or variables.

Install module:

bake -i "github.com/rumkin/test_module"
ls bake_modules/github.com/rumkin/test_module # -> module.sh

This command will install module into directory bake_modules/github.com/rumkin/test_module.

Example:

# bake_modules/github.com/rumkin/test_module/module.sh
rumkin:test_module:print() {
  echo "Hello world"
}

# bake.sh
bake:module "github.com/rumkin/test_module"

task:run() {
    rumkin:test_module:print # -> Hello world
}

Git modules

Git module could be started with "http://" or "https://" and one of popular repository "github.com" or "bitbucket.org"

bake -i "https://github.com/rumkin/test_module"
tree bake_modules

Output:

bake_modules/
`-- github.com
    `-- rumkin
        `-- test_module
            `-- module.sh

Local modules

Local module must starts with ".", ".." or "/" and will be installed by it's base name. Example:

bake -i ../some-bake-module
ls bake_modules # -> some-bake-module

CLI arguments

  • -l – List tasks.
  • -e [environment] – Specify environment located in bake_env/${environment}.sh or output current environment variables.
  • -i <module> – Install module
  • -v – Print bake version.
  • -h – Print bake help.

Lookup and $PWD

Bake by default looking up the directory tree and search for .bakerc then bake.sh file. After that bake switch $PWD to the project's root. Calling directory will be stored in $CWD variable.

Example:

# example/bake.sh
task:pwd() {
    echo $PWD $CWD
}

task:ls() {
    ls .
}
cd example/nest
bake pwd # -> example example/nest
bake ls # -> bake.sh nest

Environment

Environments store in bake_env directory in shell files like dev.sh. Current environment lays at .env file. To dump current environment run bake -e. To switch environment run bake -e <env>. To use environment in current call run bake -e <env> <task>.

License

MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].