mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
finalize update check URL
This commit is contained in:
parent
19eadde9ca
commit
06f8355fce
2
Makefile
2
Makefile
@ -222,7 +222,7 @@ release: clean-dist ## Build and publish final binaries and packages
|
|||||||
-e AWS_SECRET_ACCESS_KEY=${TOOLBOX_AWS_SECRET_ACCESS_KEY} \
|
-e AWS_SECRET_ACCESS_KEY=${TOOLBOX_AWS_SECRET_ACCESS_KEY} \
|
||||||
-v $(shell pwd)/$(DISTDIR)/:/distmount \
|
-v $(shell pwd)/$(DISTDIR)/:/distmount \
|
||||||
amazon/aws-cli --debug \
|
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
|
.PHONY: clean
|
||||||
clean: clean-dist clean-snapshot ## Remove previous builds and result reports
|
clean: clean-dist clean-snapshot ## Remove previous builds and result reports
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package internal
|
package internal
|
||||||
|
|
||||||
// note: must be a single word, all lowercase
|
// note: do not change this
|
||||||
const ApplicationName = "syft"
|
const ApplicationName = "syft"
|
||||||
|
|||||||
@ -7,15 +7,15 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
hashiVersion "github.com/anchore/go-version"
|
hashiVersion "github.com/anchore/go-version"
|
||||||
|
"github.com/anchore/syft/internal"
|
||||||
)
|
)
|
||||||
|
|
||||||
var latestAppVersionURL = struct {
|
var latestAppVersionURL = struct {
|
||||||
host string
|
host string
|
||||||
path string
|
path string
|
||||||
}{
|
}{
|
||||||
// TODO: set me to release host/path before release
|
host: "https://toolbox-data.anchore.io",
|
||||||
host: "https://anchore.io",
|
path: fmt.Sprintf("/%s/releases/latest/VERSION", internal.ApplicationName),
|
||||||
path: "/syft/releases/latest/VERSION",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsUpdateAvailable() (bool, string, error) {
|
func IsUpdateAvailable() (bool, string, error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user