1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
Commit Graph

122 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
5cfc78d92c
feat: gitlab option to use_job_token (#2993) 2022-08-16 00:39:13 -03:00
Carlos Alexandro Becker
fe7e2123bd
feat: replacing the log library (#3139)
* feat: replacing logs

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: tests et al

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: update termenv/lipgloss

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* wip: output

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: pin dep

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: update

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: tests

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: tests

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: deps

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: dep

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-21 21:11:15 -03:00
Carlos Alexandro Becker
9f15047d0a
feat: update go-github from v44 to v45 (#3130)
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-07 09:39:56 -03:00
Carlos A Becker
2d0ab9e9bf
fix: ensure same tag on edit
this change is just to prevent merge conflicts in goreleaser pro

refs #3132

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-26 22:19:22 -03:00
Carlos A Becker
cc27fba627
Revert "fix: update existing release drafts (#3073)"
This reverts commit e2902707f9.
2022-05-20 10:03:22 -03:00
Carlos A Becker
0b37b4dfbd
Revert "fix: draft release when no existing draft release exists"
This reverts commit 0b3305999c.
2022-05-20 10:02:56 -03:00
Carlos A Becker
0b3305999c
fix: draft release when no existing draft release exists
closes #3115
refs #3073

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-05-20 10:01:13 -03:00
Carlos A Becker
407ab5576b
feat(deps): update go-github from v43 to v44
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-05-11 10:07:44 -03:00
yihuang
e2902707f9
fix: update existing release drafts (#3073)
Closes: #3072
2022-05-08 21:24:27 -03:00
Carlos A Becker
7082217206
fix: improve github cli log 2022-04-11 09:47:14 -03:00
Carlos Alexandro Becker
0bb1c99074
feat: update go-github to v43 (#2948)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-03-02 09:17:08 -03:00
Carlos A Becker
e3997f8802
feat: update go-github from v41 to v42
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-02-05 18:01:26 -03:00
dependabot[bot]
8fc93a1fbd
feat(deps): bump github.com/xanzy/go-gitlab from 0.52.2 to 0.54.3 (#2820)
* feat(deps): bump github.com/xanzy/go-gitlab from 0.52.2 to 0.54.3

Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.52.2 to 0.54.3.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.52.2...v0.54.3)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: changes

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: filename

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos A Becker <caarlos0@gmail.com>
2022-01-30 14:22:17 -03:00
Carlos Alexandro Becker
9af798b993
fix: linter issues after gotea update (#2824)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-01-10 11:18:26 -03:00
Carlos Alexandro Becker
57ef9f0220
refactor: improve gitlab cli a bit (#2810)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-01-10 10:58:05 -03:00
Evan
fe79b4b9da
feat: add support for GitLab Generic Packages (#2006) (#2745)
GitLab's Generic Package Repository allows uploading files
to GitLab, as an alternative to attachments.

Added the flag `use_package_registry` to the `gitlab_urls` config.
When false, the default, it will behave as before.
When true, it will publish the file to the Generic Package Registry.
Either way, the URL is bound to the release the same

Updated `go-gitlab` to version 0.52.2 which has the new
`GenericPackages.PublishPackageFile` function.

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2022-01-06 22:11:11 -03:00
Carlos Alexandro Becker
493be086a0
feat(deps): update go-github to v41 (#2793)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2022-01-06 15:34:36 -03:00
Carlos Alexandro Becker
b8f61718f3
feat: allow to customize release notes update behavior (#2702)
* feat: allow to customize release notes update behavior

closes #1384

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: make it a bit better

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: jsonschema

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-11-26 09:59:15 -03:00
Ahmed
c0e5e3b90f
refactor: use os and io instead of ioutil (#2676) 2021-11-21 11:10:08 -03:00
Engin Diri
c958e4cc5e
fix: changelog is too long (#2661)
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
2021-11-11 09:31:01 -03:00
Carlos Alexandro Becker
8eae8b013a
feat: support github release notes (#2638)
* feat: support github release notes

* chore: godoc

* test: cover it with tests

* chore: fmt

* refactor: remove unused code
2021-11-07 12:53:28 -03:00
Drew Stinnett
d4e575dd47
test: additional tests for gitlab and others (#2599)
* More checks

* test: Adding more tests around gitlab

* chore: removing log
2021-10-25 10:29:19 -03:00
Carlos Alexandro Becker
ae6814466e
feat(deps): upgrade go-github (#2581)
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-14 09:32:52 -03:00
Drew Stinnett
03b6805715
feat: Adding gitlab api changelog (#2567)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2021-10-10 10:52:46 -03:00
Carlos A Becker
1f774d5d6a
fix: changelog filters and sort when using github
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-06 01:15:31 -03:00
Carlos A Becker
18ca16d547
test: gitlab download url template
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-05 22:06:20 -03:00
Carlos A Becker
d7e5ea5abf
test: use mock client
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-05 20:53:17 -03:00
Carlos Alexandro Becker
89e5a4ebf1
feat: changelog from github (#2548)
* feat: changelog from github

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* refactor: unifying client mocks

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* refactor: unifying client mocks

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: mocks

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* test: added tests

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: remove unused code

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* test: added more

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: testdata

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* fix: fmt

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* test: fix

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* test: fix

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* docs: improve docs

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-04 09:32:30 -03:00
Carlos Alexandro Becker
c739724f12
refactor: unifying client mocks (#2549)
* refactor: unifying client mocks

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

* refactor: unifying client mocks

Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-10-03 13:24:20 -03:00
Drew Stinnett
e0315ff4c4
feat: allow default branch to be used in CreateFile (#2539)
* feat: allow default branch to be used in gitlab

* feat: add func to get default branch

* fix: matching branch args

* feat: branch customization

* fix: fixing dummyclient naming

* refactor: remove createbranch

* feat: Adding gitlab branch customization

* feat: testing for github and gitea defaultbranch

* fix: remove dummy debug message

* fix: removing note about gitea not being supported

* feat: allow default branch to be used in gitlab

* docs: links updat

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* chore: delete kodiak.yml

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* feat: add func to get default branch

* fix: matching branch args

* feat: branch customization

* fix: docs: Missing mattermost docs on website (#2543)

* docs: update CircleCI example (#2545)

* fix: fixing dummyclient naming

* docs: some little fixes on the webpage (#2547)

* feat: some little fixes on the webpage

Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>

* Update www/docs/overrides/home.html

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* refactor: remove unused not impl error (#2540)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* feat: add template support for homebrew tap owner (#2544)

* feat: add template support for homebrew tap name

refs #2544

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: remove createbranch

* feat: Adding gitlab branch customization

* feat: testing for github and gitea defaultbranch

* fix: remove dummy debug message

* fix: removing note about gitea not being supported

Co-authored-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: Engin Diri <engin.diri@mail.schwarz>
Co-authored-by: Ricardo N Feliciano <FelicianoTech@gmail.com>
Co-authored-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Erik Weber <terbolous@gmail.com>
2021-10-03 11:22:26 -03:00
Carlos Alexandro Becker
0d4430269b
refactor: remove unused not impl error (#2540)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-10-02 12:39:52 -03:00
Engin Diri
8881328041
fix: regression on nil pointer check (#2533)
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
2021-09-28 09:11:04 -03:00
Carlos Alexandro Becker
29016cb0e3
fix: brew/scoop panic (#2515) 2021-09-27 08:13:56 -03:00
Carlos Alexandro Becker
61bead8989
feat: improve output and pipe skipping (#2480)
* refactor: improve middleware

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: upload tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: twitter tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: source tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: snapshot tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: improved some tests

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: snapcraft skip

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip slack

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip sign

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip scoop

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip reddit

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip discord

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip publish

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip nfpm

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip milestone

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip custompublishers

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip checksums

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip changelog

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip brew

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip blob

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip before

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip artifactory

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip announce

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip defaults

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: cmds

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip docker

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* chore: todo

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: go.mod

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip release

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: remove old skip pipe errors

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip teams

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip brew

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix/test: skip smtp

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: lint issues

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip docker

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip brew and scoop

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip docker

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: skip http/artifactory

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: increase coverage

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* test: fix

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-09-18 10:21:29 -03:00
Steve Azzopardi
b0a6bf4705
fix: panic on gitlab create release (#2473)
Background
---
In 5bcfa9042d the condition was changed to
that it can support the new status code returned by GitLab. However, the
condition is now checked `resp != nil` and not `resp == nil` which causes
the condition not to trigger when the resp is nil and only returns an
error. We can reproduce this issue by running
`TestGitLabCreateReleaseUknownHost` test added in this commit.

Solution
---
If we look at other error handling
91a8abb2e6/internal/client/gitlab.go (L106)
we can see that we check if the `resp` is nil as well before continuing.

Added tests for the following use cases:
- When there is an error and no response was returned.
- When there is a 403 or 404 error so we expect to create a release
  first.
- When there is an unknown error (not 404, 403) we just bail.
2021-09-10 16:35:42 -03:00
Steve Azzopardi
68ff8e996f
feat: support templates for scm urls (#2465)
Background
---
When a git repository is hosted in multiple GitLab instances the
`.goreleaser.yml` needs to take in consideration both APIs endpoints. At
the moment it defaults to GitLab.com and you can override it with
`gitlab_urls` however this forces you to only support 1 GitLab instance.

We need this for
https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/14122
where we have a tool that is developed on GitLab.com but then mirrored
to an internal GitLab instance since we need it to operate GitLab.com
even when it's down.

Solution
---
Support templates like `{{ .Env.CI_SERVER_URL }}` for the
`gitlab_urls`, `github_urls`  and `gitea_urls` so it can use environment
variables and the same `.goreleaser` file can be used in multiple SCM
instances.

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2021-09-09 01:42:13 +00:00
msvechla
5bcfa9042d
fix new gitlab releases throwing 404 due to API change #2334 (#2335) 2021-07-06 10:42:56 +02:00
Carlos A Becker
afc7d85688
docs: improve gitlab projectid readme
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-06-26 19:46:16 +00:00
Jesse Quinn
92a4afb169
feat(gitlab): use project id (#2297)
* feat: use project id

* fix: missing slash.

* Added comment.

* Added a comment

Signed-off-by: Jesse Quinn <jesse.quinn@zpesystems.com>

* Added a comment

Signed-off-by: Jesse Quinn <me@jessequinn.info>

Co-authored-by: Jesse Quinn <jesse.quinn@zpesystems.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2021-06-26 16:44:24 -03:00
Carlos A Becker
64c73d7eba
fix(gitea): do not overwrite existing release notes
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
2021-05-31 01:25:29 +00:00
Carlos Alexandro Becker
2e376ef378
chore(lint): enable revive
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-05-25 16:49:49 -03:00
Matt Palmer
bf4359017b
feat: Use GitLab Direct Asset Links (#2219)
* feat: Use GitLab Direct Asset Links

Implement the use of Direct Asset Links when uploading artifacts to a GitLab release

* fix: Remove ArtifactUploadHash

As GitLab support for direct asset linking exists, remove ArtifactUploadHash due to it no longer being required

* test: fix unit tests for gitlab urls

* fix: Use artifact name during GitLab upload

file.Name() included the path to the file, which isn't needed and breaks other areas such as homebrew releases

* docs: Require GitLab version v12.9+

Due to newly introduced dependency on direct asset linking
2021-05-17 17:33:04 +00:00
Carlos Alexandro Becker
860b4a8f81
chore: gofumpt & lint (#2190)
Signed-off-by: Carlos Becker <caarlos0@gmail.com>
2021-04-25 14:20:49 -03:00
Carlos Alexandro Becker
66117f3126
fix: several fd leaks (on tests) (#2187) 2021-04-25 11:34:40 -03:00
Trenton Broughton
e7f1ec0ea6
Do not send an empty discussion category name (#2182)
If the discussion category name is not specified in the config file, do not send it in to the request

This is a quick fix, and possibly it would be better to make `DiscussionCategoryName` a pointer.
2021-04-21 16:09:27 -03:00
Carlos Alexandro Becker
7a7a6f61ba
feat: create discussions from releases (#2177)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2021-04-21 13:43:59 -03:00
Carlos Alexandro Becker
27c7c8d7c8 refactor(test): t.TempDir
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-12-13 10:33:08 -03:00
6543
89105d63ac
feat: upload brew tap to gitea (#1547)
* implement for brew and scoop support for Gitea-hosted repos

* fix test

* add ReleaseURLTemplate support for gitea

* Add TestGiteaReleaseURLTemplate

* fix api to download url conversion

* switch test gitea instance to gitea.com

* fix defaults

* add test for defaults.go (GiteaURLs)

* add option into docs
2020-11-21 10:36:29 -03:00
dependabot[bot]
27aa6871cb
chore(deps): bump github.com/golangci/golangci-lint from 1.31.0 to 1.32.2 (#1882)
* chore(deps): bump github.com/golangci/golangci-lint

Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.31.0 to 1.32.2.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.31.0...v1.32.2)

Signed-off-by: dependabot[bot] <support@github.com>

* fix: lint issues

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* refactor: lint issues

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2020-11-10 11:15:03 -03:00
Carlos Alexandro Becker
f1049b94ef
feat: use proxy from environment (#1885)
* feat: use proxy from environment

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* Update internal/client/github.go

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-11-05 08:16:25 +00:00