INNER CODE UNIT · Go

archives

werf/nelm · scripts/schemagen/main.go:344

	archives := map[string]*schemas.Bundle{
		crdsArchiveFileName:       index.CRDs,
		kubernetesArchiveFileName: index.Kubernetes,
	}

	for name, bundle := range archives {
		path := filepath.Join(opts.outputDir, name)

		archive, err := os.ReadFile(path)
		if err != nil {
			return fmt.Errorf("read %s: %w, run: task generate:validation-schemas", path, err)
		}

		digest := sha256.Sum256(archive)

		if recorded := hex.EncodeToString(digest[:]); recorded != bundle.SHA256 {
			return fmt.Errorf("%s has digest %s, but %s records %s, run: task generate:validation-schemas:force",
				path, recorded, indexPath, bundle.SHA256)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…