|
1 | 1 | # Rig - Outrigger CLI [](https://travis-ci.org/phase2/rig) |
2 | 2 |
|
3 | | -> A CLI for managing the Outrigger container-driven development stack. |
| 3 | +> A CLI for managing the Outrigger's container-driven development stack. |
4 | 4 |
|
5 | 5 | See the [documentation for more details](http://docs.outrigger.sh). |
| 6 | +See the [CONTRIBUTING.md](./CONTRIBUTING.md) for developer documentation. |
6 | 7 |
|
7 | | -Use this readme when you want to develop the Outrigger CLI. |
| 8 | +## Built on Dependencies |
8 | 9 |
|
9 | | -Setup |
10 | | ------- |
11 | | - |
12 | | -Install go from homebrew using the flag to include common cross-compiler targets (namely Darwin, Linux, and Windows) |
13 | | - |
14 | | -```bash |
15 | | -brew install go --with-cc-common |
16 | | -brew install dep |
17 | | -brew tap goreleaser/tap |
18 | | -brew install goreleaser/tap/goreleaser |
19 | | -``` |
20 | | - |
21 | | -Setup `$GOPATH` and `$PATH` in your favorite shell (`~/.bashrc` or `~/.zshrc`) |
22 | | - |
23 | | -```bash |
24 | | -export GOPATH=$HOME/Projects |
25 | | -export PATH=$PATH:$GOPATH/bin |
26 | | -``` |
27 | | - |
28 | | -Checkout the code into your `$GOPATH` in `$GOPATH/src/github.com/phase2/rig` |
29 | | - |
30 | | -Get all the dependencies |
31 | | - |
32 | | -```bash |
33 | | -# Install the project dependencies into $GOPATH |
34 | | -cd $GOPATH/src/github.com/phase2/rig |
35 | | -dep ensure |
36 | | -``` |
37 | | - |
38 | | -Developing Locally |
39 | | -------------------- |
40 | | - |
41 | | -If you want to build `rig` locally for your target platform, simply run the following command: |
42 | | - |
43 | | -```bash |
44 | | -GOARCH=amd64 GOOS=darwin go build -o build/darwin/rig cmd/main.go |
45 | | -``` |
46 | | - |
47 | | -This command targets an OS/Architecture (Darwin/Mac and 64bit) and puts the resultant file in the `build/darwin/` |
48 | | -with the name `rig`. Change `GOARCH` and `GOOS` if you need to target a different platform |
49 | | - |
50 | | -Developing with Docker |
51 | | ------------------------ |
52 | | - |
53 | | -You can use the Docker integration within this repository to facilitate development in lieu of setting up a |
54 | | -local golang environment. Using docker-compose, run the following commands: |
55 | | - |
56 | | -```bash |
57 | | -docker-compose run --rm install |
58 | | -docker-compose run --rm compile |
59 | | -``` |
60 | | - |
61 | | -This will produce a working OSX binary at `build/darwin/rig`. |
62 | | - |
63 | | -If you change a dependency in `Gopkg.toml` you can update an individual package dependency with: |
64 | | - |
65 | | -```bash |
66 | | -docker-compose run --rm update [package] |
67 | | -``` |
68 | | - |
69 | | -If you want to update all packages use: |
70 | | - |
71 | | -```bash |
72 | | -docker-compose run --rm update |
73 | | -``` |
| 10 | +We make use of a few key libraries to do all the fancy stuff that the `rig` CLI will do. |
74 | 11 |
|
| 12 | + * https://github.com/urfave/cli |
| 13 | + * The entire CLI framework from helps text to flags. |
| 14 | + This was an easy cli to build b/c of this library. |
| 15 | + * https://github.com/fatih/color |
| 16 | + * All the fancy terminal color output |
| 17 | + * https://github.com/bitly/go-simplejson |
| 18 | + * The JSON parse and access library used primarily with the output |
| 19 | + of `docker-machine inspect` |
| 20 | + * https://gopkg.in/yaml.v2 |
| 21 | + * The YAML library for parsing/reading YAML files |
| 22 | + * https://github.com/martinlindhe/notify |
| 23 | + * Cross-platform desktop notifications |
75 | 24 |
|
76 | | -Release |
77 | | -------- |
| 25 | +## Release Instructions |
78 | 26 |
|
79 | 27 | We use [GoReleaser](https://goreleaser.com) to handle nearly all of our release concerns. GoReleaser will handle |
80 | 28 |
|
81 | 29 | * Building for all target platforms |
82 | | -* Create a GitHub release on our project page based on tag |
83 | | -* Create archive file for each target platform and attach it to the GitHub release |
84 | | -* Update the Homebrew formula and publish it |
85 | | -* Create .deb and .rpm packages for linux installations |
| 30 | +* Creating a GitHub release on our project page based on tag |
| 31 | +* Creating archive files for each target platform and attach it to the GitHub release |
| 32 | +* Creating .deb and .rpm packages for linux installations and attaching those to the GitHub release |
| 33 | +* Updating the Homebrew formula and publish it |
| 34 | + |
| 35 | +### To create a new release of rig: |
86 | 36 |
|
87 | | -To create a new release of rig: |
88 | 37 | * Get all the code committed to `master` |
89 | | -* Tag master with the new version number |
| 38 | +* Tag master with the new version number `git tag 2.1.0 && git push --tags` |
90 | 39 | * Run `docker-compose run --rm goreleaser` |
91 | 40 | * ... |
92 | 41 | * Profit! |
93 | 42 |
|
| 43 | +### To create a new release candidate (RC) of rig: |
94 | 44 |
|
95 | | -Dependencies |
96 | | -------------- |
| 45 | +If we want to roll out an RC to GitHub for folks to test, we simply need to run with a different GoReleaser |
| 46 | +configuration that does not publish to homebrew, just to a GitHub release that is marked preproduction. |
97 | 47 |
|
98 | | -We make use of a few key libraries to do all the fancy stuff that the `rig` CLI will do. |
99 | | - |
100 | | - * https://github.com/urfave/cli |
101 | | - * The entire CLI framework from helps text to flags. This was an easy cli to build b/c of this library |
102 | | - * https://github.com/fatih/color |
103 | | - * All the fancy terminal color output |
104 | | - * https://github.com/bitly/go-simplejson |
105 | | - * The JSON parse and access library used primarily with the output of `docker-machine inspect` |
106 | | - * https://gopkg.in/yaml.v2 |
107 | | - * The YAML library for parsing/reading YAML files |
| 48 | +* Get all the code committed to `develop` |
| 49 | +* Tag develop with the new version number `git tag 2.1.0-rc1 && git push --tags` |
| 50 | +* Run `docker-compose run --rm goreleaser --config .goreleaser.rc.yml` |
| 51 | +* ... |
| 52 | +* Profit! |
0 commit comments