Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 99809b3

Browse files
authored
Merge pull request #400 from secrethub/fix/migrate-item-creation-cli-2
Fix item creation with 1Password CLI 2 when migrating secrets from SecretHub
2 parents d29a942 + 4609f70 commit 99809b3

43 files changed

Lines changed: 184 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2.1
22
jobs:
33
lint:
44
docker:
5-
- image: golangci/golangci-lint:v1.41.1-alpine
5+
- image: golangci/golangci-lint:v1.50.1-alpine
66
steps:
77
- checkout
88
- restore_cache:
@@ -30,13 +30,13 @@ jobs:
3030
arch:
3131
type: string
3232
docker:
33-
- image: circleci/golang:1.14
33+
- image: cimg/go:1.18
3434
steps:
3535
- checkout
3636
- run: GOOS=<< parameters.os >> GOARCH=<< parameters.arch >> go build ./cmd/secrethub
3737
test:
3838
docker:
39-
- image: circleci/golang:1.14
39+
- image: cimg/go:1.18
4040
steps:
4141
- checkout
4242
- restore_cache:
@@ -50,7 +50,7 @@ jobs:
5050
- run: make test
5151
verify-goreleaser:
5252
docker:
53-
- image: goreleaser/goreleaser:v0.133
53+
- image: goreleaser/goreleaser:v1.12.3
5454
steps:
5555
- checkout
5656
- run: goreleaser check

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ brews:
6060
- name: secrethub-cli
6161
ids:
6262
- default
63-
github:
63+
tap:
6464
owner: secrethub
6565
name: homebrew-tools
6666
folder: Formula

go.mod

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/secrethub/secrethub-cli
22

3-
go 1.14
3+
go 1.18
44

55
require (
66
bitbucket.org/zombiezen/cardcpx v0.0.0-20150417151802-902f68ff43ef
@@ -19,10 +19,39 @@ require (
1919
github.com/spf13/pflag v1.0.5
2020
github.com/zalando/go-keyring v0.0.0-20190208082241-fbe81aec3a07
2121
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
22-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
22+
golang.org/x/sys v0.2.0
2323
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
2424
golang.org/x/text v0.3.2
2525
google.golang.org/api v0.26.0
2626
gopkg.in/yaml.v2 v2.4.0
2727
gotest.tools v2.2.0+incompatible
2828
)
29+
30+
require (
31+
cloud.google.com/go v0.57.0 // indirect
32+
github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 // indirect
33+
github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022 // indirect
34+
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf // indirect
35+
github.com/danieljoos/wincred v1.0.2 // indirect
36+
github.com/docker/docker v1.13.1 // indirect
37+
github.com/godbus/dbus v4.1.0+incompatible // indirect
38+
github.com/gofrs/uuid v3.2.0+incompatible // indirect
39+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
40+
github.com/golang/protobuf v1.4.0 // indirect
41+
github.com/google/go-cmp v0.4.0 // indirect
42+
github.com/google/go-querystring v1.0.0 // indirect
43+
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
44+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
45+
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
46+
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 // indirect
47+
github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9 // indirect
48+
github.com/mattn/go-shellwords v1.0.6 // indirect
49+
github.com/pkg/errors v0.9.1 // indirect
50+
go.opencensus.io v0.22.3 // indirect
51+
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5 // indirect
52+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
53+
google.golang.org/appengine v1.6.6 // indirect
54+
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84 // indirect
55+
google.golang.org/grpc v1.29.1 // indirect
56+
google.golang.org/protobuf v1.21.0 // indirect
57+
)

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,9 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w
343343
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
344344
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
345345
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
346-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
347346
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
347+
golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A=
348+
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
348349
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=
349350
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
350351
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

internals/cli/clip/fakeclip/clip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !production
1+
//go:build !production
22

33
// Package fakeclip provides fake implementations of the clip.Clipper interface
44
// to be used for testing.

internals/cli/cloneproc/spawn_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build linux darwin
1+
//go:build linux || darwin
22

33
package cloneproc
44

internals/cli/cobra_template.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -378,21 +378,21 @@ func numFlags(flagSet pflag.FlagSet) int {
378378

379379
// UsageTemplate is the custom usage template of the command.
380380
// Changes in comparison to cobra's default template:
381-
// 1. Usage section
382-
// a. `[flags]` is placed before the arguments.
383-
// b. All arguments are put in the usage in their proper order.
384-
// c. Where applicable, the argument name is replaced with its placeholder.
385-
// 2. Commands section
386-
// a. For the root command (`secrethub`) the commands are grouped into
387-
// `Management commands` and `Commands`
388-
// 2. Flags section
389-
// a. Flag's type was removed.
390-
// b. The help text for flags is well divided into its own column, thus
391-
// making the visibility of the flags better.
392-
// c. At the end of a flag's help text, the name of its environment variable is
393-
// displayed between brackets.
394-
// d. The section is hidden if the only flag is `--help`.
395-
// 4. Arguments section (created by us)
381+
// 1. Usage section
382+
// a. `[flags]` is placed before the arguments.
383+
// b. All arguments are put in the usage in their proper order.
384+
// c. Where applicable, the argument name is replaced with its placeholder.
385+
// 2. Commands section
386+
// a. For the root command (`secrethub`) the commands are grouped into
387+
// `Management commands` and `Commands`
388+
// 2. Flags section
389+
// a. Flag's type was removed.
390+
// b. The help text for flags is well divided into its own column, thus
391+
// making the visibility of the flags better.
392+
// c. At the end of a flag's help text, the name of its environment variable is
393+
// displayed between brackets.
394+
// d. The section is hidden if the only flag is `--help`.
395+
// 4. Arguments section (created by us)
396396
var UsageTemplate = `Usage:
397397
{{if .Cmd.Runnable}} {{(useLine .Cmd .Args)}}{{end}}
398398
{{- if .Cmd.HasAvailableSubCommands}} {{ .Cmd.CommandPath}} [command]{{end}}

internals/cli/masker/stream.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package masker
33
import (
44
"bytes"
55
"io"
6-
"io/ioutil"
76
"sync"
87
"time"
98
)
@@ -80,7 +79,7 @@ func (s *stream) flush(n int) error {
8079
}
8180

8281
// Drop all bytes until the end of the mask.
83-
_, err = s.buf.writeUpToIndex(ioutil.Discard, i+int64(length))
82+
_, err = s.buf.writeUpToIndex(io.Discard, i+int64(length))
8483
if err != nil {
8584
return err
8685
}

internals/cli/mlock/mlock_unavailable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build android darwin nacl netbsd plan9 windows
1+
//go:build android || darwin || nacl || netbsd || plan9 || windows
22

33
package mlock
44

internals/cli/mlock/mlock_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build dragonfly freebsd linux openbsd solaris
1+
//go:build dragonfly || freebsd || linux || openbsd || solaris
22

33
package mlock
44

0 commit comments

Comments
 (0)