Interested in contributing to Masonry? Awesome! Take a look at our contribution guidelines first.
-
Install Go 1.9+, and ensure your
GOPATH
is set. Using gvm is recommended. -
Get the code.
go get github.com/opencontrol/compliance-masonry
-
Run the tool.
compliance-masonry
This should print out usage documentation.
-
Install
make
. See GNU Make for details on whatmake
is and can do.yum
-based systems (RHEL / CentOS / etc.):sudo yum install make
apt
-based systems (Ubuntu / etc.):sudo apt-get install build-essential
MacOS systems: First, install Homebrew. Then, install
make
:brew install make
-
Makefile
targets:make [target-name]
The common targets include:
all
- Performs abuild
build
- Builds the source code and placescompliance-masonry
binary into the./build
folder.clean
- Simply removes the./build
foldertest
- Runs the tests.lint
- Checks to see if the Go code is properly formatted. (If you want to contribute to the project, use this target; you will need to make sure your code follows accepted standards.)
As the dependencies now exist in the git
tree under the vendor/
folder,
dependencies should only have to be updated when they are out-of-date, need
to stick to a specific version, or need to add a new dependency.
-
Get the
dep
tool. -
When needed, update dependencies by running the
dep
tool in the project.dep ensure -update github.com/foo/bar
-
You can add dependencies using
dep
.dep ensure -add github.com/foo/bar
-
If dependencies are not in the
vendor/
folder, you can use thedep
tool to make everything proper.dep ensure
make test
-
Checkout the master branch NOTE: Make sure that the master branch is clean and has the latest commits from GitHub.
git checkout master
-
Using
v.1.1.1
as an example, tag the new release using the convention in the example below:git tag -m "Bump to v1.1.1" v1.1.1
-
Using
v1.1.1
as an example, push the tag back to GitHubgit push origin v1.1.1
-
CircleCI will then run through the tests. Since there is a new tag, CircleCI will also install and run GoReleaser which will build and upload the binaries for release.