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
Mac ARM64:
# builds to bin/darwin/arm64/oras
make build-mac-arm64
Linux:
# builds to bin/linux/amd64/oras
make build-linux
Linux ARM64:
# builds to bin/linux/arm64/oras
make build-linux-arm64
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 GitHub Actions pipeline will pick up the GitHub tag
event and run goreleaser to upload release artiacts,
as well as push a tag to Docker Hub for the image orasbot/oras
.