This repository contains packages that are used by both mozart-config-api
and mozart-template-api
.
They can be imported using import
statements:
import (
"github.com/bbc/mozart-api-common/caching"
)
Then, as with other dependencies, they are vendored into the local workspace by godep and the import statement is rewritten:
import (
"github.com/bbc/mozart-config-api/src/Godeps/_workspace/src/github.com/bbc/mozart-api-common/caching"
)
This section describes the workflow for making changes to packages in the mozart-api-common
repo and pulling those changes into mozart-config-api
and mozart-template-api
.
- Make sure you have
mozart-api-common
,mozart-config-api
andmozart-template
checked out in the appropriate location in your$GOPATH
. - Create new branches in all three repos to hold your work.
- Rewrite the relevant
import
statements in the APIs to use themozart-api-common
in your$GOPATH
, instead of inGodeps/
, e.g. changeimport "github.com/bbc/mozart-template-api/src/Godeps/_workspace/src/github.com/bbc/mozart-api-common/caching"
toimport "github.com/bbc/mozart-api-common/caching"
. - Make the required changes to the repos.
- Commit your changes to
mozart-api-common
. - Commit the changes to the API repos.
- Push your commits up to GitHub and create pull requests for the branches in each of the repos.
- On 🍰 approval merge your
mozart-api-common
changes into the master branch. - Pull these changes into the API repos by running
godep update github.com/bbc/mozart-api-common/...
andgodep save -r ./...
from theirsrc/
directories. - Merge your changes to the API repos into the master branches.