Repository navigation
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
117 lines (108 loc) · 3.7 KB
/
Copy path.goreleaser.yaml
File metadata and controls
117 lines (108 loc) · 3.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: 2
# Releases de NetPulse: tres binarios estáticos por tag v*
# netpulse app completa (backend Go + frontend embebido)
# netpulse-collector sidecar de latencia TCP con series temporales propias
# netpulse-agent agente nativo OpenWrt (push al servidor; Fase 6)
#
# OJO: los hooks globales `before:` son feature GoReleaser PRO (en OSS se
# "ejecutan" en el log pero no hacen nada, y encima rompen el embed).
# El frontend DEBE construirse ANTES de goreleaser: lo hace el paso
# "Build frontend + copia dist al embed" de .github/workflows/release.yml
# (en local: npm run build --prefix app && cp -r app/dist server-go/internal/staticspa/dist).
builds:
- id: netpulse
dir: server-go
main: ./cmd/netpulse
binary: netpulse
env:
- CGO_ENABLED=0
goos: [linux]
goarch: [amd64, arm64, arm]
goarm: [7]
flags: [-trimpath]
ldflags:
- -s
- -w
- "-X github.com/gnacho/netpulse/server-go/internal/updater.BuildCommit={{.ShortCommit}}"
- "-X github.com/gnacho/netpulse/server-go/internal/agentbin.EmbeddedAgentVersion={{ .Env.AGENT_VERSION }}"
# -X httpapi.Version: sin esto el health reporta el fallback local
# (httpapi.go declara var Version) en vez de la versión del tag.
- "-X github.com/gnacho/netpulse/server-go/internal/httpapi.Version={{.Version}}"
- id: netpulse-collector
dir: collector
main: .
binary: netpulse-collector
env:
- CGO_ENABLED=0
goos: [linux]
goarch: [amd64, arm64, arm]
goarm: [7]
flags: [-trimpath]
# -X main.Version: sin esto el collector reporta "0.1.0" para siempre
# (main.go declara var Version con fallback para builds locales).
ldflags:
- -s
- -w
- "-X main.Version={{.Version}}"
# Agente nativo OpenWrt (Fase 6): binario stateless que empuja al servidor.
# arm64 = GL-MT6000 + APs (Cortex-A53); armv7 por si aparece un AP más
# viejo; amd64 para pilotos locales; mipsle (softfloat) = MT7621 y resto
# de ramips/lantiq LE; mips (softfloat) = ath79 y targets BE (#488).
- id: netpulse-agent
dir: agent
main: ./cmd/netpulse-agent
binary: netpulse-agent
env:
- CGO_ENABLED=0
goos: [linux]
goarch: [amd64, arm64, arm, mipsle, mips]
goarm: [7]
# Los SoC MIPS de OpenWrt (MT7621, AR7xxx/AR9xxx...) no llevan FPU:
# softfloat para ambos endianness.
gomips: [softfloat]
flags: [-trimpath]
# -X main.Version: la versión del agente va desacoplada del tag (#790);
# viene de agent/VERSION (workflow release.yml la pasa en AGENT_VERSION).
# Sin esto el agente reporta "0.1.0" para siempre (main.go declara var
# Version con fallback para builds locales).
ldflags:
- -s
- -w
- "-X main.Version={{ .Env.AGENT_VERSION }}"
archives:
- id: netpulse
ids: [netpulse]
formats: [tar.gz]
name_template: >-
{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE
- THIRD_PARTY.md
- src: server-go/.env.example
dst: .env.example
- id: netpulse-collector
ids: [netpulse-collector]
formats: [tar.gz]
name_template: >-
{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE
- THIRD_PARTY.md
- id: netpulse-agent
ids: [netpulse-agent]
formats: [tar.gz]
name_template: >-
{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}
files:
- LICENSE
- THIRD_PARTY.md
- src: agent/deploy/netpulse-agent.init
dst: netpulse-agent.init
checksum:
name_template: checksums.txt
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'