summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-04-06 21:23:39 +0200
committerMartin Fischer <martin@push-f.com>2025-04-06 21:23:39 +0200
commit5ad1feb9925cb4c4b25913aa88f864a062c58ffa (patch)
treeb611043afbef5afab801896a86b7fa5edb5309c5
parentd8b675d3670a70df15ec46dfd9a1bb9f801aae41 (diff)
fix: fail if no features were found
-rw-r--r--build.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/build.go b/build.go
index b1a525e..c15c8e2 100644
--- a/build.go
+++ b/build.go
@@ -83,12 +83,10 @@ func main() {
versions := make([]Version, 0)
sortedVersions := slices.SortedFunc(maps.Keys(versionInfos), compareVersion)
slices.Reverse(sortedVersions)
+ featureCount := 0
for _, name := range append([]string{"unstable"}, sortedVersions...) {
features := getFeatures(caniuseRepo, name)
- if len(features) == 0 {
- log.Infof("no features found for %s", name)
- }
libFeatures := make([]Feature, 0)
nonLibFeatures := make([]Feature, 0)
for _, feature := range features {
@@ -111,6 +109,11 @@ func main() {
}
versions = append(versions, version)
+ featureCount += len(features)
+ }
+
+ if featureCount == 0 {
+ log.Fatal("found no features")
}
tmpl := template.New("template.html.tmpl").Funcs(template.FuncMap{