To run all unit tests, run make test
.
This will make a coverage report available, which can be viewed
in your web browser by running make covhtml
.
All code under the pkg/
directory should be thoroughly tested.
Use make build
to build all platform binaries to the bin/
directory.
Mac:
# builds to bin/darwin/amd64/oras
make build-mac
Linux:
# builds to bin/linux/amd64/oras
make build-linux
Linux ARM64:
# builds to bin/linux/amd64/oras
make build-linux
Windows:
# builds to bin/windows/amd64/oras.exe
make build-windows
To remove all files not manged by git, run make clean
(be careful!)
Using Go Modules to manage dependencies.
To update or add new dependencies, run go get <package name>
.
Example of releasing v0.1.0
:
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin v0.1.0
A Codefresh pipeline will pick up the GitHub tag event and run .codefresh/release.yml.
This will result in running goreleaser
to upload release artiacts, as well as push a tag to Docker Hub for
the image orasbot/oras
.