From 9aaf419f35752379e2f511ac1db873a603b9e1da Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 11:05:35 +0200 Subject: [PATCH] chore(deps): update module go to 1.19 (#97) --- .drone.star | 18 +++++++++--------- .golangci.yml | 2 +- Makefile | 2 +- go.mod | 2 +- plugin/ansible.go | 7 +++---- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.drone.star b/.drone.star index 15c5860..646ad03 100644 --- a/.drone.star +++ b/.drone.star @@ -32,7 +32,7 @@ def test(ctx): "steps": [ { "name": "deps", - "image": "golang:1.18", + "image": "golang:1.19", "commands": [ "make deps", ], @@ -45,7 +45,7 @@ def test(ctx): }, { "name": "generate", - "image": "golang:1.18", + "image": "golang:1.19", "commands": [ "make generate", ], @@ -58,7 +58,7 @@ def test(ctx): }, { "name": "lint", - "image": "golang:1.18", + "image": "golang:1.19", "commands": [ "make lint", ], @@ -71,7 +71,7 @@ def test(ctx): }, { "name": "test", - "image": "golang:1.18", + "image": "golang:1.19", "commands": [ "make test", ], @@ -110,7 +110,7 @@ def build(ctx): "steps": [ { "name": "generate", - "image": "golang:1.18", + "image": "golang:1.19", "pull": "always", "commands": [ "make generate", @@ -124,7 +124,7 @@ def build(ctx): }, { "name": "build", - "image": "techknowlogick/xgo:go-1.18.x", + "image": "techknowlogick/xgo:go-1.19.x", "pull": "always", "commands": [ "make release", @@ -138,7 +138,7 @@ def build(ctx): }, { "name": "executable", - "image": "golang:1.18", + "image": "golang:1.19", "pull": "always", "commands": [ "$(find dist/ -executable -type f -iname drone-ansible-linux-amd64) --help", @@ -205,7 +205,7 @@ def docker(ctx, arch): "steps": [ { "name": "generate", - "image": "golang:1.18", + "image": "golang:1.19", "pull": "always", "commands": [ "make generate", @@ -219,7 +219,7 @@ def docker(ctx, arch): }, { "name": "build", - "image": "golang:1.18", + "image": "golang:1.19", "pull": "always", "commands": [ "make build", diff --git a/.golangci.yml b/.golangci.yml index db61867..6bfef42 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,4 +28,4 @@ run: linters-settings: gofumpt: extra-rules: true - lang-version: "1.18" + lang-version: "1.19" diff --git a/Makefile b/Makefile index 1f90527..ac2d273 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest GENERATE ?= $(IMPORT)/pkg/templates XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest -XGO_VERSION := go-1.18.x +XGO_VERSION := go-1.19.x XGO_TARGETS ?= linux/amd64,linux/arm-6,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64 TAGS ?= netgo diff --git a/go.mod b/go.mod index ae7a784..4a746b1 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/owncloud-ci/drone-ansible -go 1.18 +go 1.19 require ( github.com/drone-plugins/drone-plugin-lib v0.4.0 diff --git a/plugin/ansible.go b/plugin/ansible.go index b9550f8..fffbcd2 100644 --- a/plugin/ansible.go +++ b/plugin/ansible.go @@ -2,7 +2,6 @@ package plugin import ( "fmt" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -28,7 +27,7 @@ func (p *Plugin) ansibleConfig() error { return errors.Wrap(err, "failed to create ansible directory") } - if err := ioutil.WriteFile(ansibleConfig, []byte(ansibleContent), 0o600); err != nil { + if err := os.WriteFile(ansibleConfig, []byte(ansibleContent), 0o600); err != nil { return errors.Wrap(err, "failed to create ansible config") } @@ -36,7 +35,7 @@ func (p *Plugin) ansibleConfig() error { } func (p *Plugin) privateKey() error { - tmpfile, err := ioutil.TempFile("", "privateKey") + tmpfile, err := os.CreateTemp("", "privateKey") if err != nil { return errors.Wrap(err, "failed to create private key file") } @@ -54,7 +53,7 @@ func (p *Plugin) privateKey() error { } func (p *Plugin) vaultPass() error { - tmpfile, err := ioutil.TempFile("", "vaultPass") + tmpfile, err := os.CreateTemp("", "vaultPass") if err != nil { return errors.Wrap(err, "failed to create vault password file") }