mirror of
https://github.com/helm/chart-releaser.git
synced 2026-02-05 09:45:23 +01:00
Update Go version, dependencies, and GoReleaser (#59)
Signed-off-by: Reinhard Naegele <unguiculus@gmail.com>
This commit is contained in:
@@ -12,23 +12,20 @@ jobs:
|
||||
shellcheck -x tag.sh
|
||||
build:
|
||||
docker:
|
||||
- image: golang:1.12-alpine
|
||||
- image: cimg/go:1.14
|
||||
steps:
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Install tools
|
||||
command: |
|
||||
apk add bash build-base ca-certificates curl docker git openssh
|
||||
curl -SLO https://github.com/goreleaser/goreleaser/releases/download/v0.104.0/goreleaser_Linux_x86_64.tar.gz
|
||||
mkdir -p /usr/local/goreleaser
|
||||
tar -xzf goreleaser_Linux_x86_64.tar.gz -C /usr/local/goreleaser
|
||||
ln -s /usr/local/goreleaser/goreleaser /usr/local/bin/goreleaser
|
||||
rm -rf goreleaser_Linux_x86_64.tar.gz
|
||||
- checkout
|
||||
- run:
|
||||
name: gofmt
|
||||
name: Install tools
|
||||
command: ./setup.sh
|
||||
- run:
|
||||
name: lint
|
||||
command: |
|
||||
gofmt -w -s . && git diff --exit-code
|
||||
go vet -v ./...
|
||||
goimports -w -l .
|
||||
go mod tidy
|
||||
git diff --exit-code
|
||||
- run:
|
||||
name: Build
|
||||
command: |
|
||||
|
||||
@@ -16,13 +16,13 @@ builds:
|
||||
-X github.com/helm/chart-releaser/cr/cmd.Version={{ .Tag }}
|
||||
-X github.com/helm/chart-releaser/cr/cmd.GitCommit={{ .Commit }}
|
||||
-X github.com/helm/chart-releaser/cr/cmd.BuildDate={{ .Date }}
|
||||
archive:
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
archives:
|
||||
- format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
snapshot:
|
||||
|
||||
2
build.sh
2
build.sh
@@ -72,7 +72,7 @@ main() {
|
||||
pushd "$SCRIPT_DIR" > /dev/null
|
||||
|
||||
go mod download
|
||||
go test ./...
|
||||
go test ./... -race
|
||||
goreleaser "${goreleaser_args[@]}"
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
32
go.mod
32
go.mod
@@ -1,21 +1,29 @@
|
||||
module github.com/helm/chart-releaser
|
||||
|
||||
go 1.12
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/Songmu/retry v0.0.1
|
||||
github.com/google/go-github v17.0.0+incompatible
|
||||
github.com/google/go-querystring v1.0.0 // indirect
|
||||
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
|
||||
github.com/Azure/go-autorest/autorest/to v0.3.0 // indirect
|
||||
github.com/Azure/go-autorest/autorest/validation v0.2.0 // indirect
|
||||
github.com/Songmu/retry v0.1.0
|
||||
github.com/google/go-github/v30 v30.0.0
|
||||
github.com/goreleaser/goreleaser v0.129.0
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/spf13/cobra v0.0.5
|
||||
github.com/onsi/ginkgo v1.11.0 // indirect
|
||||
github.com/onsi/gomega v1.8.1 // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/spf13/cobra v0.0.6
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/spf13/viper v1.3.2
|
||||
github.com/stretchr/testify v1.4.0
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
|
||||
helm.sh/helm/v3 v3.0.3
|
||||
github.com/spf13/viper v1.6.2
|
||||
github.com/stretchr/testify v1.5.1
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
||||
golang.org/x/tools v0.0.0-20200204192400-7124308813f3
|
||||
helm.sh/helm/v3 v3.1.2
|
||||
)
|
||||
|
||||
// Transitive requirement from Helm.
|
||||
replace github.com/docker/docker => github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0
|
||||
exclude (
|
||||
github.com/Azure/go-autorest v0.9.0
|
||||
github.com/Azure/go-autorest v12.0.0+incompatible
|
||||
)
|
||||
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
"github.com/Songmu/retry"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/google/go-github/v30/github"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
|
||||
22
pkg/tools/tools.go
Normal file
22
pkg/tools/tools.go
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright The Helm Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build tools
|
||||
|
||||
package tools
|
||||
|
||||
import (
|
||||
_ "github.com/goreleaser/goreleaser"
|
||||
_ "golang.org/x/tools/cmd/goimports"
|
||||
)
|
||||
18
setup.sh
Executable file
18
setup.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright The Helm Authors. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
go install github.com/goreleaser/goreleaser
|
||||
go install golang.org/x/tools/cmd/goimports
|
||||
Reference in New Issue
Block a user