Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename project in DevBuddy #108

Merged
merged 11 commits into from
Jun 5, 2018
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
tests:
docker:
- image: circleci/golang:1.10.2
working_directory: /go/src/github.com/pior/dad
working_directory: /go/src/github.com/devbuddy/devbuddy
steps:
- checkout
- run: dep ensure
Expand All @@ -12,7 +12,7 @@ jobs:
integration-tests:
docker:
- image: circleci/golang:1.10.2
working_directory: /go/src/github.com/pior/dad
working_directory: /go/src/github.com/devbuddy/devbuddy
steps:
- checkout
- run: dep ensure
Expand All @@ -35,7 +35,7 @@ jobs:
lint:
docker:
- image: circleci/golang:1.10.2
working_directory: /go/src/github.com/pior/dad
working_directory: /go/src/github.com/devbuddy/devbuddy
steps:
- checkout
- run: dep ensure
Expand All @@ -46,7 +46,7 @@ jobs:
deploy-release:
docker:
- image: circleci/golang:1.10.2
working_directory: /go/src/github.com/pior/dad
working_directory: /go/src/github.com/devbuddy/devbuddy
steps:
- checkout
- run: dep ensure
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
.glide/
vendor

dad
bud
dist/
2 changes: 1 addition & 1 deletion DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ Initialize the shell:

```bash
# DAD_DEBUG=1
eval "$(dad --init)"
eval "$(bud --init)"
```
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Dad
# DevBuddy

[![Go Report Card](https://goreportcard.com/badge/github.com/pior/dad)](https://goreportcard.com/report/github.com/pior/dad)
[![CircleCI](https://circleci.com/gh/pior/dad.svg?style=svg)](https://circleci.com/gh/pior/dad)
[![GitHub Release](https://img.shields.io/github/release/pior/dad.svg)](https://github.com/pior/dad/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/pior/dad.svg)](https://github.com/pior/dad/releases/latest)
[![Go Report Card](https://goreportcard.com/badge/github.com/devbuddy/devbuddy)](https://goreportcard.com/report/github.com/devbuddy/devbuddy)
[![CircleCI](https://circleci.com/gh/devbuddy/devbuddy.svg?style=svg)](https://circleci.com/gh/devbuddy/devbuddy)
[![GitHub Release](https://img.shields.io/github/release/devbuddy/devbuddy.svg)](https://github.com/devbuddy/devbuddy/releases/latest)
[![GitHub Release Date](https://img.shields.io/github/release-date/devbuddy/devbuddy.svg)](https://github.com/devbuddy/devbuddy/releases/latest)

## What is this?

**Dad** is an open-source implementation of an amazing internal tool developed at
**DevBuddy** is an open-source implementation of an amazing internal tool developed at
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a mention here saying something like previously known as "dad" what do you think?

[Shopify](https://engineering.shopify.com) 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:
With **DevBuddy**, pushing a change on a project you never touched look like this:

- `dad clone pior/dad`
- `dad up`
- `bud clone devbuddy/devbuddy`
- `bud up`
- `git commit`
- `dad test`
- `bud test`
- `git push`

## Status and progress

**Dad** is mostly useful for Python and Go projects. More languages will be natively
supported. Additional automatic tasks will also be implemented, making **Dad** also
**DevBuddy** is mostly useful for Python and Go projects. More languages will be natively
supported. Additional automatic tasks will also be implemented, making **DevBuddy** also
useful for languages without native support.

See the project config [documentation](docs/Config.md).
Expand Down Expand Up @@ -54,7 +54,7 @@ Others
- Notification when important files (eg: `requirements.txt`) are updated locally
(eg: by `git pull`)
- A `help` command to guide a new developer based on `dev.yml`
- A `upgrade` command to auto-upgrade **Dad**
- A `upgrade` command to auto-upgrade **DevBuddy**

### Hosting platform:

Expand All @@ -72,24 +72,24 @@ Others
## Install

```bash
$ bash -c "$(curl -sL https://raw.githubusercontent.com/pior/dad/master/install.sh)"
$ bash -c "$(curl -sL https://raw.githubusercontent.com/devbuddy/devbuddy/master/install.sh)"
```

Uninstall it:
```bash
$ sudo rm /usr/local/bin/dad
$ sudo rm /usr/local/bin/bud
```

## Setup

★ Install the shell integration (in `~/.bash_profile`):
```bash
eval "$(dad --shell-init --with-completion)"
eval "$(bud --shell-init --with-completion)"
```

A safer version:
```bash
type dad > /dev/null 2> /dev/null && eval "$(dad --shell-init --with-completion)"
type bud > /dev/null 2> /dev/null && eval "$(bud --shell-init --with-completion)"
```

## Usage
Expand All @@ -112,13 +112,13 @@ commands:
desc: Lint the project
run: script/lint
```
See Dad own [dev.yml](dev.yml)
See DevBuddy own [dev.yml](dev.yml)

```bash
$ dad
$ bud
Usage:
dad [flags]
dad [command]
bud [flags]
bud [command]

Available Commands:
cd Jump to a local project
Expand All @@ -131,12 +131,12 @@ Available Commands:
up Ensure the project is up and running

Flags:
-h, --help help for dad
-h, --help help for bud
--shell-init Shell initialization
--version version for dad
--version version for bud
--with-completion Enable completion during initialization

Use "dad [command] --help" for more information about a command.
Use "bud [command] --help" for more information about a command.
```

## Development
Expand All @@ -145,7 +145,7 @@ Use "dad [command] --help" for more information about a command.
```bash
~ $ mkdir -p ~/src/github.com/pior
~ $ cd ~/src/github.com/pior
~/src/github.com/pior $ git clone git@github.com:pior/dad.git
~/src/github.com/pior $ git clone git@github.com:devbuddy/devbuddy.git
```

★ Fetch the dependencies (in `vendor`)
Expand All @@ -162,17 +162,17 @@ Use "dad [command] --help" for more information about a command.

To show the debug messages, add this before in your environment:
```bash
export DAD_DEBUG=1
export BUD_DEBUG=1
```
Or:
```bash
$ dad-enable-debug # dad-disable-debug
$ bud-enable-debug # bud-disable-debug
```

### Release

```bash
$ dad release 1.0.0
$ bud release 1.0.0
```

The big idea:
Expand All @@ -184,8 +184,8 @@ Expected:
1. The CI process will test the release
2. The CI process will publish macOS/Linux binaries to the Github Releases page

Updating the [install.sh](https://github.com/pior/dad/blob/master/install.sh) script is probably a good idea.
Updating the [install.sh](https://github.com/devbuddy/devbuddy/blob/master/install.sh) script is probably a good idea.

## License

[MIT](https://github.com/pior/dad/blob/master/LICENSE)
[MIT](https://github.com/devbuddy/devbuddy/blob/master/LICENSE)
18 changes: 9 additions & 9 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ up:
commands:
testup:
desc: Build, install and run the development version
run: go install && dad up
run: go install && bud up

test:
desc: Run the unittests
Expand All @@ -32,25 +32,25 @@ commands:
run: script/test && script/integration_test && script/lint

release:
desc: Create a new release (dad release [VERSION])
desc: Create a new release (bud release [VERSION])
run: script/release

godoc:
desc: Starting GoDoc server on http://0.0.0.0:6060
run: (sleep 1; open http://0.0.0.0:6060)& godoc -http=:6060

install-dev:
desc: Install dad in the GOROOT
desc: Install bud in the GOROOT
run: |
go install -ldflags "-X main.Version=$(git describe --tags --dirty --always)"
[ -e "/usr/local/bin/dad" ] && sudo rm /usr/local/bin/dad || true
[ -e "/usr/local/bin/bud" ] && sudo rm /usr/local/bin/bud || true

install-release:
desc: Remove all dad binaries and install a released version
desc: Remove all bud binaries and install a released version
run: |
[ -e "/usr/local/bin/dad" ] && sudo rm -v /usr/local/bin/dad
[ -e "$GOPATH/bin/dad" ] && sudo rm -v $GOPATH/bin/dad
bash -c "$(curl -sL https://raw.githubusercontent.com/pior/dad/master/install.sh)"
[ -e "/usr/local/bin/bud" ] && sudo rm -v /usr/local/bin/bud
[ -e "$GOPATH/bin/bud" ] && sudo rm -v $GOPATH/bin/bud
bash -c "$(curl -sL https://raw.githubusercontent.com/devbuddy/devbuddy/master/install.sh)"

open:
milestone: https://github.com/pior/dad/milestone/1
milestone: https://github.com/devbuddy/devbuddy/milestone/1
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eu

VERSION="v0.3.0"
DEST="/usr/local/bin"
SHELL_LINE='eval "$(dad --shell-init --with-completion)"'
SHELL_LINE='eval "$(bud --shell-init --with-completion)"'

YELLOW="\033[1;33m"
BLUE="\033[1;34m"
Expand Down Expand Up @@ -41,22 +41,22 @@ header() {

banner() {
echo ""
echo -e "${YELLOW}Welcome to Dad installer!${RESET}"
echo -e "${YELLOW}Welcome to DevBuddy installer!${RESET}"
}

instructions() {
echo ""
echo -e "${YELLOW}Good!${RESET}\n"
echo -e "${WHITE}Now, all you need is to add this to your bash .profile:${RESET}\n"
echo -e " ${CODE}" ${SHELL_LINE} "${RESET}\n"
echo -e "Report any issue to ${LINK}https://github.com/pior/dad/issues${RESET}\n"
echo -e "Report any issue to ${LINK}https://github.com/devbuddy/devbuddy/issues${RESET}\n"
}

main() {
banner

header "Downloading binary from Github"
URL="https://github.com/pior/dad/releases/download/${VERSION}/dad-$(make_variant)"
URL="https://github.com/devbuddy/devbuddy/releases/download/${VERSION}/bud-$(make_variant)"
TMPFILE=`mktemp`
curl -L -# --fail "${URL}" -o "${TMPFILE}"

Expand All @@ -68,7 +68,7 @@ main() {
read -p "Correct? [enter]"

header "Installing to ${DEST}"
sudo install "${TMPFILE}" "${DEST}/dad"
sudo install "${TMPFILE}" "${DEST}/bud"

[[ -e "${TMPFILE}" ]] && unlink "${TMPFILE}"

Expand Down
2 changes: 1 addition & 1 deletion dad.go → main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/pior/dad/pkg/cmd"
"github.com/devbuddy/devbuddy/pkg/cmd"
)

var Version = "devel" // replaced by build flag
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/cd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/pior/dad/pkg/config"
"github.com/pior/dad/pkg/integration"
"github.com/pior/dad/pkg/project"
"github.com/pior/dad/pkg/termui"
"github.com/devbuddy/devbuddy/pkg/config"
"github.com/devbuddy/devbuddy/pkg/integration"
"github.com/devbuddy/devbuddy/pkg/project"
"github.com/devbuddy/devbuddy/pkg/termui"
)

var cdCmd = &cobra.Command{
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/pior/dad/pkg/config"
"github.com/pior/dad/pkg/integration"
"github.com/pior/dad/pkg/project"
"github.com/pior/dad/pkg/termui"
"github.com/devbuddy/devbuddy/pkg/config"
"github.com/devbuddy/devbuddy/pkg/integration"
"github.com/devbuddy/devbuddy/pkg/project"
"github.com/devbuddy/devbuddy/pkg/termui"
)

var cloneCmd = &cobra.Command{
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/spf13/cobra"

"github.com/pior/dad/pkg/config"
"github.com/pior/dad/pkg/executor"
"github.com/pior/dad/pkg/project"
"github.com/pior/dad/pkg/termui"
"github.com/devbuddy/devbuddy/pkg/config"
"github.com/devbuddy/devbuddy/pkg/executor"
"github.com/devbuddy/devbuddy/pkg/project"
"github.com/devbuddy/devbuddy/pkg/termui"
)

func customCommandRun(cmd *cobra.Command, args []string) error {
Expand Down
8 changes: 4 additions & 4 deletions pkg/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/pior/dad/pkg/config"
"github.com/pior/dad/pkg/integration"
"github.com/pior/dad/pkg/project"
"github.com/pior/dad/pkg/termui"
"github.com/devbuddy/devbuddy/pkg/config"
"github.com/devbuddy/devbuddy/pkg/integration"
"github.com/devbuddy/devbuddy/pkg/project"
"github.com/devbuddy/devbuddy/pkg/termui"
)

var createCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package cmd
import (
"fmt"

"github.com/pior/dad/pkg/tasks"
"github.com/devbuddy/devbuddy/pkg/tasks"

"github.com/spf13/cobra"

"github.com/pior/dad/pkg/project"
"github.com/devbuddy/devbuddy/pkg/project"
)

var inspectCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/spf13/cobra"

"github.com/pior/dad/pkg/helpers"
"github.com/pior/dad/pkg/project"
"github.com/devbuddy/devbuddy/pkg/helpers"
"github.com/devbuddy/devbuddy/pkg/project"
)

var openCmd = &cobra.Command{
Expand Down