1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-11 14:39:28 +02:00

fix(aur): version must be numbers only (#2850)

* fix(aur): version must be numbers only

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

* fix: format

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

* fix: revert removed line
This commit is contained in:
Carlos Alexandro Becker 2022-01-27 00:23:37 -03:00 committed by GitHub
parent 5f36f2ebce
commit a1447a3635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 9 deletions

View File

@ -278,7 +278,7 @@ func dataFor(ctx *context.Context, cfg config.AUR, cl client.Client, artifacts [
Name: cfg.Name,
Desc: cfg.Description,
Homepage: cfg.Homepage,
Version: ctx.Version,
Version: fmt.Sprintf("%d.%d.%d", ctx.Semver.Major, ctx.Semver.Minor, ctx.Semver.Patch),
License: cfg.License,
Rel: cfg.Rel,
Maintainers: cfg.Maintainers,

View File

@ -233,9 +233,15 @@ func TestFullPipe(t *testing.T) {
folder := t.TempDir()
ctx := &context.Context{
Git: context.GitInfo{
CurrentTag: "v1.0.1",
CurrentTag: "v1.0.1-foo",
},
Version: "1.0.1",
Semver: context.Semver{
Major: 1,
Minor: 0,
Patch: 1,
Prerelease: "foo",
},
Version: "1.0.1-foo",
Artifacts: artifact.New(),
Env: map[string]string{
"FOO": "foo_is_bar",
@ -316,6 +322,11 @@ func TestRunPipe(t *testing.T) {
Git: context.GitInfo{
CurrentTag: "v1.0.1",
},
Semver: context.Semver{
Major: 1,
Minor: 0,
Patch: 1,
},
Version: "1.0.1",
Artifacts: artifact.New(),
Env: map[string]string{
@ -455,6 +466,11 @@ func TestRunPipeBinaryRelease(t *testing.T) {
Git: context.GitInfo{
CurrentTag: "v1.2.1",
},
Semver: context.Semver{
Major: 1,
Minor: 2,
Patch: 1,
},
Version: "1.2.1",
Artifacts: artifact.New(),
Config: config.Project{
@ -504,6 +520,12 @@ func TestRunPipeNoUpload(t *testing.T) {
})
ctx.TokenType = context.TokenTypeGitHub
ctx.Git = context.GitInfo{CurrentTag: "v1.0.1"}
ctx.Semver = context.Semver{
Major: 1,
Minor: 0,
Patch: 1,
}
path := filepath.Join(folder, "whatever.tar.gz")
f, err := os.Create(path)
require.NoError(t, err)
@ -558,6 +580,11 @@ func TestRunEmptyTokenType(t *testing.T) {
},
})
ctx.Git = context.GitInfo{CurrentTag: "v1.0.1"}
ctx.Semver = context.Semver{
Major: 1,
Minor: 0,
Patch: 1,
}
path := filepath.Join(folder, "whatever.tar.gz")
f, err := os.Create(path)
require.NoError(t, err)

View File

@ -10,7 +10,7 @@ license=('MIT')
provides=('default-gitlab')
conflicts=('default-gitlab')
source_x86_64=('https://dummyhost/download/v1.0.1/bin.tar.gz')
source_x86_64=('https://dummyhost/download/v1.0.1-foo/bin.tar.gz')
sha256sums_x86_64=('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
package() {

View File

@ -7,7 +7,7 @@ pkgbase = default-gitlab-bin
conflicts = default-gitlab
provides = default-gitlab
arch = x86_64
source_x86_64 = https://dummyhost/download/v1.0.1/bin.tar.gz
source_x86_64 = https://dummyhost/download/v1.0.1-foo/bin.tar.gz
sha256sums_x86_64 = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
pkgname = default-gitlab-bin

View File

@ -10,7 +10,7 @@ license=('MIT')
provides=('default')
conflicts=('default')
source_x86_64=('https://dummyhost/download/v1.0.1/bin.tar.gz')
source_x86_64=('https://dummyhost/download/v1.0.1-foo/bin.tar.gz')
sha256sums_x86_64=('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
package() {

View File

@ -7,7 +7,7 @@ pkgbase = default-bin
conflicts = default
provides = default
arch = x86_64
source_x86_64 = https://dummyhost/download/v1.0.1/bin.tar.gz
source_x86_64 = https://dummyhost/download/v1.0.1-foo/bin.tar.gz
sha256sums_x86_64 = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
pkgname = default-bin

View File

@ -14,7 +14,7 @@ conflicts=('libcurl' 'cvs' 'blah')
depends=('curl' 'bash')
optdepends=('wget: stuff' 'foo: bar')
source_x86_64=('https://dummyhost/download/v1.0.1/bin.tar.gz')
source_x86_64=('https://dummyhost/download/v1.0.1-foo/bin.tar.gz')
sha256sums_x86_64=('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855')
package() {

View File

@ -14,7 +14,7 @@ pkgbase = with-more-opts-bin
provides = git
provides = svn
arch = x86_64
source_x86_64 = https://dummyhost/download/v1.0.1/bin.tar.gz
source_x86_64 = https://dummyhost/download/v1.0.1-foo/bin.tar.gz
sha256sums_x86_64 = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
pkgname = with-more-opts-bin