Skip to content

Commit

Permalink
fix: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
PSanetra committed Mar 27, 2024
1 parent 1abf001 commit 26cbd98
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ref: ${{ github.ref }}
- uses: actions/setup-go@v2
with:
go-version: '^1.21.1'
go-version: '^1.22.1'
- run: go test ./...
release:
name: Release
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as build
FROM golang:1.22-alpine as build

WORKDIR /src

Expand All @@ -8,7 +8,7 @@ RUN go test -v -vet=off ./...

RUN GOOS=linux GARCH=amd64 CGO_ENABLED=0 go build -o git-semver -ldflags="-s -w" cli/main.go

FROM alpine:3.18
FROM alpine:3.19

RUN apk --no-cache add git git-lfs openssh-client

Expand Down
2 changes: 1 addition & 1 deletion git_utils/get_versions.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package git_utils

import (
"github.com/go-git/go-git/v5"
"github.com/psanetra/git-semver/semver"
"gopkg.in/src-d/go-git.v4"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion git_utils/hash_list_contains_tag.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package git_utils

import (
"gopkg.in/src-d/go-git.v4/plumbing"
"github.com/go-git/go-git/v5/plumbing"
)

func HashListContains(hashList []plumbing.Hash, hash plumbing.Hash) bool {
Expand Down
8 changes: 4 additions & 4 deletions git_utils/ref_is_on_current_branch.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package git_utils

import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/revlist"
"github.com/pkg/errors"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/revlist"
)

func AssertRefIsReachable(repo *git.Repository, precedingRef *plumbing.Reference, headRef *plumbing.Reference, message string) error {
Expand All @@ -23,7 +23,7 @@ func AssertRefIsReachable(repo *git.Repository, precedingRef *plumbing.Reference
refCommitHash := RefToCommitHash(repo.Storer, precedingRef)

if !HashListContains(toRefList, refCommitHash) {
return errors.Errorf(message + " (tag: %s; commit: %s)", precedingRef.Name().String(), refCommitHash.String())
return errors.Errorf(message+" (tag: %s; commit: %s)", precedingRef.Name().String(), refCommitHash.String())
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions git_utils/ref_to_commit_hash.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package git_utils

import (
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/storer"
"github.com/psanetra/git-semver/logger"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/plumbing/storer"
)

func RefToCommitHash(storer storer.EncodedObjectStorer, tagRef *plumbing.Reference) plumbing.Hash {
Expand Down
2 changes: 1 addition & 1 deletion git_utils/sort_commits_desc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package git_utils

import "gopkg.in/src-d/go-git.v4/plumbing/object"
import "github.com/go-git/go-git/v5/plumbing/object"

type ByHistoryDesc []*object.Commit

Expand Down
30 changes: 18 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
module github.com/psanetra/git-semver

require (
github.com/go-git/go-git/v5 v5.11.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
gopkg.in/src-d/go-git.v4 v4.13.1
github.com/spf13/cobra v1.8.0
github.com/stretchr/testify v1.9.0
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/tools v0.13.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/tools v0.19.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.21
go 1.22
164 changes: 108 additions & 56 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
Expand Down
4 changes: 2 additions & 2 deletions latest/latest.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package latest

import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/pkg/errors"
"github.com/psanetra/git-semver/logger"
"github.com/psanetra/git-semver/semver"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"io"
)

Expand Down
6 changes: 3 additions & 3 deletions next/next.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package next

import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/revlist"
"github.com/pkg/errors"
"github.com/psanetra/git-semver/conventional_commits"
"github.com/psanetra/git-semver/git_utils"
"github.com/psanetra/git-semver/latest"
"github.com/psanetra/git-semver/logger"
"github.com/psanetra/git-semver/semver"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/revlist"
)

type NextOptions struct {
Expand Down
8 changes: 4 additions & 4 deletions version_log/version_log.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package version_log

import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/revlist"
"github.com/pkg/errors"
"github.com/psanetra/git-semver/git_utils"
"github.com/psanetra/git-semver/latest"
"github.com/psanetra/git-semver/logger"
"github.com/psanetra/git-semver/semver"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/plumbing/revlist"
"sort"
)

Expand Down

0 comments on commit 26cbd98

Please sign in to comment.