From 5516dec080f1def5600351be6266fc8fb19e79e3 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Sat, 5 May 2018 14:48:08 -0400 Subject: [PATCH] update README --- README.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 810b014..b2ab0c7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,36 @@ -bolt +Bolt ==== -README text here. + +Bolt is an automation DSL, similar to [http://fabfile.org](http://fabfile.org) + +Example: + +``` +#! /usr/bin/env racket +#lang racket + +(require "src/bolt.rkt") + +; 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" + (copy-dir "../myode" "/home/alice/mycode") + + (with-cwd "/home/alice/mycode" + + (become "root" + (exec "pip install pipenv")) + + (with-cwd "project" + (exec "pipenv install"))))))) +(deploy) +```