Skip to content

Commit

Permalink
updated *.md due to migrate to dep
Browse files Browse the repository at this point in the history
  • Loading branch information
ycliuhw committed Aug 9, 2018
1 parent 785ab34 commit 471295c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 44 deletions.
36 changes: 18 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,48 +133,48 @@ Dependency management
=====================

In the top-level directory of the juju repo, there is a file,
[dependencies.tsv](dependencies.tsv), that holds the revision ids of all
[Gopkg.lock](Gopkg.lock), that holds the revision ids of all
the external projects that juju depends on. That file is used to freeze
the code in external repositories so that juju is insulated from changes
to those repos.

godeps
dep
------

[godeps](https://launchpad.net/godeps) is the tool that does the freezing.
After getting the juju code, you need to get `godeps`:
[dep](https://golang.github.io/dep) is the tool that does the freezing.
After getting the juju code, you need to get `dep`:

```shell
go get github.com/rogpeppe/godeps
go get github.com/golang/dep
```

This installs the `godeps` application. You can then run `godeps` from the
This installs the `dep` application. You can then run `dep` from the
root of juju, to set the revision number on the external repositories:

```shell
cd $GOPATH/src/github.com/juju/juju
godeps -u dependencies.tsv
make dep
```

Now you are ready to build, run, test, etc.

Staying up-to-date
------------------

The [dependencies.tsv](dependencies.tsv) file can get out of date, for
example when you switch to another branch. When it is out of date, run
`godeps`. In practice, you can wait until you get a compile error about
The [Gopkg.lock](Gopkg.lock) file can get out of date, for
example when you made change to Gopkg.toml. When it is out of date, run
`dep`. In practice, you can wait until you get a compile error about
an external package not existing/having an incorrect API, and then rerun
`godeps`.
`dep ensure -v`.

Updating dependencies
---------------------

If you update a repo that juju depends on, you will need to recreate
`dependencies.tsv`:
`Gopkg.lock`:

```shell
make rebuild-dependencies.tsv
make rebuild-dependencies [dep-update=true]
```


Expand Down Expand Up @@ -379,7 +379,7 @@ Static Analysis of the code is provided by [gometalinter](https://github.com/ale

The Static Analysis runs every linter in parallel over the juju code base with
the aim to spot any potential errors that should be resolved. As a default all
the linters are disabled and only a selection of linters are run on each pass.
the linters are disabled and only a selection of linters are run on each pass.
The linters that are run, are known to pass with the state of the current code
base.

Expand All @@ -391,14 +391,14 @@ repo:
./scripts/gometalinter.bash
```

If you already have the git hook installed for pre-pushing, then the linters
If you already have the git hook installed for pre-pushing, then the linters
will also run during that check.

Adding new linters can be done, by editing the `./scripts/gometalinter.bash`
Adding new linters can be done, by editing the `./scripts/gometalinter.bash`
file to also including/removing the desired linters.

Additionally to turn off the linter check for pushing or verifying then
setting the environment variable `IGNORE_GOMETALINTER` before hand will cause
Additionally to turn off the linter check for pushing or verifying then
setting the environment variable `IGNORE_GOMETALINTER` before hand will cause
this to happen.


Expand Down
10 changes: 4 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 8 additions & 18 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,9 @@
revision = "958d8b71e5ffa51212133b12a998ddf8362739df"
name = "github.com/juju/romulus"

# [[constraint]]
# revision = "72703b1e95eb8ce4737fd8a3d8496c6b0be280a6"
# name = "github.com/juju/testing"

[[override]]
[[constraint]]
revision = "e5d2ee5c1563c66bbef3fe488ed11457a614f50d"
name = "github.com/juju/testing"
source = "github.com/ycliuhw/testing"
revision = "d0460fabb378bd245cb89d3b58ba34521dcb41d9"

[[constraint]]
revision = "c746c6e86f4fb2a04bc08d66b7a0f7e900d9cbab"
Expand Down Expand Up @@ -294,14 +289,9 @@
name = "github.com/juju/collections"
revision = "9be91dc79b7c185fa8b08e7ceceee40562055c83"

# [[constraint]]
# name = "github.com/juju/errors"
# revision = "1b5e39b83d1835fa480e0c2ddefb040ee82d58b3"

[[override]]
[[constraint]]
name = "github.com/juju/errors"
source = "github.com/ycliuhw/errors"
revision = "cac99a642e9921d21b87cbea5fbdf2f8d5bb1945"
revision = "22422dad46e14561a0854ad42497a75af9b61909"

[[constraint]]
name = "github.com/juju/go-oracle-cloud"
Expand Down Expand Up @@ -407,10 +397,6 @@
name = "github.com/masterzen/winrm"
revision = "7a535cd943fccaeed196718896beec3fb51aff41"

# [[constraint]]
# name = "gopkg.in/macaroon.v2"
# revision = "bed2a428da6e56d950bed5b41fcbae3141e5b0d0"

[[constraint]]
name = "gopkg.in/macaroon.v2-unstable"
revision = "66ab28d0d56f39a383f7cf5cf3ac9a4e9ab32865"
Expand Down Expand Up @@ -590,3 +576,7 @@
# [[constraint]]
# name = "gopkg.in/tomb.v1"
# revision = "dd632973f1e7218eb1089048e0798ec9ae7dceb8"

# [[constraint]]
# name = "gopkg.in/macaroon.v2"
# revision = "bed2a428da6e56d950bed5b41fcbae3141e5b0d0"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ It is advisable, when installing `juju` from source, to look at the [Makefile](.

Juju needs some dependencies in order to be installed and the preferred way to
collect the necessary packages is to use the provided `Makefile`.
The target `godeps` will download the go packages listed in `dependencies.tsv`. The following bash code will install the dependencies.
The target `dep` will download the go packages listed in `Gopkg.lock`. The following bash code will install the dependencies.

cd $GOPATH/src/github.com/juju/juju
export JUJU_MAKE_GODEPS=true
make godeps
make dep

### *Runtime Dependencies*

Expand Down

0 comments on commit 471295c

Please sign in to comment.