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