diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 62beb105e..f24d3829b 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -103,6 +103,7 @@ "fileMatch": [ "Dockerfile", "internal/prober/multihttp/script_test.go", + ".goreleaser.yaml" ], "matchStrings": [ "https://github.com/grafana/xk6-sm/releases/download/(?[^/]+)/" diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 542672d4a..131b88240 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -17,6 +17,16 @@ builds: - goos: darwin goarch: arm gobinary: scripts/package/goreleaser-build + hooks: + post: + # Download sm-k6 from grafana/sm-k6 repo. + # Renovate updates this URL. + # Folded block scalar converts newlines into spaces, no need to escape them. + - >- + wget + https://github.com/grafana/xk6-sm/releases/download/v0.0.4/sm-k6-{{ .Os }}-{{ .Arch }} + -O + dist/sm-k6-{{ .Os }}-{{ .Arch }} #sboms: # - artifacts: archive archives: @@ -52,9 +62,8 @@ nfpms: type: 'config|noreplace' - src: ./scripts/package/config/systemd/synthetic-monitoring-agent.service dst: /etc/systemd/system/synthetic-monitoring-agent.service - # Copy k6 as sm-k6 to prevent clashing with k6 if it's installed. - - src: ./dist/synthetic-monitoring-agent_{{.Os}}_{{.Arch}}{{ with .Amd64 }}_{{ . }}{{ end}}/k6 + - src: ./dist/sm-k6-{{ .Os }}-{{ .Arch }} dst: /usr/bin/sm-k6 rpm: signature: