mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-31 18:54:11 +09:00
tools/bump: keep the tested Terraform provider releases current
A new release arrives as a bump pull request; verify reports a stale set.
This commit is contained in:
1 parent
b730a2ccc1
commit
bd1876e1fa
5 files changed
+206
-1
No files matched your search
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// cmdPlan resolves every upstream the bump reads and prints the gap against
|
||||
@@ -27,6 +28,7 @@ func planLines(ctx context.Context, r *repo) []string {
|
||||
lines = append(lines, planBuilders(ctx, r)...)
|
||||
lines = append(lines, planLockstep(ctx, r)...)
|
||||
lines = append(lines, planImages(ctx, r)...)
|
||||
lines = append(lines, planProviders(ctx, r))
|
||||
|
||||
if version, err := oapiVersion(r); err != nil { //nolint:noinlineerr
|
||||
lines = append(lines, "oapi-codegen: "+err.Error())
|
||||
@@ -39,6 +41,20 @@ func planLines(ctx context.Context, r *repo) []string {
|
||||
return lines
|
||||
}
|
||||
|
||||
func planProviders(ctx context.Context, r *repo) string {
|
||||
have, err := currentProviders(r)
|
||||
if err != nil {
|
||||
return "Terraform provider: " + err.Error()
|
||||
}
|
||||
|
||||
want, err := newestProviders(ctx)
|
||||
if err != nil {
|
||||
return "Terraform provider: " + err.Error()
|
||||
}
|
||||
|
||||
return gap("Terraform provider", strings.Join(have, ", "), strings.Join(want, ", "))
|
||||
}
|
||||
|
||||
func planImages(ctx context.Context, r *repo) []string {
|
||||
defs := imageBumps()
|
||||
lines := make([]string, 0, len(defs))
|
||||
|
||||
Reference in new issue
Block a user