Merge pull request #212726 from techknowlogick/drone-cli-170
drone-cli: 1.6.0 -> 1.7.0
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
From 93f4f92b017935a35988e7210036db8020753f9e Mon Sep 17 00:00:00 2001
|
||||
From: Jake Hillion <jake@hillion.co.uk>
|
||||
Date: Sun, 21 Feb 2021 21:26:39 +0000
|
||||
Subject: [PATCH] removed dependency for systemcertpool
|
||||
|
||||
---
|
||||
drone/internal/util.go | 7 +++++--
|
||||
go.mod | 1 -
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drone/internal/util.go b/drone/internal/util.go
|
||||
index 46c8ec6f..25d4def7 100644
|
||||
--- a/drone/internal/util.go
|
||||
+++ b/drone/internal/util.go
|
||||
@@ -2,11 +2,11 @@ package internal
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
+ "crypto/x509"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
- "github.com/jackspirou/syscerts"
|
||||
"github.com/urfave/cli"
|
||||
"golang.org/x/net/proxy"
|
||||
"golang.org/x/oauth2"
|
||||
@@ -35,7 +35,10 @@ func NewClient(c *cli.Context) (drone.Client, error) {
|
||||
}
|
||||
|
||||
// attempt to find system CA certs
|
||||
- certs := syscerts.SystemRootsPool()
|
||||
+ certs, err := x509.SystemCertPool()
|
||||
+ if err != nil {
|
||||
+ return nil, err
|
||||
+ }
|
||||
tlsConfig := &tls.Config{
|
||||
RootCAs: certs,
|
||||
InsecureSkipVerify: skip,
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
diff --git a/go.mod b/go.mod
|
||||
index 99f9b37..ebbdb54 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -28,3 +28,5 @@ require (
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
||||
)
|
||||
+
|
||||
+replace github.com/jackspirou/syscerts => github.com/akhenakh/syscerts v0.0.0-20201230132944-1f7ee1de1ba3
|
||||
diff --git a/go.sum b/go.sum
|
||||
index 8c379ed..283ba39 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -64,6 +64,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
|
||||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ=
|
||||
+github.com/akhenakh/syscerts v0.0.0-20201230132944-1f7ee1de1ba3 h1:2d14fzBv1dj4PimhBxXDlaltfNU6rGmA4NyYa3aB5xQ=
|
||||
+github.com/akhenakh/syscerts v0.0.0-20201230132944-1f7ee1de1ba3/go.mod h1:ijVDlqqT/Ok/B2v7GaiSj4gfCl7uipB8/8jwgJvrTSk=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
@@ -1,27 +1,32 @@
|
||||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
version = "1.6.0";
|
||||
version = "1.7.0";
|
||||
pname = "drone-cli";
|
||||
revision = "v${version}";
|
||||
|
||||
vendorSha256 = "sha256-0vHOPuSn7eczlUeCTz+SOMuDdRQTzw/TnH1rt/ltWOQ=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
patches = [ ./0001-use-different-upstream-for-gomod.patch ];
|
||||
|
||||
ldflags = [
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "harness";
|
||||
repo = "drone-cli";
|
||||
rev = revision;
|
||||
sha256 = "sha256-TVOj1C5X3fTRZF29hId13LjkkwaAFntlozpmYVUfVJI=";
|
||||
hash = "sha256-PZ0M79duSctPepD5O+NdJZKhkyR21g/4P6loJtoWZiU=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-JC7OR4ySDsVWmrBBTjpwZrkJlM8RJehbsvXW/VtA4VA=";
|
||||
|
||||
# patch taken from https://patch-diff.githubusercontent.com/raw/harness/drone-cli/pull/179.patch
|
||||
# but with go.mod changes removed due to conflict
|
||||
patches = [ ./0001-use-builtin-go-syscerts.patch ];
|
||||
|
||||
ldflags = [
|
||||
"-X main.version=${version}"
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
mainProgram = "drone";
|
||||
maintainers = with maintainers; [ techknowlogick ];
|
||||
|
||||
Reference in New Issue
Block a user