You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-21Lines changed: 15 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,21 @@ From `$GOPATH/src/github.com/aws/amazon-ecs-cli`:
8
8
* Run `make` (This creates a standalone executable in the `bin/local` directory).
9
9
10
10
From `$GOPATH/src/github.com/aws/amazon-ecs-cli/ecs-cli`:
11
-
* Run `godep restore` (This will download and install dependencies specified in the `Godeps/Godeps.json` into your `$GOPATH`).
12
-
***NOTE:**`godep restore` puts the dependencies in a detached HEAD state (see: [Updating an existing dependency](https://github.com/aws/amazon-ecs-cli/blob/master/README.md#updating-an-existing-dependency)).
13
-
14
-
### Adding new dependencies
15
-
* Make sure you have the latest [godep](https://github.com/tools/godep) (`go get -u github.com/tools/godep`) (version 79)
16
-
*`go get` the new dependency.
17
-
* Edit your application's source code to import the new dependency.
18
-
* From `$GOPATH/src/github.com/aws/amazon-ecs-cli/ecs-cli`, run `godep save ./...` (This will update `Godeps/Godeps.json` and copy the dependencies source to the `vendor/` directory).
19
-
20
-
### Updating an existing dependency
21
-
* While godep recommends using `godep update`, this command unfortunately has several known issues (See: https://github.com/tools/godep/issues/498). We recommend following their [suggestion](https://github.com/tools/godep/issues/498#issuecomment-238946586):
22
-
1. Delete any reference to the package in `Godeps/Godeps.json` (you can also delete the entire `Godeps` dir).
23
-
1. Delete the package from the `/vendor` dir: `rm -rf $GOPATH/src/github.com/aws/amazon-ecs-cli/ecs-cli/vendor/<package>`. (You can also delete the entire vendor dir)
24
-
1. Re-vendor the dependency by running `godep save ./...` from `$GOPATH/src/github.com/aws/amazon-ecs-cli/ecs-cli`.
25
-
26
-
* Inspect the changes with `git diff` (should show up in `vendor/` directory)
***NOTE:** Unfortunately, using `godep restore` means that `go get` will not work with dependencies. Until we move off `godep`, when we want to update a dependency we will have to go to the dependency in the `$GOPATH` and manually use `git pull` an update to that package.
29
-
30
-
### Generating mocks
31
-
* From `$GOPATH/src/github.com/aws/amazon-ecs-cli/`, run `make generate`. This will look for all files named `generate_mock.go` in the `ecs-cli/modules` directory and call the `mockgen.sh` script, which is a wrapper for the [mockgen](https://github.com/golang/mock#running-mockgen) command.
11
+
* run `dep ensure && dep prune`. This will download dependencies specified in the `Gopkg.lock` by default in `$GOPATH/pkg/dep/sources`.
12
+
***NOTE:**`dep ensure` puts the dependencies in a detached HEAD state.
13
+
***NOTE:**`dep prune` deletes any unused vendor files.
14
+
15
+
### Adding/updating new dependencies
16
+
* We use [dep](https://github.com/golang/dep) to manage dependencies. Make sure you have version 0.3.2 of [dep](https://github.com/golang/dep/releases/tag/v0.3.2) (installation instructions [here](https://golang.github.io/dep/docs/installation.html)).
17
+
* To [add a dependency](https://golang.github.io/dep/docs/daily-dep.html#adding-a-new-dependency), run `dep ensure -add <your_package>`.
18
+
* To [update a dependency](https://golang.github.io/dep/docs/daily-dep.html#updating-dependencies), run `dep ensure -update<your_package>`.
19
+
20
+
### Generating mocks/licenses
21
+
* From `$GOPATH/src/github.com/aws/amazon-ecs-cli/`, run `make generate`. This
22
+
will look for all files named `generate_mock.go` in the `ecs-cli/modules`
23
+
directory and call the `scripts/mockgen.sh` script, which is a wrapper for the
0 commit comments