* test: speed up minio tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: speed up minio tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: speed up minio tests
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: rm unused param
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: use not-so-common contianer name
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: speed
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: inc coverage
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: inc coverage
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* 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>
* 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>
* 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>
* feat: allow to skip announcers
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: announce.skip
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: improve brew templates
based on #2509
Co-authored-by: Engin Diri <engin.diri@mail.schwarz>
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: improve templates a bit
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: improve check
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: improve less
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: improve counts
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: Engin Diri <engin.diri@mail.schwarz>
Background
---
GitLab supports
[subgroups](https://docs.gitlab.com/ee/user/group/subgroups/) so a
repository can look something like
`gitlab.com/top-level-group/sub-group/repository` for example https://gitlab.com/gitlab-com/gl-infra/jsonnet-tool.
At the moment this detection doens't work out of the box and requires
the user to set the
[`owner`](8b0781e576/.goreleaser.yml (L32-35))
Solution
---
Instead of dropping off the nested sub-groups automatically add them.
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* 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>
* refactor: improve build
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: coverage
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
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.
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>
* feat: Add support for templating NFPM bindir
Example: Allow software to be deployed in '/usr/lib64' directory on x86_64 arch
and in '/usr/lib' directory in i386
* test: invalid bindir template
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: bindir template
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: Rémi Ferrand <remi.ferrand@cc.in2p3.fr>
* feat: use go 1.17
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: go mod tidy
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix failing test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* ci: increase lint timeout
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* ci: increase lint timeout
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: sign docker images with cosign
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: improve sign logging
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: do not sign if skip publish is set
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: install cosign
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: fix wrong docs
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: Change the init-template for snapshot.name_template
* fix: Change the default-template for snapshot.name_template
BREAKIND CHANGE: The default value of `snapshot.name_template` is changed.
Currently, the 'goVersion' function is run without any directory set.
This is problematic when a build uses the 'dir' config in combination
with the 'gobinary' config. When 'gobinary' is a relative path (like a
script in the current repository), goVersion silently fails, returning
an empty string.
This commit refactors 'goVersion' to execute the command with '.Dir' set
to the 'build.Dir', in addition to now returning an error, so that
issues may be bubbled up in the build log, rather than silently failing.
It also adds a new helper function to facilitate running 'goVersion' by
creating a temporary executable that outputs a given 'version' string.
This function is only currently used by 'TestWithDefaults'.
Co-authored-by: Rob Prentiss <prentiss@apple.com>
* fix: upload gcs blobs to bucket root
* test: blob upload to bucket root
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
Co-authored-by: Adam Bouqdib <adam@abemedia.co.uk>
* feat: support windows/arm64
closes#2404closes#2405
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: broken test
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* docs: deprecation warnings
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: add id to dockers and docker_manifests
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: actually allow to use the images
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: main check when using gomod.proxy
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: main check when using gomod.proxy
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: make scoop write .json when --skip-publish
Don't skip the pipeline altogether but write
out the manifest.json file as the homebrew
pipeline does, only skip committing to the repo.
closes#2374
* Update internal/pipe/scoop/scoop_test.go
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: tag sorting
When the HEAD commit has multiple tags, they are sorted in order to select the latest so that it can be released.
However, the existing sort would not work if there were multiple commits across a Wednesday and a Thursday.
For example:
```
git tag --points-at HEAD --format='%(creatordate)%09%(refname)'
Wed Jul 28 07:13:19 2021 +0000 refs/tags/v0.0.183
Thu Jul 29 13:31:07 2021 +0000 refs/tags/v0.0.184
Thu Jul 29 13:38:42 2021 +0000 refs/tags/v0.0.185
Thu Jul 29 13:57:44 2021 +0000 refs/tags/v0.0.186
```
When using the existing sort the `creatordate` field was targeted and reversed. Alphabetically Thursday comes before Wednesday, so that is reversed and the Wednesday release always comes first:
```
git tag --points-at HEAD --sort=-version:creatordate --format='%(creatordate)%09%(refname)'
Wed Jul 28 07:13:19 2021 +0000 refs/tags/v0.0.183
Thu Jul 29 13:57:44 2021 +0000 refs/tags/v0.0.186
Thu Jul 29 13:38:42 2021 +0000 refs/tags/v0.0.185
Thu Jul 29 13:31:07 2021 +0000 refs/tags/v0.0.184
```
This would make goreleaser attempt to release that existing tag again, and fail.
If we instead sort by reversed `refname` we get the tags ordered by their numeric value, which ignore the day of the week of release:
```
git tag --points-at HEAD --sort=-version:refname --format='%(creatordate)%09%(refname)'
Thu Jul 29 13:57:44 2021 +0000 refs/tags/v0.0.186
Thu Jul 29 13:38:42 2021 +0000 refs/tags/v0.0.185
Thu Jul 29 13:31:07 2021 +0000 refs/tags/v0.0.184
Wed Jul 28 07:13:19 2021 +0000 refs/tags/v0.0.183
```
Allowing the latest version, 0.0.186 in this case, to be targeted for release.
* corrected test case
* add space
* remove space
* fix: return an err with stdout/err when a command failed
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fixes
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: move copyfile to gio package
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: copying file on docker pkg instead of hard linking
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fixex
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: one todo
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: copy with mode
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* chore: fmt
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: errors
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
By default, snap store manage "edge", "beta", "candidate" and "stable".
Default to all this channels when package is in grade stable. But only on
"edge" and "beta" for grade "devel".
Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: moving some cmd logs to debug
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: moving some cmd logs to debug
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* refactor: archive files
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: better archives
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* feat: better archives
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: test todos
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: go mod tidy et al
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: improve docs and remove typoe 'licence' from defaults
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: fixes
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* fix: error string
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: remove some logs
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
* test: use utc
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
A continuation of #2267 - the header and footer in release configuration
can be templatized as well to support more use cases like attaching
published docker image information(without using docker pipe).
* refactor(docker): preparing for multiple backends
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: remove pro test
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: merge issues
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: merge issues
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: merge issues
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* wip: podman
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: preparing for other docker implementations
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* refactor: preparing for other docker implementations
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: log
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: use buildx
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* test: cover
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* fix: lint
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>