mirror of
https://github.com/helm/chart-releaser.git
synced 2026-02-05 09:45:23 +01:00
upgrade go to 1.19 and pin cosign-installer to v2 (#203)
* upgrade go to 1.19 and pin cosign-installer to v2 Signed-off-by: cpanato <ctadeu@gmail.com> * update golangci-lint to v1.48.0 Signed-off-by: cpanato <ctadeu@gmail.com> * remove io/ioutil deprecations Signed-off-by: cpanato <ctadeu@gmail.com> Signed-off-by: cpanato <ctadeu@gmail.com>
This commit is contained in:
committed by
GitHub
parent
19844788ba
commit
0d2238dc3e
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -81,4 +81,4 @@ jobs:
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.46.2
|
||||
version: v1.48.0
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/helm/chart-releaser
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/Songmu/retry v0.1.0
|
||||
|
||||
@@ -16,7 +16,6 @@ package git
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -26,7 +25,7 @@ type Git struct{}
|
||||
|
||||
// AddWorktree creates a new Git worktree with a detached HEAD for the given committish and returns its path.
|
||||
func (g *Git) AddWorktree(workingDir string, committish string) (string, error) {
|
||||
dir, err := ioutil.TempDir("", "chart-releaser-")
|
||||
dir, err := os.MkdirTemp("", "chart-releaser-")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ package packager
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@@ -67,7 +67,7 @@ func (p *Packager) CreatePackages() error {
|
||||
}
|
||||
|
||||
downloadManager := &downloader.Manager{
|
||||
Out: ioutil.Discard,
|
||||
Out: io.Discard,
|
||||
ChartPath: path,
|
||||
Keyring: helmClient.Keyring,
|
||||
Getters: getters,
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package packager
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -27,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
func TestPackager_CreatePackages(t *testing.T) {
|
||||
packagePath, _ := ioutil.TempDir(".", "packages")
|
||||
packagePath, _ := os.MkdirTemp(".", "packages")
|
||||
invalidPackagePath := filepath.Join(packagePath, "bad")
|
||||
file, _ := os.Create(invalidPackagePath)
|
||||
t.Cleanup(func() {
|
||||
|
||||
@@ -17,7 +17,6 @@ package releaser
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -41,7 +40,7 @@ type FakeGit struct {
|
||||
}
|
||||
|
||||
func (f *FakeGit) AddWorktree(workingDir string, committish string) (string, error) {
|
||||
dir, err := ioutil.TempDir("", "chart-releaser-")
|
||||
dir, err := os.MkdirTemp("", "chart-releaser-")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@@ -98,7 +97,7 @@ func (f *FakeGitHub) CreatePullRequest(owner string, repo string, message string
|
||||
}
|
||||
|
||||
func TestReleaser_UpdateIndexFile(t *testing.T) {
|
||||
indexDir, _ := ioutil.TempDir(".", "index")
|
||||
indexDir, _ := os.MkdirTemp(".", "index")
|
||||
defer os.RemoveAll(indexDir)
|
||||
|
||||
fakeGitHub := new(FakeGitHub)
|
||||
@@ -180,7 +179,7 @@ func TestReleaser_UpdateIndexFile(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestReleaser_UpdateIndexFileGenerated(t *testing.T) {
|
||||
indexDir, _ := ioutil.TempDir(".", "index")
|
||||
indexDir, _ := os.MkdirTemp(".", "index")
|
||||
defer os.RemoveAll(indexDir)
|
||||
|
||||
fakeGitHub := new(FakeGitHub)
|
||||
|
||||
Reference in New Issue
Block a user