Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ import (
semrelplugin "github.com/SemRels/provider-git/internal/plugin"
)

const pluginSchemaVersion = 1

type gitClient interface {
PushTag(ctx context.Context, tagName, remote string) error
PushBranch(ctx context.Context, branch, remote string) error
}

func main() {
fmt.Fprintf(os.Stderr, "plugin_schema_version=%d\n", pluginSchemaVersion)
if err := run(context.Background(), os.Getenv, os.Stdout, semrelplugin.NewClient(semrelplugin.ConfigFromEnv(os.Getenv), semrelplugin.ExecRunner{})); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
Expand Down
39 changes: 39 additions & 0 deletions schema/v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://registry.semrel.io/schemas/plugins/provider-git/v1.json",
"title": "provider-git plugin configuration",
"description": "Schema v1 for the provider-git semrel plugin. Configure via SEMREL_* environment variables.",
"type": "object",
"properties": {
"SEMREL_TAG_NAME": {
"type": "string",
"description": "Release tag name for the current semrel execution."
},
"SEMREL_BRANCH": {
"type": "string",
"description": "Release branch name for the current semrel execution."
},
"SEMREL_PLUGIN_REMOTE": {
"type": "string",
"default": "origin",
"description": "Git remote to push to."
},
"SEMREL_REMOTE": {
"type": "string",
"default": "origin",
"description": "Fallback git remote name used when SEMREL_PLUGIN_REMOTE is unset."
},
"SEMREL_DRY_RUN": {
"type": "string",
"enum": [
"true",
"false",
"1",
"0"
],
"default": "false",
"description": "When true, perform validation and logging only without executing side effects."
}
},
"additionalProperties": true
}
Loading