From 9b5c18bcdd14953e506d848a4c1bd6d678c2b761 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 9 Jan 2019 15:18:15 +0800 Subject: [PATCH] feat(vendor): switch dep to go module Signed-off-by: Bo-Yi Wu --- .drone.yml | 26 ++++++++++++-------------- Gopkg.lock | 28 ---------------------------- Gopkg.toml | 38 -------------------------------------- download/download.go | 6 +++--- go.mod | 6 ++++++ go.sum | 4 ++++ 6 files changed, 25 insertions(+), 83 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.drone.yml b/.drone.yml index fcd2df6..5dc533a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,29 +3,24 @@ workspace: path: src/github.com/drone-plugins/drone-hugo pipeline: - deps: - image: golang:1.10 - pull: true - commands: - - go get -u github.com/golang/dep/cmd/dep - - dep ensure - - dep status - test: - image: golang:1.10 + image: golang:1.11 pull: true + environment: + - GO111MODULE=on commands: - go vet ./... - go test -cover ./... build_linux_amd64: - image: golang:1.10 + image: golang:1.11 pull: true group: build environment: - GOOS=linux - GOARCH=amd64 - CGO_ENABLED=0 + - GO111MODULE=on commands: - | if test "${DRONE_TAG}" = ""; then @@ -35,13 +30,14 @@ pipeline: fi # build_linux_arm64: - # image: golang:1.10 + # image: golang:1.11 # pull: true # group: build # environment: # - GOOS=linux # - GOARCH=arm64 # - CGO_ENABLED=0 + # - GO111MODULE=on # commands: # - | # if test "${DRONE_TAG}" = ""; then @@ -51,7 +47,7 @@ pipeline: # fi # build_linux_arm: - # image: golang:1.10 + # image: golang:1.11 # pull: true # group: build # environment: @@ -59,6 +55,7 @@ pipeline: # - GOARCH=arm # - CGO_ENABLED=0 # - GOARM=7 + # - GO111MODULE=on # commands: # - | # if test "${DRONE_TAG}" = ""; then @@ -68,13 +65,14 @@ pipeline: # fi # build_linux_386: - # image: golang:1.10 + # image: golang:1.11 # pull: true # group: build # environment: # - GOOS=linux # - GOARCH=386 # - CGO_ENABLED=0 + # - GO111MODULE=on # commands: # - | # if test "${DRONE_TAG}" = ""; then @@ -146,4 +144,4 @@ pipeline: pull: true secrets: [ webhook_url ] when: - status: [ success ] \ No newline at end of file + status: [ success ] diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 0d324f1..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,28 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:40e195917a951a8bf867cd05de2a46aaf1806c50cf92eebf4c16f78cd196f747" - name = "github.com/pkg/errors" - packages = ["."] - pruneopts = "UT" - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - digest = "1:b24d38b282bacf9791408a080f606370efa3d364e4b5fd9ba0f7b87786d3b679" - name = "github.com/urfave/cli" - packages = ["."] - pruneopts = "UT" - revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" - version = "v1.20.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/pkg/errors", - "github.com/urfave/cli", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 5529e89..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,38 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# 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]] - name = "github.com/pkg/errors" - version = "0.8.0" - -[[constraint]] - name = "github.com/urfave/cli" - version = "1.20.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/download/download.go b/download/download.go index 98a01f2..b55cf99 100644 --- a/download/download.go +++ b/download/download.go @@ -6,13 +6,13 @@ import ( "fmt" "io" "io/ioutil" + "log" + "net/http" "os" + "runtime" "strings" "github.com/pkg/errors" - "log" - "net/http" - "runtime" ) var ( diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..18491f8 --- /dev/null +++ b/go.mod @@ -0,0 +1,6 @@ +module github.com/drone-plugins/drone-hugo + +require ( + github.com/pkg/errors v0.8.1 + github.com/urfave/cli v1.20.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..46b4788 --- /dev/null +++ b/go.sum @@ -0,0 +1,4 @@ +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=