1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-05 00:59:04 +02:00

feat: full gitlab support for brew and scoop (#1084)

* makes context tokentype a public var

* passes artifacts object into client upload function. extracts gitlab upload hash from url

* adds gitlab url to brew config

* build brew formula depending on token type

* fixes client for release tests

* fixes exiting brew tests

* fixes scoop test with dummy client adaption

* uses new artifact upload hash

* fixes brew usage

* updates gitlab createFile for brew

* fixes logging for non-existing file in gitlab logging

* fix: gitlab createFile

* fix: removes encoding from gitlab create and update file opts

* fix: gitlab upload and artifact set upload hash

* fix: linter

* changed artifact item to a pointer in ctx

* docs: updates homebrew

* feat: enables scoop for gitlab release

* fix: scoop panic for pointer access

* chore: rename formula build func for brew

* chore: brew removes comments

* fix: brew tests

* test: updates brew tests

* docs: updates homebrew

* test: for token type not implemented for brew

* tests: for multiple linux builds

* fix: build artifacts are pointer in scoop

* test: for scoop and gitlab

* test: for artifacts set upload hash

* adds missing files after adaption

* chore: removes and clarifies comments

* fix: moves artifact upload hash to extra map

* adds comment why we initialize the extra map
This commit is contained in:
Manuel Vogel
2019-08-13 20:28:03 +02:00
committed by Carlos Alexandro Becker
parent 23e275e946
commit e92bbe32ce
20 changed files with 787 additions and 168 deletions

View File

@ -10,6 +10,7 @@ import (
"github.com/apex/log"
"github.com/google/go-github/v25/github"
"github.com/goreleaser/goreleaser/internal/artifact"
"github.com/goreleaser/goreleaser/internal/tmpl"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
@ -150,7 +151,7 @@ func (c *githubClient) CreateRelease(ctx *context.Context, body string) (string,
func (c *githubClient) Upload(
ctx *context.Context,
releaseID string,
name string,
artifact *artifact.Artifact,
file *os.File,
) error {
githubReleaseID, err := strconv.ParseInt(releaseID, 10, 64)
@ -163,7 +164,7 @@ func (c *githubClient) Upload(
ctx.Config.Release.GitHub.Name,
githubReleaseID,
&github.UploadOptions{
Name: name,
Name: artifact.Name,
},
file,
)