versions: move hash generator into own package

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-01-10 18:08:31 +01:00
parent c081664d03
commit 4bc191e434
4 changed files with 20 additions and 5 deletions

2
go.mod
View File

@ -92,6 +92,7 @@ require (
golang.org/x/crypto v0.5.0
golang.org/x/mod v0.7.0
golang.org/x/sys v0.4.0
golang.org/x/tools v0.4.0
google.golang.org/api v0.106.0
google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.1
@ -287,7 +288,6 @@ require (
golang.org/x/term v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/time v0.2.0 // indirect
golang.org/x/tools v0.4.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect

View File

@ -1,5 +1,3 @@
//go:build ignore
/*
Copyright (c) Edgeless Systems GmbH
@ -170,5 +168,5 @@ func main() {
log.Fatalf("no components lists found")
}
fmt.Printf("Successfully generated hashes for %d components in %d component lists.", componentCtr, componentListsCtr)
fmt.Printf("Successfully generated hashes for %d components in %d component lists.\n", componentCtr, componentListsCtr)
}

View File

@ -0,0 +1,17 @@
/*
Copyright (c) Edgeless Systems GmbH
SPDX-License-Identifier: AGPL-3.0-only
*/
package main
import (
"testing"
"go.uber.org/goleak"
)
func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}

View File

@ -96,7 +96,7 @@ const (
// Regenerate the hashes by running go generate.
// To add another Kubernetes version, add a new entry to the VersionConfigs map below and fill the Hash field with an empty string.
//go:generate go run generateHashes.go
//go:generate go run hash-generator/generate.go
// VersionConfigs holds download URLs for all required kubernetes components for every supported version.
var VersionConfigs = map[ValidK8sVersion]KubernetesVersion{