From c96c54cdbda3c572d5ad1159df13fc208c45d67c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 9 Jan 2019 01:04:12 +0800 Subject: [PATCH 1/2] feat(go): switch dep to go module --- .appveyor.yml | 4 +--- .drone.yml | 14 ++++++-------- Gopkg.lock | 21 --------------------- Gopkg.toml | 11 ----------- go.mod | 6 ++++++ go.sum | 4 ++++ 6 files changed, 17 insertions(+), 43 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.appveyor.yml b/.appveyor.yml index 7eb3519..5bfa10a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,6 +11,7 @@ environment: secure: '4YzzahbEiMZQJpOCOd1LAw==' DOCKER_PASSWORD: secure: 'VqO/G3Zfslu6zSLdwHKO+Q==' + GO111MODULE: on install: - ps: | @@ -21,9 +22,6 @@ install: build_script: - ps: | - go get -u github.com/golang/dep/cmd/dep - dep ensure - if ( $env:APPVEYOR_REPO_TAG -eq 'false' ) { go build -ldflags "-X main.build=$env:APPVEYOR_BUILD_VERSION" -a -o release/drone-ansible.exe } else { diff --git a/.drone.yml b/.drone.yml index 092f4dd..b1b6768 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,17 +3,11 @@ workspace: path: src/github.com/drone-plugins/drone-ansible 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 pull: true + environment: + - GO111MODULE=on commands: - go vet ./... - go test -cover ./... @@ -26,6 +20,7 @@ pipeline: - GOOS=linux - GOARCH=amd64 - CGO_ENABLED=0 + - GO111MODULE=on commands: - | if test "${DRONE_TAG}" = ""; then @@ -42,6 +37,7 @@ pipeline: # - GOOS=linux # - GOARCH=386 # - CGO_ENABLED=0 + # - GO111MODULE=on # commands: # - | # if test "${DRONE_TAG}" = ""; then @@ -58,6 +54,7 @@ pipeline: # - GOOS=linux # - GOARCH=arm64 # - CGO_ENABLED=0 + # - GO111MODULE=on # commands: # - | # if test "${DRONE_TAG}" = ""; then @@ -75,6 +72,7 @@ pipeline: # - GOARCH=arm # - CGO_ENABLED=0 # - GOARM=7 + # - GO111MODULE=on # commands: # - | # if test "${DRONE_TAG}" = ""; then diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index ccf698c..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,21 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/pkg/errors" - packages = ["."] - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - name = "github.com/urfave/cli" - packages = ["."] - revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" - version = "v1.20.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "dc16a066ec8e18d633e963b36f9c09f580b9323f1191cd89a69eebb1852abe92" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 712cd51..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,11 +0,0 @@ -[[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/go.mod b/go.mod new file mode 100644 index 0000000..2671bc5 --- /dev/null +++ b/go.mod @@ -0,0 +1,6 @@ +module github.com/drone-plugins/drone-ansible + +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= From 368c0c6232008400826102f90ef41b79d46b5a72 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Wed, 9 Jan 2019 01:06:40 +0800 Subject: [PATCH 2/2] upgrade go version. Signed-off-by: Bo-Yi Wu --- .drone.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index b1b6768..3f2ac21 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ workspace: pipeline: test: - image: golang:1.10 + image: golang:1.11 pull: true environment: - GO111MODULE=on @@ -13,7 +13,7 @@ pipeline: - go test -cover ./... build_linux_amd64: - image: golang:1.10 + image: golang:1.11 pull: true group: build environment: @@ -30,7 +30,7 @@ pipeline: fi # build_linux_i386: - # image: golang:1.10 + # image: golang:1.11 # pull: true # group: build # environment: @@ -47,7 +47,7 @@ pipeline: # fi # build_linux_arm64: - # image: golang:1.10 + # image: golang:1.11 # pull: true # group: build # environment: @@ -64,7 +64,7 @@ pipeline: # fi # build_linux_arm: - # image: golang:1.10 + # image: golang:1.11 # pull: true # group: build # environment: