Skip to content

Commit af95072

Browse files
committed
store stabilised production version
1 parent 6e178c4 commit af95072

27 files changed

+339
-56
lines changed

.golangci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ linters:
3939
rules:
4040
- path: (.+)\.go$
4141
text: G104
42+
- path: (.+)\.go$
43+
text: G115
44+
- path: (.+)\.go$
45+
text: G117
4246
- path: (.+)\.go$
4347
text: SA1019
4448
- path: (.+)\.go$
@@ -72,7 +76,6 @@ formatters:
7276
sections:
7377
- standard
7478
- default
75-
- prefix(pkg.hiveon.dev)
7679
- alias
7780
custom-order: true
7881
exclusions:

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ MOCKS_DIR := $(CURDIR)/internal/mocks
1717

1818
DEFAULT_TARGET ?= $(BUILD_DIR)/usm
1919
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
20+
BUILD_ID ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
21+
BUILD_TIME ?= $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
22+
LDFLAGS := -X apps.z7.ai/usm/internal/usm.BuildVersion=$(VERSION) \
23+
-X apps.z7.ai/usm/internal/usm.BuildID=$(BUILD_ID) \
24+
-X apps.z7.ai/usm/internal/usm.BuildTime=$(BUILD_TIME)
2025

2126
default: clean lint build
2227
@:
@@ -73,7 +78,7 @@ generate-mocks: .build-mockery
7378

7479
build:
7580
@echo "${GREEN}# Building all binaries...${NOCOLOR}"
76-
go build -o ${DEFAULT_TARGET} ./main.go
81+
go build -ldflags '$(LDFLAGS)' -o ${DEFAULT_TARGET} ./main.go
7782

7883
generate-integrations:
7984
@echo "${GREEN}# Generating desktop integration files...${NOCOLOR}"
@@ -128,7 +133,7 @@ package-macos: build-with-integrations
128133

129134
fmt: .build-fmt-tools
130135
@echo "${GREEN}# Running gci fmt${NOCOLOR}"
131-
gci write --skip-generated -s standard -s default -s 'prefix(pkg.hiveon.dev)' -s alias --custom-order .
136+
gci write --skip-generated -s standard -s default -s alias --custom-order .
132137
@echo "${GREEN}# Running gofumpt${NOCOLOR}"
133138
gofumpt -w -l .
134139

@@ -147,6 +152,8 @@ help:
147152
@echo ""
148153
@echo "Environment variables:"
149154
@echo " VERSION - Set version for packages (default: git describe or 'dev')"
155+
@echo " BUILD_ID - Build identifier (default: git short commit hash)"
156+
@echo " BUILD_TIME - Build timestamp (default: current UTC time)"
150157

151158
.build-macos-icns:
152159
@echo "${GREEN}# Building .icns from logo/usm.png (cross-platform)...${NOCOLOR}"

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ make generate-integrations
5151
- [Configuration Management](docs/configuration.md) - Versioned configuration system using Viracochan
5252
- [Desktop Integrations](docs/integrations.md) - Desktop integration file generation for Linux and macOS
5353

54+
## Build identification
55+
56+
Each binary built via `make build` embeds version, build ID (git commit) and build time via linker flags.
57+
58+
```
59+
$ usm cli version
60+
usm version v1.0.0 (abc1234 2026-03-05T12:00:00Z)
61+
instance: 550e8400-e29b-41d4-a716-446655440000
62+
```
63+
64+
The **instance ID** is a UUID v4 generated on first run and persisted in the application state (`usm.json`). It uniquely identifies a USM installation for backup and synchronization purposes.
65+
66+
When building outside of `make`, the version falls back to Go module metadata or `(unknown)`.
67+
5468
## How it works - cryptography details
5569

5670
### Vault initialization

go.mod

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
module apps.z7.ai/usm
22

3-
go 1.24
3+
go 1.25.0
44

55
require (
6-
filippo.io/age v1.2.1
7-
fyne.io/fyne/v2 v2.6.2
6+
filippo.io/age v1.3.1
7+
fyne.io/fyne/v2 v2.7.3
88
github.com/fyne-io/image v0.1.1
9-
github.com/godbus/dbus/v5 v5.1.0
10-
github.com/source-c/viracochan v0.1.0
11-
github.com/stretchr/testify v1.10.0
9+
github.com/godbus/dbus/v5 v5.2.2
10+
github.com/source-c/viracochan v0.1.1
11+
github.com/stretchr/testify v1.11.1
1212
golang.design/x/clipboard v0.7.1
13-
golang.org/x/crypto v0.41.0
14-
golang.org/x/image v0.30.0
15-
golang.org/x/net v0.43.0
16-
golang.org/x/sync v0.16.0
17-
golang.org/x/term v0.34.0
13+
golang.org/x/crypto v0.48.0
14+
golang.org/x/image v0.36.0
15+
golang.org/x/net v0.51.0
16+
golang.org/x/sync v0.19.0
17+
golang.org/x/term v0.40.0
1818
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
1919
)
2020

@@ -23,47 +23,60 @@ require (
2323
replace golang.org/x/mobile => github.com/fyne-io/gomobile-bridge v0.1.0
2424

2525
require (
26-
fyne.io/systray v1.11.0 // indirect
26+
filippo.io/hpke v0.4.0 // indirect
27+
fyne.io/systray v1.12.0 // indirect
2728
github.com/BurntSushi/toml v1.5.0 // indirect
28-
github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect
29+
github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect
30+
github.com/btcsuite/btcd/btcec/v2 v2.3.6 // indirect
2931
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
32+
github.com/bytedance/gopkg v0.1.3 // indirect
33+
github.com/bytedance/sonic v1.15.0 // indirect
34+
github.com/bytedance/sonic/loader v0.5.0 // indirect
35+
github.com/cloudwego/base64x v0.1.6 // indirect
36+
github.com/coder/websocket v1.8.14 // indirect
3037
github.com/davecgh/go-spew v1.1.1 // indirect
31-
github.com/decred/dcrd/crypto/blake256 v1.0.1 // indirect
32-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
38+
github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect
39+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect
3340
github.com/fredbi/uri v1.1.1 // indirect
3441
github.com/fsnotify/fsnotify v1.9.0 // indirect
3542
github.com/fyne-io/gl-js v0.2.0 // indirect
3643
github.com/fyne-io/glfw-js v0.3.0 // indirect
37-
github.com/fyne-io/oksvg v0.1.0 // indirect
44+
github.com/fyne-io/oksvg v0.2.0 // indirect
3845
github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 // indirect
3946
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20250301202403-da16c1255728 // indirect
4047
github.com/go-text/render v0.2.0 // indirect
41-
github.com/go-text/typesetting v0.3.0 // indirect
48+
github.com/go-text/typesetting v0.3.3 // indirect
4249
github.com/gobwas/httphead v0.1.0 // indirect
4350
github.com/gobwas/pool v0.2.1 // indirect
44-
github.com/gobwas/ws v1.2.0 // indirect
51+
github.com/gobwas/ws v1.4.0 // indirect
4552
github.com/hack-pad/go-indexeddb v0.3.2 // indirect
4653
github.com/hack-pad/safejs v0.1.1 // indirect
4754
github.com/jeandeaual/go-locale v0.0.0-20250612000132-0ef82f21eade // indirect
4855
github.com/josharian/intern v1.0.0 // indirect
56+
github.com/json-iterator/go v1.1.12 // indirect
4957
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
58+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
5059
github.com/kr/text v0.2.0 // indirect
51-
github.com/mailru/easyjson v0.7.7 // indirect
52-
github.com/nbd-wtf/go-nostr v0.31.2 // indirect
60+
github.com/mailru/easyjson v0.9.1 // indirect
61+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
62+
github.com/modern-go/reflect2 v1.0.2 // indirect
63+
github.com/nbd-wtf/go-nostr v0.52.3 // indirect
5364
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
5465
github.com/nicksnyder/go-i18n/v2 v2.6.0 // indirect
5566
github.com/pmezard/go-difflib v1.0.0 // indirect
56-
github.com/puzpuzpuz/xsync/v3 v3.0.2 // indirect
67+
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
5768
github.com/rymdport/portal v0.4.2 // indirect
5869
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
5970
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
60-
github.com/tidwall/gjson v1.14.4 // indirect
61-
github.com/tidwall/match v1.1.1 // indirect
62-
github.com/tidwall/pretty v1.2.0 // indirect
71+
github.com/tidwall/gjson v1.18.0 // indirect
72+
github.com/tidwall/match v1.2.0 // indirect
73+
github.com/tidwall/pretty v1.2.1 // indirect
74+
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
6375
github.com/yuin/goldmark v1.7.13 // indirect
64-
golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 // indirect
65-
golang.org/x/mobile v0.0.0-20250813145510-f12310a0cfd9 // indirect
66-
golang.org/x/sys v0.35.0 // indirect
67-
golang.org/x/text v0.28.0 // indirect
76+
golang.org/x/arch v0.24.0 // indirect
77+
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect
78+
golang.org/x/mobile v0.0.0-20260217195705-b56b3793a9c4 // indirect
79+
golang.org/x/sys v0.41.0 // indirect
80+
golang.org/x/text v0.34.0 // indirect
6881
gopkg.in/yaml.v3 v3.0.1 // indirect
6982
)

0 commit comments

Comments
 (0)