diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index df53883..9a4dc7b 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -5,7 +5,7 @@ jobs: name: Build and Test strategy: matrix: - go-version: [1.18.x] + go-version: [1.20.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6331f3..3865f4b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.20.x - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 diff --git a/.goreleaser.yml b/.goreleaser.yml index 2fbc6ec..71f49f9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -29,8 +29,6 @@ builds: goarch: arm64 - goos: darwin goarch: 386 - - goos: darwin - goarch: arm64 archives: - name_template: "totp_{{ .Version }}_{{ .Os }}_{{ .Arch }}" format_overrides: diff --git a/Makefile b/Makefile index f912fc4..46d7cbc 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ WINDOWS=$(EXECUTABLE)-windows LINUX_AMD64=$(LINUX)-amd64 DARWIN_AMD64=$(DARWIN)-amd64 +DARWIN_ARM64=$(DARWIN)-arm64 WINDOWS_AMD64=$(WINDOWS)-amd64.exe LINUX_386=$(LINUX)-386 @@ -18,7 +19,7 @@ WINDOWS_386=$(WINDOWS)-386.exe LINUX_ARM32=$(LINUX)-arm LINUX_ARM64=$(LINUX)-arm64 -all: linux-amd64 windows-amd64 darwin-amd64 linux-arm linux-arm64 +all: linux-amd64 windows-amd64 darwin-amd64 darwin-arm64 linux-arm linux-arm64 linux-amd64: $(LINUX_AMD64) @@ -26,6 +27,8 @@ windows-amd64: $(WINDOWS_AMD64) darwin-amd64: $(DARWIN_AMD64) +darwin-arm64: $(DARWIN_ARM64) + linux-arm: $(LINUX_ARM32) linux-arm64: $(LINUX_ARM64) @@ -43,6 +46,9 @@ $(LINUX_AMD64): $(SRCS) $(DARWIN_AMD64): $(SRCS) GOOS=darwin GOARCH=amd64 go build -o $@ -ldflags "-X $(VERSION_INJECT)=$(shell sh scripts/get-version.sh)" $(MAIN) +$(DARWIN_ARM64): $(SRCS) + GOOS=darwin GOARCH=arm64 go build -o $@ -ldflags "-X $(VERSION_INJECT)=$(shell sh scripts/get-version.sh)" $(MAIN) + $(LINUX_ARM32): $(SRCS) GOOS=linux GOARCH=arm go build -o $@ -ldflags "-X $(VERSION_INJECT)=$(shell sh scripts/get-version.sh)" $(MAIN) diff --git a/README.md b/README.md index 27f7002..ac32487 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ gpg --quiet --batch --passphrase mypassphrase --decrypt totp-collection.gpg | to ## Building -`totp` is mostly developed using Go 1.18.x on Debian based systems. Only `go` is required but to use the automated actions the `Makefile` provides, `make` must be installed. +`totp` is mostly developed using Go 1.19.x on Debian based systems. Only `go` is required but to use the automated actions the `Makefile` provides, `make` must be installed. To build everything: diff --git a/go.mod b/go.mod index 96f9f31..6726c4b 100644 --- a/go.mod +++ b/go.mod @@ -1,15 +1,15 @@ module github.com/arcanericky/totp -go 1.18 +go 1.20 require ( - github.com/pquerna/otp v1.3.0 + github.com/pquerna/otp v1.4.0 github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e - github.com/spf13/cobra v1.5.0 + github.com/spf13/cobra v1.6.1 ) require ( github.com/boombuler/barcode v1.0.1 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/spf13/pflag v1.0.5 // indirect ) diff --git a/go.sum b/go.sum index 9d7469b..d312816 100644 --- a/go.sum +++ b/go.sum @@ -4,21 +4,21 @@ github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/otp v1.3.0 h1:oJV/SkzR33anKXwQU3Of42rL4wbrffP4uvUf1SvS5Xs= -github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= +github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= +github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=