mirror of
https://github.com/anchore/grype
synced 2024-09-20 06:21:56 +00:00
finalize update check URL
This commit is contained in:
parent
c524fba691
commit
8d84dfeb65
4 changed files with 5 additions and 8 deletions
2
Makefile
2
Makefile
|
@ -172,7 +172,7 @@ release: clean-dist ## Build and publish final binaries and packages
|
|||
-e AWS_SECRET_ACCESS_KEY=${TOOLBOX_AWS_SECRET_ACCESS_KEY} \
|
||||
-v $(shell pwd)/$(DISTDIR)/:/distmount \
|
||||
amazon/aws-cli --debug \
|
||||
s3 cp /distmount/VERSION s3://anchore-toolbox/$(BIN)/releases/latest/VERSION
|
||||
s3 cp /distmount/VERSION s3://toolbox-data.anchore.io/$(BIN)/releases/latest/VERSION
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-dist clean-snapshot ## Remove previous builds and result reports
|
||||
|
|
|
@ -17,9 +17,6 @@ import (
|
|||
"github.com/anchore/syft/syft/scope"
|
||||
)
|
||||
|
||||
// note: lib name must be a single word, all lowercase
|
||||
const LibraryName = "grype"
|
||||
|
||||
func FindVulnerabilities(provider vulnerability.Provider, userImageStr string, scopeOpt scope.Option) (result.Result, *pkg.Catalog, *scope.Scope, error) {
|
||||
log.Info("Cataloging image")
|
||||
catalog, theScope, theDistro, err := syft.Catalog(userImageStr, scopeOpt)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package internal
|
||||
|
||||
// note: must be a single word, all lowercase
|
||||
// note: do not change this
|
||||
const ApplicationName = "grype"
|
||||
|
|
|
@ -7,15 +7,15 @@ import (
|
|||
"strings"
|
||||
|
||||
hashiVersion "github.com/anchore/go-version"
|
||||
"github.com/anchore/grype/internal"
|
||||
)
|
||||
|
||||
var latestAppVersionURL = struct {
|
||||
host string
|
||||
path string
|
||||
}{
|
||||
// TODO: set me to release host/path before release
|
||||
host: "https://anchore.io",
|
||||
path: "/grype/releases/latest/VERSION",
|
||||
host: "https://toolbox-data.anchore.io",
|
||||
path: fmt.Sprintf("/%s/releases/latest/VERSION", internal.ApplicationName),
|
||||
}
|
||||
|
||||
func IsUpdateAvailable() (bool, string, error) {
|
||||
|
|
Loading…
Reference in a new issue