Dad 👴

What is this?
Dad is an open-source implementation of an amazing internal tool developed at
Shopify called "Dev".
The first goal of this tools is to automate the setup tasks required to work on a project.
With Dad, pushing a change on a project you never touched look like this:
dad clone Shopify/sarama
dad up
- Commit your changes
dad test
git push
Status and progress
Dad will start as a highly compatible implementation of Dev (when possible).
Overall, Dad is a working prototype, core features are being implemented.
Tasks:
Python:
- Python (version + virtualenv): working
- Pip (requirements file): minimal
- Pipenv (support for Pipfile): minimal
Go:
- Go (version): planned
- Dep (support for Go Dep): planned
Others
- Custom (conditional sub-command): working
- Docker Compose (manage a docker-compose setup): planned
Automatic environment:
- Virtualenv: working
- Go: planned
Hosting platform:
- Github: working
- Any git remote-url: planned
- Gitlab: planned
- Bitbucket (with Git): planned
Shell integration
- Bash: working
- Zsh: planned
- Fish: planned
Install
$ bash -c "$(curl -L https://raw.githubusercontent.com/pior/dad/master/install.sh)"
Uninstall
$ sudo rm /usr/local/bin/dad
Setup
★ Install the shell integration (in ~/.bash_profile):
eval "$(dad --shell-init --with-completion)"
A safer version:
type dad > /dev/null 2> /dev/null && eval "$(dad --shell-init --with-completion)"
Usage
★ Add a dev.yml file in your project:
up:
- go: 1.9.2
- python: 3.6.4rc1
- pip:
- requirements.txt
- custom:
met?: brew info upx 2> /dev/null > /dev/null
meet: brew install upx
- custom:
met?: dep status 2> /dev/null > /dev/null
meet: dep ensure
commands:
test:
desc: Run the tests
run: script/test
lint:
desc: Lint the project
run: script/lint
docserve:
desc: Starting GoDoc server on http://0.0.0.0:6060
run: godoc -http=:6060
See Dad own dev.yml
$ dad
Usage:
dad [flags]
dad [command]
Available Commands:
cd Jump to a local project
clone Clone a project from github.com
help Help about any command
lint Custom
test Custom: Run tests
up Ensure the project is up and running
Flags:
-h, --help help for dad
--shell-init Shell initialization
--with-completion Enable completion during initialization
Use "dad [command] --help" for more information about a command.
Development
★ Clone the repository:
~ $ mkdir -p ~/src/github.com/pior
~ $ cd ~/src/github.com/pior
~/src/github.com/pior $ git clone git@github.com:pior/dad.git
★ Fetch the dependencies (in vendor)
~/src/github.com/pior $ dep ensure
★ Install the go executable somewhere in your PATH:
~/src/github.com/pior $ go install
Debugging
To show the debug messages, add this before in your environment:
export DAD_DEBUG=1
Release
$ script/release v1.0.0
The big idea:
- Create a release commit to ensure the release is visible in the git log
- Create an annotated tag
- Push the commit and tag upstream
Expected:
- The CI process will test the release
- The CI process will publish macOS/Linux binaries to the Github Releases page
Updating the install.sh script is probably a good idea.
License
MIT