Project

doit

0.0
Low commit activity in last 3 years
No release in over a year
Run good old shell/bash scripts locally or remotely(ssh).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0

Runtime

 Project Readme

Doit

Gem Version GEM Downloads rake Ruby Style Guide MIT License

Executes good old shell/bash scripts locally as well as remotely. The environment is set by a ".yml" configuration file. An array environment variable triggers multiple calls of the script.

The "where" in the configuration indicates where to run the script.

See examples below.

Installation

gem install doit

Usage

doit script... [options]
doit push
doit deploy tag

Options

-l, --[no-]list          Lists available scripts
-r, --remote ["host"]    remote host or comma separated hosts
-e, --[no-]each          Lists each remote command (no execution)
-s, --[no-]silent        run silently; suppress output
-v, --[no-]verbose       Enable verbose output
-n, --[no-]noop          Suppress execution of commannds
-h, --help               Show this message
-V, --version            Print version

File Structure

~/.doit/deploy          # chmod +x .doit/deploy
~/.doit/deploy.yml
$PROJ/.doit/deploy.yml  # overwrites $HOME(~/) script/configuration
$PROJ/.doit/push        # chmod +x .doit/push
$PROJ/.doit/push.yml

$PROJ/.doit/push

#! /bin/sh
if ! (git status | grep 'nothing to commit'); then
  echo "push: commits are pending"
  exit 1
fi

current_branch=`git rev-parse --abbrev-ref HEAD`
echo "**** branch is '$current_branch'"

case $current_branch in
development)
  git checkout master && git merge --no-ff development &&
git push origin master
  git checkout development
  ;;
master)
  git push origin master
  ;;
esac

~/.doit/deploy

uname -a
git status

~/.doit/deploy.yml

env:
  - DIR=tmp OPTION=run
  - DIR=proj OPTION=list
where:
  - bob@sample.com
  - alice@customer.com

License

Copyright (c) 2014-2025 Dittmar Krall (www.matiq.com), released under the MIT license.