Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
set -x
make install.tools

make test

make .gitvalidation
make docs
make -C schema test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ endif
version.md: ./specs-go/version.go
go run ./.tool/version-doc.go > $@

.PHONY: test
test:
go test ./...

.PHONY: lint
lint:
golangci-lint run
Expand Down
4 changes: 2 additions & 2 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ Releases usually follow a few steps:
* [ ] delete the `(^M|^A|^D)` lines, `:%!grep -vE '(^M|^A|^D)'`
* [ ] merge multi-commit PRs (so each line has a `(#num)` suffix)
* [ ] drop hash and indent, `:'<,'> s/^\w* /^I* /`
* [ ] a commit bumping `./specs-go/version.go` to next version and empty the `VersionDev` variable
* [ ] a commit adding back the "+dev" to `VersionDev`
* [ ] a commit bumping `./specs-go/version.go` to next version and empty the `VersionDev` variable (update `Version` accordingly)
* [ ] a commit adding back the "+dev" to `VersionDev` and `Version`
* [ ] send email to <dev@opencontainers.org>
* [ ] copy the exact commit hash for bumping the version from the pull-request (since master always stays as "-dev")
* [ ] count the PRs since last release (that this version is tracking, in the cases of multiple branching), like `git log --pretty=oneline --no-merges --decorate $priorTag..$versionBumpCommit | grep \(pr\/ | wc -l`
Expand Down
4 changes: 1 addition & 3 deletions specs-go/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package specs

import "fmt"

const (
// VersionMajor is for an API incompatible changes
VersionMajor = 1
Expand All @@ -15,4 +13,4 @@ const (
)

// Version is the specification version that the package types support.
var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev)
var Version = "1.3.0+dev"
13 changes: 13 additions & 0 deletions specs-go/version_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package specs

import (
"strconv"
"testing"
)

func TestVersionSynced(t *testing.T) {
wantVer := strconv.Itoa(VersionMajor) + "." + strconv.Itoa(VersionMinor) + "." + strconv.Itoa(VersionPatch) + VersionDev
if Version != wantVer {
t.Fatalf("Version mismatch: got %q, want %q", Version, wantVer)
}
}
Loading