Skip to content

Commit

Permalink
Merge pull request #134 from carolynvs/bump-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
carolynvs authored Feb 21, 2023
2 parents e4a58de + f5cd591 commit bfa78b4
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 962 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: cimg/go:1.17.8
- image: cimg/go:1.19.6
steps:
- checkout
- setup_remote_docker:
Expand All @@ -11,7 +11,7 @@ jobs:

release:
docker:
- image: cimg/go:1.17.8
- image: cimg/go:1.19.6
steps:
- checkout
- run:
Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ linters:
enable-all: false
disable-all: true
enable:
- deadcode
- errcheck
- gocyclo
- gofmt
Expand All @@ -15,12 +14,10 @@ linters:
- nakedret
- revive
- staticcheck
- structcheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
linters-settings:
gocyclo:
min-complexity: 16
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG ALPINE_VERSION=3.15
ARG GO_VERSION=1.17.8
ARG ALPINE_VERSION=3.17
ARG GO_VERSION=1.19.6

# build image
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} as build

ARG DOCKERCLI_VERSION=19.03.1
ARG DOCKERCLI_VERSION=20.10.23
ARG DOCKERCLI_CHANNEL=stable

ARG BUILDTIME
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ check_go_env:

get-tools:
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.0
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2

# Default build
build: bin/cnab-to-oci
Expand Down
3 changes: 1 addition & 2 deletions cmd/cnab-to-oci/fixup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"io/ioutil"
"os"

"github.com/cnabio/cnab-go/bundle"
Expand Down Expand Up @@ -46,7 +45,7 @@ func fixupCmd() *cobra.Command {

func runFixup(opts fixupOptions) error {
var b bundle.Bundle
bundleJSON, err := ioutil.ReadFile(opts.input)
bundleJSON, err := os.ReadFile(opts.input)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/cnab-to-oci/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"io/ioutil"
"os"

"github.com/cnabio/cnab-to-oci/remotes"
Expand Down Expand Up @@ -62,5 +61,5 @@ func writeOutput(file string, data interface{}) error {
fmt.Fprintln(os.Stdout, string(bytes))
return nil
}
return ioutil.WriteFile(file, bytes, 0644)
return os.WriteFile(file, bytes, 0644)
}
3 changes: 1 addition & 2 deletions cmd/cnab-to-oci/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"

"github.com/cnabio/cnab-go/bundle"
Expand Down Expand Up @@ -54,7 +53,7 @@ func pushCmd() *cobra.Command {

func runPush(opts pushOptions) error {
var b bundle.Bundle
bundleJSON, err := ioutil.ReadFile(opts.input)
bundleJSON, err := os.ReadFile(opts.input)
if err != nil {
return err
}
Expand Down
9 changes: 4 additions & 5 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package e2e
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -67,7 +66,7 @@ func TestPushAndPullCNAB(t *testing.T) {

// Check the fixed bundle
applyTemplate(t, serviceImageName, whalesayImageName, invocationImageName, invocDigest, filepath.Join("testdata", "bundle.json.golden.template"), filepath.Join("testdata", "bundle.json.golden"))
buf, err := ioutil.ReadFile(dir.Join("fixed-bundle.json"))
buf, err := os.ReadFile(dir.Join("fixed-bundle.json"))
assert.NilError(t, err)
golden.Assert(t, string(buf), "bundle.json.golden")

Expand All @@ -94,9 +93,9 @@ func TestPushAndPullCNAB(t *testing.T) {
"--bundle", dir.Join("pulled-bundle.json"),
"--relocation-map", dir.Join("pulled-relocation.json"),
"--insecure-registries", registry))
pulledBundle, err := ioutil.ReadFile(dir.Join("pulled-bundle.json"))
pulledBundle, err := os.ReadFile(dir.Join("pulled-bundle.json"))
assert.NilError(t, err)
pulledRelocation, err := ioutil.ReadFile(dir.Join("pulled-relocation.json"))
pulledRelocation, err := os.ReadFile(dir.Join("pulled-relocation.json"))
assert.NilError(t, err)

// Check the fixed bundle.json is equal to the pulled bundle.json
Expand Down Expand Up @@ -134,7 +133,7 @@ func applyTemplate(t *testing.T, serviceImageName, whalesayImageName, invocation
}

func checkRelocationMap(t *testing.T, serviceImageName, invocationImageName, appImageName, relocationMapFile string) {
data, err := ioutil.ReadFile(relocationMapFile)
data, err := os.ReadFile(relocationMapFile)
assert.NilError(t, err)
relocationMap := map[string]string{}
err = json.Unmarshal(data, &relocationMap)
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module github.com/cnabio/cnab-to-oci

go 1.17
go 1.19

require (
github.com/cnabio/cnab-go v0.23.4
github.com/cnabio/cnab-go v0.25.1
github.com/containerd/containerd v1.6.18
github.com/docker/cli v20.10.17+incompatible
github.com/docker/cli v23.0.1+incompatible
github.com/docker/distribution v2.8.1+incompatible
github.com/docker/docker v20.10.17+incompatible
github.com/docker/docker v23.0.1+incompatible
github.com/docker/go v1.5.1-1
github.com/hashicorp/go-multierror v1.1.1
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.2.1
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync v0.1.0
gotest.tools/v3 v3.0.3
)

Expand Down Expand Up @@ -52,8 +52,8 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
Expand Down
Loading

0 comments on commit bfa78b4

Please sign in to comment.