From b106dea90c37e59727d965134cb3aa7d089da3ec Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Sun, 24 May 2026 18:42:53 -0400 Subject: [PATCH] fix(release): add ManifestProvider so verify-capabilities gets plugin Name The IaC bridge's GetManifest returns Name="" when no ManifestProvider is set, causing wfctl verify-capabilities to fail. Fix: - embed plugin.json via go:embed in cmd/main.go - pass sdk.MustEmbedManifest as ManifestProvider in IaCServeOptions - add goreleaser hook to cp plugin.json into cmd/ before build - set plugin.json.version to sentinel "0.0.0" (goreleaser writes release version to archive) Co-Authored-By: Claude Sonnet 4.6 --- .goreleaser.yaml | 1 + cmd/workflow-plugin-hover/main.go | 12 ++++++- cmd/workflow-plugin-hover/plugin.json | 51 +++++++++++++++++++++++++++ plugin.json | 2 +- 4 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 cmd/workflow-plugin-hover/plugin.json diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 69b1c6f..531fe55 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -6,6 +6,7 @@ before: hooks: - "sh -c \"rm -rf .release && mkdir -p .release && jq --arg v '{{ .Version }}' '.version = $v' plugin.json > .release/plugin.json\"" - "sh -c \"jq -e --arg v '{{ .Version }}' '.version == $v' .release/plugin.json > /dev/null || (echo 'plugin.json version rewrite failed' >&2 && exit 1)\"" + - "cp plugin.json cmd/workflow-plugin-hover/plugin.json" builds: - id: workflow-plugin-hover diff --git a/cmd/workflow-plugin-hover/main.go b/cmd/workflow-plugin-hover/main.go index 7084dc7..ea50d03 100644 --- a/cmd/workflow-plugin-hover/main.go +++ b/cmd/workflow-plugin-hover/main.go @@ -6,12 +6,22 @@ package main import ( + _ "embed" + "github.com/GoCodeAlone/workflow-plugin-hover/internal" sdk "github.com/GoCodeAlone/workflow/plugin/external/sdk" ) +// pluginJSON is the committed plugin.json embedded at build time. +// goreleaser's before hook copies plugin.json from the repo root to this +// directory before building so go:embed resolves correctly. +// +//go:embed plugin.json +var pluginJSON []byte + func main() { sdk.ServeIaCPlugin(internal.NewIaCServer(), sdk.IaCServeOptions{ - BuildVersion: sdk.ResolveBuildVersion(internal.Version), + ManifestProvider: sdk.MustEmbedManifest(pluginJSON), + BuildVersion: sdk.ResolveBuildVersion(internal.Version), }) } diff --git a/cmd/workflow-plugin-hover/plugin.json b/cmd/workflow-plugin-hover/plugin.json new file mode 100644 index 0000000..a77a46b --- /dev/null +++ b/cmd/workflow-plugin-hover/plugin.json @@ -0,0 +1,51 @@ +{ + "name": "workflow-plugin-hover", + "version": "0.0.0", + "description": "Hover DNS provider (browser-style login + TOTP, no official SDK)", + "author": "GoCodeAlone", + "license": "MIT", + "type": "external", + "tier": "community", + "private": false, + "minEngineVersion": "0.60.6", + "keywords": [ + "dns", + "hover", + "iac", + "infra.dns", + "totp" + ], + "homepage": "https://github.com/GoCodeAlone/workflow-plugin-hover", + "repository": "https://github.com/GoCodeAlone/workflow-plugin-hover", + "capabilities": { + "moduleTypes": [ + "iac.provider.hover" + ], + "stepTypes": [], + "triggerTypes": [], + "resourceTypes": [ + "infra.dns", + "infra.dns_delegation" + ] + }, + "required_secrets": [ + { + "name": "HOVER_USERNAME", + "sensitive": false, + "description": "Hover account username", + "prompt": "Hover username" + }, + { + "name": "HOVER_PASSWORD", + "sensitive": true, + "description": "Hover account password", + "prompt": "Hover password" + }, + { + "name": "HOVER_TOTP_SECRET", + "sensitive": true, + "description": "Base32-encoded TOTP seed shown when you enabled 2FA. The plugin generates 6-digit codes per RFC 6238 on each login.", + "prompt": "Hover TOTP seed (base32, 16+ chars)" + } + ] +} diff --git a/plugin.json b/plugin.json index ff242e7..a77a46b 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "workflow-plugin-hover", - "version": "0.2.0", + "version": "0.0.0", "description": "Hover DNS provider (browser-style login + TOTP, no official SDK)", "author": "GoCodeAlone", "license": "MIT",