summaryrefslogtreecommitdiffstats
path: root/HACKING.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 18:10:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 18:10:12 +0000
commitaaf261d1e385f1b1c1292ead4ccbd631f6b26dc9 (patch)
tree1063057bfb2f9e946f939f5b18347295988cfb99 /HACKING.md
parentInitial commit. (diff)
downloadgolang-github-opencontainers-image-spec-aaf261d1e385f1b1c1292ead4ccbd631f6b26dc9.tar.xz
golang-github-opencontainers-image-spec-aaf261d1e385f1b1c1292ead4ccbd631f6b26dc9.zip
Adding upstream version 1.1.0~rc5.upstream/1.1.0_rc5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'HACKING.md')
-rw-r--r--HACKING.md105
1 files changed, 105 insertions, 0 deletions
diff --git a/HACKING.md b/HACKING.md
new file mode 100644
index 0000000..15ad62f
--- /dev/null
+++ b/HACKING.md
@@ -0,0 +1,105 @@
+# Hacking Guide
+
+## Overview
+
+This guide contains instructions for building artifacts contained in this repository.
+
+### Go
+
+This spec includes several Go packages, and a command line tool considered to be a reference implementation of the OCI image specification.
+
+Prerequisites:
+
+- Go - current release only, earlier releases are not supported
+- make
+
+The following make targets are relevant for any work involving the Go packages.
+
+### Linting
+
+The included Go source code is being examined for any linting violations not included in the standard Go compiler.
+Linting is done using [golangci-lint][golangci-lint].
+
+Invocation:
+
+```shell
+make lint
+```
+
+### Tests
+
+This target executes all Go based tests.
+
+Invocation:
+
+```shell
+make test
+make validate-examples
+```
+
+### JSON schema formatting
+
+This target auto-formats all JSON files in the `schema` directory using the `jq` tool.
+
+Prerequisites:
+
+- [jq][jq] >=1.5
+
+Invocation:
+
+```shell
+make fmt
+```
+
+### OCI image specification PDF/HTML documentation files
+
+This target generates a PDF/HTML version of the OCI image specification.
+
+Prerequisites:
+
+- [Docker][docker]
+
+Invocation:
+
+```shell
+make docs
+```
+
+### License header check
+
+This target checks if the source code includes necessary headers.
+
+Invocation:
+
+```shell
+make check-license
+```
+
+### Clean build artifacts
+
+This target cleans all generated/compiled artifacts.
+
+Invocation:
+
+```shell
+make clean
+```
+
+### Create PNG images from dot files
+
+This target generates PNG image files from DOT source files in the `img` directory.
+
+Prerequisites:
+
+- [graphviz][graphviz]
+
+Invocation:
+
+```shell
+make img/media-types.png
+```
+
+[docker]: https://www.docker.com/
+[golangci-lint]: https://github.com/golangci/golangci-lint
+[graphviz]: https://www.graphviz.org/
+[jq]: https://stedolan.github.io/jq/