Skip to content

Commit

Permalink
update generated packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ruflin committed Jun 30, 2020
1 parent b7c5e4d commit 6f0f3dc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion testdata/generated/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"conditions": {
"kibana.version": "~7.0.0"
"kibana.version": "~7.x.x"
},
"screenshots": [
{
Expand Down
2 changes: 1 addition & 1 deletion testdata/generated/package/example/1.0.0/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"conditions": {
"kibana.version": "~7.0.0"
"kibana.version": "~7.x.x"
},
"screenshots": [
{
Expand Down
12 changes: 6 additions & 6 deletions testdata/generated/search-kibana721.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@
},
{
"name": "example",
"title": "Example",
"version": "0.0.2",
"description": "This is the example integration.",
"title": "Example Integration",
"version": "1.0.0",
"description": "This is the example integration",
"type": "integration",
"download": "/epr/example/example-0.0.2.tar.gz",
"download": "/epr/example/example-1.0.0.tar.gz",
"downloads": [
{
"path": "/epr/example/example-0.0.2.tar.gz",
"path": "/epr/example/example-1.0.0.tar.gz",
"type": "tar"
}
],
"path": "/package/example/0.0.2"
"path": "/package/example/1.0.0"
},
{
"name": "foo",
Expand Down
2 changes: 1 addition & 1 deletion testdata/package/example/1.0.0/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ release: ga
owner.github: "ruflin"

conditions:
kibana.version: "~7.0.0"
kibana.version: "~7.x.x"

requirement:
kibana:
Expand Down
8 changes: 0 additions & 8 deletions util/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package util

import (
"fmt"
"log"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -162,8 +161,6 @@ func NewPackage(basePath string) (*Package, error) {
return nil, err
}

log.Println(p.Conditions)

// Default for the multiple flags is true.
trueValue := true
for i, _ := range p.Datasources {
Expand Down Expand Up @@ -273,14 +270,9 @@ func (p *Package) HasKibanaVersion(version *semver.Version) bool {

// If the version is not specified, it is for all versions
if p.Conditions == nil || version == nil {
log.Println("TRUE")
return true
}
//if p.Conditions.KibanaVersion == "" {
// return true
//}

log.Println(p.Conditions.kibanaVersion, version)
return p.Conditions.kibanaVersion.Check(version)
}

Expand Down

0 comments on commit 6f0f3dc

Please sign in to comment.