diff --git a/.travis.yml b/.travis.yml index 0882593..3f505fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ dist: trusty sudo: required language: go +env: + - DEP_VERSION="0.4.1" + services: - docker @@ -17,13 +20,14 @@ before_install: - sudo apt-get update - sudo apt-get install -y docker-ce - docker version +- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep +- chmod +x $GOPATH/bin/dep install: +- dep ensure - docker build -t cameradar . script: -- curl https://glide.sh/get | sh -- glide install # Run unit tests - go test # Launch a fake camera to check if cameradar is able to access it diff --git a/Dockerfile b/Dockerfile index 3ec021f..b65b303 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,20 +7,22 @@ WORKDIR /go/src/github.com/EtixLabs/cameradar/cameradar RUN apk update && \ apk upgrade && \ apk add nmap nmap-nselibs nmap-scripts \ - curl curl-dev \ - gcc \ - libc-dev \ - git \ - pkgconfig - -RUN curl https://glide.sh/get | sh && glide install + curl curl-dev \ + gcc \ + libc-dev \ + git \ + pkgconfig +ENV DEP_VERSION="0.4.1" +RUN curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep +RUN chmod +x $GOPATH/bin/dep +RUN dep ensure RUN go build -o cameradar # Final stage FROM alpine RUN apk --update add --no-cache nmap nmap-nselibs nmap-scripts \ - curl-dev + curl-dev WORKDIR /app/cameradar COPY --from=build-env /go/src/github.com/EtixLabs/cameradar/dictionaries/ /app/dictionaries/ diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..0582b73 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,225 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/andelf/go-curl" + packages = ["."] + revision = "f8b334df3789fbdf98df3b3b22815e958b956c19" + +[[projects]] + name = "github.com/davecgh/go-spew" + packages = ["spew"] + revision = "346938d642f2ec3594ed81d874461961cd0faa76" + version = "v1.1.0" + +[[projects]] + name = "github.com/fatih/color" + packages = ["."] + revision = "570b54cabe6b8eb0bc2dfce68d964677d63b5260" + version = "v1.5.0" + +[[projects]] + name = "github.com/fsnotify/fsnotify" + packages = ["."] + revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9" + version = "v1.4.7" + +[[projects]] + branch = "master" + name = "github.com/gernest/wow" + packages = [ + ".", + "spin" + ] + revision = "7e0b2a2398989a5d220eebac5742d45422ba7de8" + +[[projects]] + name = "github.com/go-playground/locales" + packages = [ + ".", + "currency" + ] + revision = "e4cbcb5d0652150d40ad0646651076b6bd2be4f6" + version = "v0.11.2" + +[[projects]] + name = "github.com/go-playground/universal-translator" + packages = ["."] + revision = "b32fa301c9fe55953584134cb6853a13c87ec0a1" + version = "v0.16.0" + +[[projects]] + name = "github.com/gorilla/websocket" + packages = ["."] + revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b" + version = "v1.2.0" + +[[projects]] + branch = "master" + name = "github.com/hashicorp/hcl" + packages = [ + ".", + "hcl/ast", + "hcl/parser", + "hcl/scanner", + "hcl/strconv", + "hcl/token", + "json/parser", + "json/scanner", + "json/token" + ] + revision = "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8" + +[[projects]] + name = "github.com/magefile/mage" + packages = [ + "mg", + "sh", + "types" + ] + revision = "ab3ca2f6f85577d7ec82e0a6df721147a2e737f9" + version = "v2.0.1" + +[[projects]] + name = "github.com/magiconair/properties" + packages = ["."] + revision = "d419a98cdbed11a922bf76f257b7c4be79b50e73" + version = "v1.7.4" + +[[projects]] + name = "github.com/mattn/go-colorable" + packages = ["."] + revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" + version = "v0.0.9" + +[[projects]] + name = "github.com/mattn/go-isatty" + packages = ["."] + revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" + version = "v0.0.3" + +[[projects]] + branch = "master" + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "b4575eea38cca1123ec2dc90c26529b5c5acfcff" + +[[projects]] + name = "github.com/pelletier/go-toml" + packages = ["."] + revision = "acdc4509485b587f5e675510c4f2c63e90ff68a8" + version = "v1.1.0" + +[[projects]] + name = "github.com/pkg/errors" + packages = ["."] + revision = "645ef00459ed84a119197bfb8d8205042c6df63d" + version = "v0.8.0" + +[[projects]] + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + name = "github.com/spf13/afero" + packages = [ + ".", + "mem" + ] + revision = "bb8f1927f2a9d3ab41c9340aa034f6b803f4359c" + version = "v1.0.2" + +[[projects]] + name = "github.com/spf13/cast" + packages = ["."] + revision = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4" + version = "v1.1.0" + +[[projects]] + branch = "master" + name = "github.com/spf13/jwalterweatherman" + packages = ["."] + revision = "7c0cea34c8ece3fbeb2b27ab9b59511d360fb394" + +[[projects]] + name = "github.com/spf13/pflag" + packages = ["."] + revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" + version = "v1.0.0" + +[[projects]] + name = "github.com/spf13/viper" + packages = ["."] + revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7" + version = "v1.0.0" + +[[projects]] + name = "github.com/stretchr/objx" + packages = ["."] + revision = "facf9a85c22f48d2f52f2380e4efce1768749a89" + version = "v0.1" + +[[projects]] + name = "github.com/stretchr/testify" + packages = [ + "assert", + "mock" + ] + revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" + version = "v1.2.1" + +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["ssh/terminal"] + revision = "1875d0a70c90e57f11972aefd42276df65e895b9" + +[[projects]] + branch = "master" + name = "golang.org/x/sys" + packages = [ + "unix", + "windows" + ] + revision = "8f27ce8a604014414f8dfffc25cbcde83a3f2216" + +[[projects]] + branch = "master" + name = "golang.org/x/text" + packages = [ + "internal/gen", + "internal/triegen", + "internal/ucd", + "transform", + "unicode/cldr", + "unicode/norm" + ] + revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3" + +[[projects]] + name = "gopkg.in/go-playground/validator.v9" + packages = ["."] + revision = "48a433ba4bcadc5be9aa16d4bdcb383d3f57a741" + version = "v9.9.3" + +[[projects]] + name = "gopkg.in/tylerb/graceful.v1" + packages = ["."] + revision = "4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb" + version = "v1.2.15" + +[[projects]] + branch = "v2" + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "ee033333addaa0634f6b1145cedba6ddba69f9b3f852f78726ee7d8ad45048d0" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..78335ae --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,70 @@ +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + branch = "master" + name = "github.com/andelf/go-curl" + +[[constraint]] + name = "github.com/fatih/color" + version = "1.5.0" + +[[constraint]] + branch = "master" + name = "github.com/gernest/wow" + +[[constraint]] + name = "github.com/gorilla/websocket" + version = "1.2.0" + +[[constraint]] + name = "github.com/pkg/errors" + version = "0.8.0" + +[[constraint]] + name = "github.com/spf13/pflag" + version = "1.0.0" + +[[constraint]] + name = "github.com/spf13/viper" + version = "1.0.0" + +[[constraint]] + name = "github.com/stretchr/testify" + version = "1.2.1" + +[[constraint]] + name = "gopkg.in/go-playground/validator.v9" + version = "9.9.3" + +[[constraint]] + name = "gopkg.in/tylerb/graceful.v1" + version = "1.2.15" + +[prune] + go-tests = true + unused-packages = true diff --git a/glide.lock b/glide.lock deleted file mode 100644 index 814e445..0000000 --- a/glide.lock +++ /dev/null @@ -1,88 +0,0 @@ -hash: f646c12961eac693464d18f1ab91a7dd734514a1de59dfce2fe6de1507512bf7 -updated: 2017-10-31T09:52:06.986193695+01:00 -imports: -- name: github.com/andelf/go-curl - version: f8b334df3789fbdf98df3b3b22815e958b956c19 -- name: github.com/fatih/color - version: 570b54cabe6b8eb0bc2dfce68d964677d63b5260 -- name: github.com/fsnotify/fsnotify - version: 4da3e2cfbabc9f751898f250b49f2439785783a1 -- name: github.com/gernest/wow - version: 57298475c6371a5a652e74dcf624c80edfc5ae1a - subpackages: - - spin -- name: github.com/go-playground/locales - version: e4cbcb5d0652150d40ad0646651076b6bd2be4f6 -- name: github.com/go-playground/universal-translator - version: b32fa301c9fe55953584134cb6853a13c87ec0a1 -- name: github.com/gorilla/websocket - version: ea4d1f681babbce9545c9c5f3d5194a789c89f5b -- name: github.com/hashicorp/hcl - version: 23c074d0eceb2b8a5bfdbb271ab780cde70f05a8 - subpackages: - - hcl/ast - - hcl/parser - - hcl/scanner - - hcl/strconv - - hcl/token - - json/parser - - json/scanner - - json/token -- name: github.com/magiconair/properties - version: 8d7837e64d3c1ee4e54a880c5a920ab4316fc90a -- name: github.com/mattn/go-colorable - version: 5411d3eea5978e6cdc258b30de592b60df6aba96 - repo: https://github.com/mattn/go-colorable -- name: github.com/mattn/go-isatty - version: 57fdcb988a5c543893cc61bce354a6e24ab70022 - repo: https://github.com/mattn/go-isatty -- name: github.com/mitchellh/mapstructure - version: 06020f85339e21b2478f756a78e295255ffa4d6a -- name: github.com/pelletier/go-toml - version: 4e9e0ee19b60b13eb79915933f44d8ed5f268bdd -- name: github.com/pkg/errors - version: 645ef00459ed84a119197bfb8d8205042c6df63d -- name: github.com/pmezard/go-difflib - version: d8ed2627bdf02c080bf22230dbb337003b7aba2d - subpackages: - - difflib -- name: github.com/spf13/afero - version: 5660eeed305fe5f69c8fc6cf899132a459a97064 - subpackages: - - mem -- name: github.com/spf13/cast - version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 -- name: github.com/spf13/jwalterweatherman - version: 12bd96e66386c1960ab0f74ced1362f66f552f7b -- name: github.com/spf13/pflag - version: 97afa5e7ca8a08a383cb259e06636b5e2cc7897f -- name: github.com/spf13/viper - version: 8ef37cbca71638bf32f3d5e194117d4cb46da163 -- name: github.com/stretchr/objx - version: cbeaeb16a013161a98496fad62933b1d21786672 -- name: github.com/stretchr/testify - version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 - subpackages: - - mock -- name: golang.org/x/crypto - version: 2509b142fb2b797aa7587dad548f113b2c0f20ce - subpackages: - - ssh/terminal -- name: golang.org/x/sys - version: e24f485414aeafb646f6fca458b0bf869c0880a1 - repo: https://go.googlesource.com/sys - subpackages: - - unix - - windows -- name: golang.org/x/text - version: 6eab0e8f74e86c598ec3b6fad4888e0c11482d48 - subpackages: - - transform - - unicode/norm -- name: gopkg.in/go-playground/validator.v9 - version: a021b2ec9a8a8bb970f3f15bc42617cb520e8a64 -- name: gopkg.in/tylerb/graceful.v1 - version: 4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb -- name: gopkg.in/yaml.v2 - version: eb3733d160e74a9c7e442f435eb3bea458e1d19f -testImports: [] diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index be76fb6..0000000 --- a/glide.yaml +++ /dev/null @@ -1,26 +0,0 @@ -package: github.com/EtixLabs/cameradar -import: -- package: github.com/andelf/go-curl -- package: github.com/fatih/color - version: ~1.5.0 -- package: github.com/gernest/wow - subpackages: - - spin -- package: github.com/gorilla/websocket - version: ~1.2.0 -- package: github.com/pkg/errors - version: ~0.8.0 -- package: github.com/stretchr/testify - version: ~1.1.4 - subpackages: - - mock -- package: gopkg.in/go-playground/validator.v9 - version: ~9.7.0 -- package: gopkg.in/tylerb/graceful.v1 - version: ~1.2.15 -- package: github.com/go-playground/universal-translator - version: ~0.16.0 -- package: github.com/go-playground/locales - version: ~0.11.2 -- package: github.com/spf13/pflag -- package: github.com/spf13/viper