Skip to content

Commit 07cb074

Browse files
committed
Prepare 1.6.0
1 parent 1f052bf commit 07cb074

File tree

3 files changed

+23
-13
lines changed

3 files changed

+23
-13
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Go ObjectBox Database API
2-
================
2+
=========================
33
ObjectBox is a superfast Go database persisting objects; [check the performance benchmarks vs SQLite (GORM) & Storm](https://objectbox.io/go-1-0-release-and-performance-benchmarks/). Using this Golang API, you can use ObjectBox as an embedded database in your Go application.
44

55
ObjectBox persists your native Go structs using a simple CRUD API:
@@ -11,10 +11,10 @@ id, err := box.Put(&Person{ FirstName: "Joe", LastName: "Green" })
1111
Want details? **[Read the docs](https://golang.objectbox.io/)** or
1212
**[check out the API reference](https://godoc.org/github.com/objectbox/objectbox-go/objectbox)**.
1313

14-
Latest release: [v1.5.0 (2021-08-18)](https://golang.objectbox.io/)
14+
Latest release: [v1.6.0 (2022-01-14)](https://golang.objectbox.io/)
1515

1616
High-performance Golang database
17-
-------------
17+
--------------------------------
1818
🏁 **High performance** on restricted devices, like IoT gateways, micro controllers, ECUs etc.\
1919
🪂 **Resourceful** with minimal CPU, power and Memory usage for maximum flexibility and sustainability\
2020
🔗 **Relations:** object links / relationships are built-in\
@@ -128,7 +128,7 @@ Keep in touch: For general news on ObjectBox, [check our blog](https://objectbox
128128

129129
License
130130
-------
131-
Copyright 2018-2021 ObjectBox Ltd. All rights reserved.
131+
Copyright 2018-2022 ObjectBox Ltd. All rights reserved.
132132

133133
Licensed under the Apache License, Version 2.0 (the "License");
134134
you may not use this file except in compliance with the License.

objectbox/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (v Version) String() string {
4343
// VersionGo returns the Version of the ObjectBox-Go binding
4444
func VersionGo() Version {
4545
// for label, use `beta.0` format, increasing the counter for each subsequent release
46-
return Version{1, 5, 0, ""}
46+
return Version{1, 6, 0, ""}
4747
}
4848

4949
// VersionLib returns the Version of the dynamic linked ObjectBox library

test/version_test.go

+18-8
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,26 @@ func TestVersion(t *testing.T) {
3131

3232
var format = regexp.MustCompile(`^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?$`)
3333

34-
versionGo := objectbox.VersionGo().String()
35-
if !format.MatchString(versionGo) {
36-
t.Errorf("ObjectBox-Go version %v doesn't match expected regexp %v", versionGo, format)
34+
versionGo := objectbox.VersionGo()
35+
versionGoString := versionGo.String()
36+
if !format.MatchString(versionGoString) {
37+
t.Errorf("ObjectBox-Go version %v doesn't match expected regexp %v", versionGoString, format)
3738
}
38-
versionLib := objectbox.VersionLib().String()
39-
if !format.MatchString(versionGo) {
40-
t.Errorf("ObjectBox-C version %v doesn't match expected regexp %v", versionLib, format)
39+
versionGoInt := versionGo.Major*10000 + versionGo.Minor*100 + versionGo.Patch
40+
assert.True(t, versionGoInt >= 10600) // Update with new releases (won't fail if forgotten)
41+
assert.True(t, versionGoInt < 20000) // Future next major release
42+
43+
versionLib := objectbox.VersionLib()
44+
versionLibString := versionLib.String()
45+
if !format.MatchString(versionGoString) {
46+
t.Errorf("ObjectBox-C version %v doesn't match expected regexp %v", versionLibString, format)
4147
}
42-
assert.Eq(t, true, strings.Contains(versionInfo, versionGo))
43-
assert.Eq(t, true, strings.Contains(versionInfo, versionLib))
48+
versionLibInt := versionLib.Major*10000 + versionLib.Minor*100 + versionLib.Patch
49+
assert.True(t, versionLibInt >= 1500) // Update with new releases (won't fail if forgotten)
50+
assert.True(t, versionLibInt < 10000) // Future next major release
51+
52+
assert.Eq(t, true, strings.Contains(versionInfo, versionGoString))
53+
assert.Eq(t, true, strings.Contains(versionInfo, versionLibString))
4454
}
4555

4656
func TestVersionLabel(t *testing.T) {

0 commit comments

Comments
 (0)