Skip to content

Commit 6375578

Browse files
authored
Go static binary distribution procedures (#13)
* Steady state for analysis & experimentation (#11) * feat: basic development environment via `Makefile` & sample benchmark * feat: rendered Jupyter Notebook for logbook + creating diagrams * docs: section headings for risk matrix, TTP, & design * docs: add supporting footnote to NIST (CSRC) * feat: sample ASCCI line graph & rolling hash base * feat: external system configuration file * refactor: diode config from YAML file * fix: input, output, & broker connections * docs: update directory tree structure names * bump: latest Go release (toolchain, runtime, & libraries * refactor: build version via `ldflags` * fix: deprecated Node.js 16 action * Update go.yml https://github.com/actions/go-versions
1 parent f340850 commit 6375578

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

.github/workflows/go.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- name: Set up Go
19-
uses: actions/setup-go@v4
19+
uses: actions/setup-go@v5
2020
with:
21-
go-version: "1.21.x"
21+
go-version: "1.22"
2222

2323
- name: Install dependencies
2424
run: go get .

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build:
2-
go build -o diode diode.go
2+
go build -o diode -ldflags="-X main.SemVer=0.0.5" diode.go
33

44
test:
55
go test -v

diode.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import (
1919
"gopkg.in/yaml.v2"
2020
)
2121

22+
var (
23+
SemVer string
24+
)
25+
2226
type Configuration struct {
2327
Input struct {
2428
IP string
@@ -267,7 +271,7 @@ func main() {
267271
Aliases: []string{"v"},
268272
Usage: "Print the version of the diode CLI",
269273
Action: func(vCtx *cli.Context) error {
270-
fmt.Println(">> diode version 0.0.4")
274+
fmt.Println(">> diode version " + SemVer)
271275
return nil
272276
},
273277
},

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/acep-uaf/data-diode
22

3-
go 1.21.6
3+
go 1.22.0
44

55
require (
66
github.com/eclipse/paho.mqtt.golang v1.4.3
@@ -14,6 +14,6 @@ require (
1414
github.com/gorilla/websocket v1.5.1 // indirect
1515
github.com/russross/blackfriday/v2 v2.1.0 // indirect
1616
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
17-
golang.org/x/net v0.20.0 // indirect
17+
golang.org/x/net v0.21.0 // indirect
1818
golang.org/x/sync v0.6.0 // indirect
1919
)

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
1212
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
1313
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e h1:+SOyEddqYF09QP7vr7CgJ1eti3pY9Fn3LHO1M1r/0sI=
1414
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
15-
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
16-
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
15+
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
16+
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
1717
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
1818
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
1919
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

0 commit comments

Comments
 (0)