зеркало из https://github.com/mozilla/scribe.git
Use standard GOPATH
This commit is contained in:
Родитель
ccdc782bb6
Коммит
8d37e6b172
39
Makefile
39
Makefile
|
@ -1,41 +1,50 @@
|
|||
PROJS = scribe scribecmd evrtest ubuntu-cve-tracker parse-nasltokens \
|
||||
scribevulnpolicy
|
||||
GO = GOPATH=$(shell pwd):$(shell go env GOROOT)/bin go
|
||||
export SCRIBECMD = $(shell pwd)/bin/scribecmd
|
||||
export EVRTESTCMD = $(shell pwd)/bin/evrtest
|
||||
GO = GO15VENDOREXPERIMENT=1 go
|
||||
GOGETTER = GOPATH=$(shell pwd)/.tmpdeps go get -d
|
||||
GOLINT = golint
|
||||
|
||||
all: $(PROJS)
|
||||
all: $(PROJS) runtests
|
||||
|
||||
ubuntu-cve-tracker:
|
||||
$(GO) install ubuntu-cve-tracker
|
||||
$(GO) install github.com/mozilla/scribe/ubuntu-cve-tracker
|
||||
|
||||
parse-nasltokens:
|
||||
$(GO) install parse-nasltokens
|
||||
$(GO) install github.com/mozilla/scribe/parse-nasltokens
|
||||
|
||||
evrtest:
|
||||
$(GO) install evrtest
|
||||
$(GO) install github.com/mozilla/scribe/evrtest
|
||||
|
||||
scribe:
|
||||
$(GO) build scribe
|
||||
$(GO) install scribe
|
||||
$(GO) build scribe/vulnpolicy
|
||||
$(GO) install scribe/vulnpolicy
|
||||
$(GO) install github.com/mozilla/scribe
|
||||
$(GO) install github.com/mozilla/scribe/vulnpolicy
|
||||
|
||||
scribecmd:
|
||||
$(GO) install scribecmd
|
||||
$(GO) install github.com/mozilla/scribe/scribecmd
|
||||
|
||||
scribevulnpolicy:
|
||||
$(GO) install scribevulnpolicy
|
||||
$(GO) install github.com/mozilla/scribe/scribevulnpolicy
|
||||
|
||||
runtests: scribetests gotests
|
||||
|
||||
gotests:
|
||||
$(GO) test -v scribe
|
||||
$(GO) test -v -covermode=count -coverprofile=coverage.out github.com/mozilla/scribe
|
||||
|
||||
showcoverage: gotests
|
||||
$(GO) tool cover -html=coverage.out
|
||||
|
||||
scribetests: $(PROJS)
|
||||
cd test && $(MAKE) runtests
|
||||
cd test && SCRIBECMD=$$(which scribecmd) EVRTESTCMD=$$(which evrtest) $(MAKE) runtests
|
||||
|
||||
lint:
|
||||
$(GOLINT) $(PROJECT)
|
||||
|
||||
vet:
|
||||
$(GO) vet $(PROJECT)
|
||||
|
||||
clean:
|
||||
rm -rf pkg
|
||||
rm -f bin/*
|
||||
cd test && $(MAKE) clean
|
||||
|
||||
.PHONY: $(PROJS) runtests gotests showcoverage scribetests lint vet clean
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -9,7 +9,7 @@ package scribe_test
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
"testing"
|
||||
)
|
||||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -9,7 +9,7 @@ package scribe_test
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
)
|
||||
|
||||
var flagDebug bool
|
|
@ -15,7 +15,8 @@ import (
|
|||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"scribe/vulnpolicy"
|
||||
|
||||
"github.com/mozilla/scribe/vulnpolicy"
|
||||
)
|
||||
|
||||
func errExit(s string, args ...interface{}) {
|
|
@ -18,7 +18,7 @@ import (
|
|||
"os"
|
||||
"path"
|
||||
"regexp"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
|
@ -9,7 +9,7 @@ package vulnpolicy
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
)
|
||||
|
||||
const amazon_expression = "^(Amazon Linux AMI.*)$"
|
|
@ -9,7 +9,7 @@ package vulnpolicy
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
)
|
||||
|
||||
type RedHatRelease struct {
|
|
@ -10,7 +10,7 @@ package vulnpolicy
|
|||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
)
|
||||
|
||||
type UbuntuRelease struct {
|
|
@ -11,7 +11,7 @@ import (
|
|||
"crypto/md5"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"scribe"
|
||||
"github.com/mozilla/scribe"
|
||||
)
|
||||
|
||||
type Policy struct {
|
Загрузка…
Ссылка в новой задаче