Fake - Fancy automation & build tool
Fancy Ruby
Latest commit ac017c2 Nov 23, 2012 @bakkdoor bakkdoor bump version to 0.1.4
Failed to load latest commit information.
bin got basic tasks working. Apr 27, 2012
examples got basic tasks working. Apr 27, 2012
lib bump version to 0.1.4 Nov 23, 2012
tests add some Task tests May 16, 2012
.gitignore initial commit Apr 27, 2012
Fakefile some bugfixes and updates to README Apr 27, 2012
LICENSE added LICENSE Apr 27, 2012
README.md Updated README Apr 27, 2012
fake.fancypack bump version to 0.1.4 Nov 23, 2012

README.md

Fake - Fancy Make

Fake is a build and automation tool for Fancy, similar to Ruby's Rake. You write your tasks in pure Fancy code, by default saving them to Fakefiles.

A standard collection of common Fake tasks will be added soon.

Installation

To install Fake use Fancy's built-in package system:

$ fancy install fancy-lang/fake

Also make sure that ~/.fancy/packages/bin is in your $PATH environment variable. Set it in your ~/.bash_profile or similar:

export PATH=$PATH:~/.fancy/packages/bin

Tasks

Fake allows the definition of tasks that may depend on other tasks to complete.

Given a Fakefile with the following contents:

Fake tasks: {
  clean: {
    desc: "Remove all *.fyc files"
    run: {
      sh: ("rm", "-rf", Directory list: "**/*.fyc") verbose: true
    }
  }
}

You can invoke it like so:

$ fake clean

To list all available tasks run:

$ fake -T
fake clean    |  Remove all *.fyc files

To see a list of general options use the help command:

$ fake --help

Namespaces

You can place tasks in namespaces by placing them inside a named block that doesn't contain its own run option:

Fake tasks: {
  namespace_a: {
    task_a: {
      run: {
        # ...
      }
    }
  }

  namespace_b: {
    task_b: {
      depends: 'namespace_a:task_a
      run: {
        # ...
      }
    }
  }
}

Specifying dependencies

You can specify dependencies via the depends option, like so:

Fake tasks: {
  task_a: {
    desc: "This task shall be run before task_b"
    run: {
      "Running task a" println
    }
  }

  task_b: {
    desc: "This tasks depends on task_a"
    depends: 'task_a # pass an array of task names if you depend on more than one task
    run: {
      "Running task b" println
    }
  }
}

When no task is specified the default task will be run (as with Rake).

Note:

This is still in the making. More features are coming soon, but defining basic tasks and dependencies between them works already.