Flexible automation in Racket
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
858 B

6 years ago
Bolt
====
6 years ago
Bolt is an automation DSL, similar to [http://fabfile.org](http://fabfile.org)
5 years ago
It runs tasks concurrently. It is currently only experimental but can be used
for basic tasks.
### Installation
```
git clone git@github.com:weskerfoot/Bolt.git
raco pkg install ./bolt
```
6 years ago
Example:
```
#! /usr/bin/env racket
#lang racket
(require bolt)
6 years ago
; This is based on an entry in ~/.ssh/config
(define metaverse
(remote
#:host "hostname"
#:user "alice"
#:key "/home/alice/.ssh/id_rsa.key"))
(define (deploy)
(with-host metaverse
(with-shell-vars
(["FOO" "BAR"])
(become "alice"
6 years ago
(copy-dir "../mycode" "/home/alice/mycode")
6 years ago
(with-cwd "/home/alice/mycode"
6 years ago
(become "root"
(exec "pip install pipenv"))
6 years ago
(with-cwd "project"
(exec "pipenv install")))))))
6 years ago
(deploy)
```