diff --git a/go.mod b/go.mod index 4d08f9e..d9c355c 100644 --- a/go.mod +++ b/go.mod @@ -5,10 +5,10 @@ go 1.21 require ( github.com/caarlos0/log v0.4.4 github.com/go-semantic-release/semantic-release/v2 v2.28.0 - github.com/goreleaser/goreleaser v1.23.0 + github.com/goreleaser/goreleaser v1.24.0 ) -replace github.com/goreleaser/goreleaser v1.23.0 => ./goreleaser +replace github.com/goreleaser/goreleaser v1.24.0 => ./goreleaser require ( cloud.google.com/go v0.110.10 // indirect @@ -17,7 +17,7 @@ require ( cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/kms v1.15.5 // indirect cloud.google.com/go/storage v1.35.1 // indirect - code.gitea.io/sdk/gitea v0.17.0 // indirect + code.gitea.io/sdk/gitea v0.17.1 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AlekSi/pointer v1.2.0 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect @@ -42,34 +42,33 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect + github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/atc0005/go-teams-notify/v2 v2.8.0 // indirect - github.com/aws/aws-sdk-go v1.48.3 // indirect - github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect + github.com/atc0005/go-teams-notify/v2 v2.9.0 // indirect + github.com/aws/aws-sdk-go v1.50.10 // indirect + github.com/aws/aws-sdk-go-v2 v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect + github.com/aws/aws-sdk-go-v2/config v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.12 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 // indirect github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2 // indirect github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.26.3 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 // indirect + github.com/aws/smithy-go v1.19.0 // indirect github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect @@ -83,16 +82,14 @@ require ( github.com/charmbracelet/lipgloss v0.9.1 // indirect github.com/charmbracelet/x/exp/ordered v0.0.0-20231010190216-1cb11efc897d // indirect github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect - github.com/cloudflare/circl v1.3.5 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davidmz/go-pageant v1.0.2 // indirect github.com/dghubble/go-twitter v0.0.0-20211115160449-93a8679adecb // indirect github.com/dghubble/oauth1 v0.7.2 // indirect github.com/dghubble/sling v1.4.0 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/disgoorg/disgo v0.17.0 // indirect - github.com/disgoorg/json v1.1.0 // indirect - github.com/disgoorg/snowflake/v2 v2.0.1 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v24.0.7+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect @@ -107,8 +104,8 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-fed/httpsig v1.1.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.4.1 // indirect - github.com/go-git/go-git/v5 v5.7.0 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.4 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect @@ -126,20 +123,20 @@ require ( github.com/golang-jwt/jwt/v5 v5.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-containerregistry v0.17.0 // indirect + github.com/google/go-containerregistry v0.19.0 // indirect github.com/google/go-github/v57 v57.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/ko v0.15.1 // indirect github.com/google/rpmpack v0.5.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect - github.com/google/uuid v1.5.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/google/wire v0.5.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/goreleaser/chglog v0.5.0 // indirect github.com/goreleaser/fileglob v1.3.0 // indirect - github.com/goreleaser/nfpm/v2 v2.35.1 // indirect + github.com/goreleaser/nfpm/v2 v2.35.3 // indirect github.com/gorilla/websocket v1.5.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -158,7 +155,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.5 // indirect github.com/klauspost/pgzip v1.2.6 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/letsencrypt/boulder v0.0.0-20231026200631-000cd05d5491 // indirect @@ -188,7 +185,6 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect @@ -196,7 +192,7 @@ require ( github.com/sigstore/rekor v1.3.3 // indirect github.com/sigstore/sigstore v1.7.5 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/skeema/knownhosts v1.1.1 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect github.com/slack-go/slack v0.12.3 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.10.0 // indirect @@ -211,24 +207,24 @@ require ( github.com/ulikunitz/xz v0.5.11 // indirect github.com/vbatts/tar-split v0.11.5 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect - github.com/xanzy/go-gitlab v0.95.2 // indirect + github.com/xanzy/go-gitlab v0.97.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect gitlab.com/digitalxero/go-conventional-commit v1.0.7 // indirect go.mongodb.org/mongo-driver v1.12.1 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect - gocloud.dev v0.35.0 // indirect - golang.org/x/crypto v0.17.0 // indirect + gocloud.dev v0.36.0 // indirect + golang.org/x/crypto v0.18.0 // indirect golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/oauth2 v0.16.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/tools v0.17.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.151.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 5e37081..a216e8d 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= -code.gitea.io/sdk/gitea v0.17.0 h1:8JPBss4+Jf7AE1YcfyiGrngTXE8dFSG3si/bypsTH34= -code.gitea.io/sdk/gitea v0.17.0/go.mod h1:ndkDk99BnfiUCCYEUhpNzi0lpmApXlwRFqClBlOlEBg= +code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8= +code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -104,8 +104,6 @@ github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= @@ -118,16 +116,14 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE= -github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= +github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ekTTXpdwKYF8eBlsYsDVoggDAuAjoK66k= github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw= github.com/ProtonMail/gopenpgp/v2 v2.7.1 h1:Awsg7MPc2gD3I7IFac2qE3Gdls0lZW8SzrFZ3k1oz0s= github.com/ProtonMail/gopenpgp/v2 v2.7.1/go.mod h1:/BU5gfAVwqyd8EfC3Eu7zmuhwYQpKs+cGD8M//iiaxs= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= @@ -137,58 +133,58 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/atc0005/go-teams-notify/v2 v2.8.0 h1:971J5qivrzBbYMDAdmW7v9s7W2u2jiIRVcY+LaIJqww= -github.com/atc0005/go-teams-notify/v2 v2.8.0/go.mod h1:SIeE1UfCcVRYMqP5b+r1ZteHyA/2UAjzWF5COnZ8q0w= -github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g= -github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/atc0005/go-teams-notify/v2 v2.9.0 h1:VkZm1LSotDxvooLYabdM8TcRh0hFU8/iIP1JvChs0Y4= +github.com/atc0005/go-teams-notify/v2 v2.9.0/go.mod h1:SIeE1UfCcVRYMqP5b+r1ZteHyA/2UAjzWF5COnZ8q0w= +github.com/aws/aws-sdk-go v1.50.10 h1:H3NQvqRUKG+9oysCKTIyylpkqfPA7MiBtzTnu/cIGqE= +github.com/aws/aws-sdk-go v1.50.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2 h1:3q7vcLhq6JXqTLPpPuDJgw3f+DFqd4p+BWL2DlplRPc= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2/go.mod h1:9aqZoo/OeMBK/Nf3wzQzTlM92u7Bip256GHpY0oQbX4= +github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk= +github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo= +github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o= +github.com/aws/aws-sdk-go-v2/config v1.26.1/go.mod h1:ZB+CuKHRbb5v5F0oJtGdhFTelmrxd4iWO1lf0rQwSAg= +github.com/aws/aws-sdk-go-v2/credentials v1.16.12 h1:v/WgB8NxprNvr5inKIiVVrXPuuTegM+K8nncFkr1usU= +github.com/aws/aws-sdk-go-v2/credentials v1.16.12/go.mod h1:X21k0FjEJe+/pauud82HYiQbEr9jRKY3kXEIQ4hXeTQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6JkVzjowOKeOJRHERyy1vh58= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4/go.mod h1:u77N7eEECzUv7F0xl2gcfK/vzc8wcjWobpy+DcrLJ5E= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9/go.mod h1:hqamLz7g1/4EJP+GH5NBhcUMLjW+gKLQabgyz6/7WAU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9/go.mod h1:YD0aYBWCrPENpHolhKw2XDlTIWae2GKXT1T4o6N6hiM= github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2 h1:y6LX9GUoEA3mO0qpFl1ZQHj1rFyPWVphlzebiSt2tKE= github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2/go.mod h1:Q0LcmaN/Qr8+4aSBrdrXXePqoX0eOuYpJLbYpilmWnA= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2 h1:PpbXaecV3sLAS6rjQiaKw4/jyq3Z8gNzmoJupHAoBp0= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2/go.mod h1:fUHpGXr4DrXkEDpGAjClPsviWf+Bszeb0daKE0blxv8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 h1:6DRKQc+9cChgzL5gplRGusI5dBGeiEod4m/pmGbcX48= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4/go.mod h1:s8ORvrW4g4v7IvYKIAoBg17w3GQ+XuwXDXYrQ5SkzU0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 h1:o3DcfCxGDIT20pTbVKVhp3vWXOj/VvgazNJvumWeYW0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4/go.mod h1:Uy0KVOxuTK2ne+/PKQ+VvEeWmjMMksE17k/2RK/r5oM= -github.com/aws/aws-sdk-go-v2/service/kms v1.26.3 h1:li5dFiK1tkAFXvOC9QPWAVWqTu8ZxpIR0KzKmof6TIE= -github.com/aws/aws-sdk-go-v2/service/kms v1.26.3/go.mod h1:N3++/sLV97B8Zliz7KRqNcojOX7iMBZWKiuit5FKtH0= -github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0 h1:FJTWR2nP1ddLIbk4n7Glw8wGbeWGHaViUwADPzE/EBo= -github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0/go.mod h1:dqJ5JBL0clzgHriH35Amx3LRFY6wNIPUX7QO/BerSBo= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 h1:/90OR2XbSYfXucBMJ4U14wrjlfleq/0SB6dZDPncgmo= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9/go.mod h1:dN/Of9/fNZet7UrQQ6kTDo/VSwKPIq94vjlU16bRARc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 h1:Nf2sHxjMJR8CSImIVCONRi4g0Su3J+TSTbS7G0pUeMU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9/go.mod h1:idky4TER38YIjr2cADF1/ugFMKvZV7p//pVeV5LZbF0= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4FzlJPP9H3Ko1TXpdjdqWffxXjp8SY6uk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9/go.mod h1:kjsXoK23q9Z/tLBrckZLLyvjhZoS+AGrzqzUfEClvMM= +github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 h1:7lKTr8zJ2nVaVgyII+7hUayTi7xWedMuANiNVXiD2S8= +github.com/aws/aws-sdk-go-v2/service/kms v1.27.5/go.mod h1:D9FVDkZjkZnnFHymJ3fPVz0zOUlNSd0xcIIVmmrAac8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.5/go.mod h1:CaFfXLYL376jgbP7VKC96uFcU8Rlavak0UlAwk1Dlhc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5/go.mod h1:W+nd4wWDVkSUIox9bacmkBP5NMFQeTJ/xqNabpzSR38= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNICmcgKPAO1CER25Wg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.5/go.mod h1:XX5gh4CB7wAs4KhcF46G6C8a2i7eupU19dcAAE+EydU= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= +github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8 h1:SoFYaT9UyGkR0+nogNyD/Lj+bsixB+SNuAS4ABlEs6M= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8/go.mod h1:2JF49jcDOrLStIXN/j/K1EKRq8a8R2qRnlZA6/o/c7c= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -208,8 +204,8 @@ github.com/caarlos0/env/v9 v9.0.0 h1:SI6JNsOA+y5gj9njpgybykATIylrRMklbs5ch6wO6pc github.com/caarlos0/env/v9 v9.0.0/go.mod h1:ye5mlCVMYh6tZ+vCgrs/B95sj88cg5Tlnc0XIzgZ020= github.com/caarlos0/go-reddit/v3 v3.0.1 h1:w8ugvsrHhaE/m4ez0BO/sTBOBWI9WZTjG7VTecHnql4= github.com/caarlos0/go-reddit/v3 v3.0.1/go.mod h1:QlwgmG5SAqxMeQvg/A2dD1x9cIZCO56BMnMdjXLoisI= -github.com/caarlos0/go-rpmutils v0.2.1-0.20211112020245-2cd62ff89b11 h1:IRrDwVlWQr6kS1U8/EtyA1+EHcc4yl8pndcqXWrEamg= -github.com/caarlos0/go-rpmutils v0.2.1-0.20211112020245-2cd62ff89b11/go.mod h1:je2KZ+LxaCNvCoKg32jtOIULcFogJKcL1ZWUaIBjKj0= +github.com/caarlos0/go-rpmutils v0.2.1-0.20240105125627-01185134a559 h1:5TPRjT2njvPKzXUcrcg6Dt+JPzQF+M5K7xb5V1Nwteg= +github.com/caarlos0/go-rpmutils v0.2.1-0.20240105125627-01185134a559/go.mod h1:sUS7SdlihaphHRYa/Uu4haxl9zL6DLGrFjoTsurEYOw= github.com/caarlos0/go-shellwords v1.0.12 h1:HWrUnu6lGbWfrDcFiHcZiwOLzHWjjrPVehULaTFgPp8= github.com/caarlos0/go-shellwords v1.0.12/go.mod h1:bYeeX1GrTLPl5cAMYEzdm272qdsQAZiaHgeF0KTk1Gw= github.com/caarlos0/log v0.4.4 h1:LnvgBz/ofsJ00AupP/cEfksJSZglb1L69g4Obk/sdAc= @@ -237,8 +233,8 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/cloudflare/circl v1.3.5 h1:g+wWynZqVALYAlpSQFAa7TscDnUK8mKYtrxMpw6AUKo= -github.com/cloudflare/circl v1.3.5/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -249,6 +245,8 @@ github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNA github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -263,12 +261,6 @@ github.com/dghubble/sling v1.4.0 h1:/n8MRosVTthvMbwlNZgLx579OGVjUOy3GNEv5BIqAWY= github.com/dghubble/sling v1.4.0/go.mod h1:0r40aNsU9EdDUVBNhfCstAtFgutjgJGYbO1oNzkMoM8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/disgoorg/disgo v0.17.0 h1:/LcgXgPDhzHt3GkQ4cpjmIJBim1/VYfS31VhGYif3Ms= -github.com/disgoorg/disgo v0.17.0/go.mod h1:AE2J/8oLR2PtYfqcARsk1mgBxQ5z3Z1OD6Lc2SA0gak= -github.com/disgoorg/json v1.1.0 h1:7xigHvomlVA9PQw9bMGO02PHGJJPqvX5AnwlYg/Tnys= -github.com/disgoorg/json v1.1.0/go.mod h1:BHDwdde0rpQFDVsRLKhma6Y7fTbQKub/zdGO5O9NqqA= -github.com/disgoorg/snowflake/v2 v2.0.1 h1:CuUxGLwggUxEswZOmZ+mZ5i0xSumQdXW9tXW7uGqe+0= -github.com/disgoorg/snowflake/v2 v2.0.1/go.mod h1:SPU9c2CNn5DSyb86QcKtdZgix9osEtKrHLW4rMhfLCs= github.com/distribution/distribution/v3 v3.0.0-20221021092657-c47a966fded8 h1:zuxvqNfQKyGNH3a1yFh1ofD4Y7ycgdwQhHX6QRH+Cwo= github.com/distribution/distribution/v3 v3.0.0-20221021092657-c47a966fded8/go.mod h1:6rIc5NMSjXjjnwzWWy3HAm9gDBu+X7aCzL8VrHIKgxM= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -289,8 +281,8 @@ github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQ github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elliotchance/orderedmap/v2 v2.2.0 h1:7/2iwO98kYT4XkOjA9mBEIwvi4KpGB4cyHeOFOnj4Vk= github.com/elliotchance/orderedmap/v2 v2.2.0/go.mod h1:85lZyVbpGaGvHvnKa7Qhx7zncAdBIBq6u56Hb1PRU5Q= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -316,12 +308,12 @@ github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= -github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE= -github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -456,8 +448,8 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.17.0 h1:5p+zYs/R4VGHkhyvgWurWrpJ2hW4Vv9fQI+GzdcwXLk= -github.com/google/go-containerregistry v0.17.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= +github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic= +github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs= github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -496,8 +488,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3 github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= @@ -513,8 +505,8 @@ github.com/goreleaser/chglog v0.5.0 h1:Sk6BMIpx8+vpAf8KyPit34OgWui8c7nKTMHhYx88j github.com/goreleaser/chglog v0.5.0/go.mod h1:Ri46M3lrMuv76FHszs3vtABR8J8k1w9JHYAzxeeOl28= github.com/goreleaser/fileglob v1.3.0 h1:/X6J7U8lbDpQtBvGcwwPS6OpzkNVlVEsFUVRx9+k+7I= github.com/goreleaser/fileglob v1.3.0/go.mod h1:Jx6BoXv3mbYkEzwm9THo7xbr5egkAraxkGorbJb4RxU= -github.com/goreleaser/nfpm/v2 v2.35.1 h1:QpDus/yMTwG/IpRxI/hL7VuRII1mzYwbLInsPiWrtaM= -github.com/goreleaser/nfpm/v2 v2.35.1/go.mod h1:KeO5wxOHyU1nPFO5siSfw6Ds5dKyy0E6y89/ypM7+ZI= +github.com/goreleaser/nfpm/v2 v2.35.3 h1:YGEygriY8hbsNdCBUif6RLb5xPISDHc+d22rRGXV4Zk= +github.com/goreleaser/nfpm/v2 v2.35.3/go.mod h1:eyKRLSdXPCV1GgJ0tDNe4SqcZD0Fr5cezRwcuLjpxyM= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -535,7 +527,6 @@ github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBY github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -583,8 +574,8 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E= +github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -613,7 +604,6 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -661,12 +651,14 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= -github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -703,15 +695,13 @@ github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b h1:qYTY2tN72LhgDj2rtWG+LI6TXFl2ygFQQ4YezfVaGQE= -github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b/go.mod h1:/pA7k3zsXKdjjAiUhB5CjuKib9KJGCaLvZwtxGC8U0s= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= @@ -730,8 +720,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.1.1 h1:MTk78x9FPgDFVFkDLTrsnnfCJl7g1C/nnKvePgrIngE= -github.com/skeema/knownhosts v1.1.1/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/slack-go/slack v0.12.3 h1:92/dfFU8Q5XP6Wp5rr5/T5JHLM5c5Smtn53fhToAP88= github.com/slack-go/slack v0.12.3/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartystreets/assertions v1.13.1 h1:Ef7KhSmjZcK6AVf9YbJdvPYG9avaF0ZxudX+ThRdWfU= @@ -786,8 +776,8 @@ github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinC github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= -github.com/xanzy/go-gitlab v0.95.2 h1:4p0IirHqEp5f0baK/aQqr4TR57IsD+8e4fuyAA1yi88= -github.com/xanzy/go-gitlab v0.95.2/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= +github.com/xanzy/go-gitlab v0.97.0 h1:StMqJ1Kvt00X43pYIBBjj52dFlghwSeBhRDRfzaZ7xY= +github.com/xanzy/go-gitlab v0.97.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -828,8 +818,8 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -gocloud.dev v0.35.0 h1:x/Gtt5OJdT4j+ir1AXAIXb7bBnFawXAAaJptCUGk3HU= -gocloud.dev v0.35.0/go.mod h1:wbyF+BhfdtLWyUtVEWRW13hFLb1vXnV2ovEhYGQe3ck= +gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus= +gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -842,15 +832,15 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -928,8 +918,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -939,8 +930,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -955,8 +946,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1013,15 +1004,19 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1035,6 +1030,7 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1098,8 +1094,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/goreleaser/.editorconfig b/goreleaser/.editorconfig index cedad1a..ce72876 100644 --- a/goreleaser/.editorconfig +++ b/goreleaser/.editorconfig @@ -9,6 +9,6 @@ trim_trailing_whitespace = true insert_final_newline = true charset = utf-8 -[*.{md,yml,yaml}] +[*.{md,yml,yaml,rb}] indent_size = 2 indent_style = space diff --git a/goreleaser/.envrc b/goreleaser/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/goreleaser/.envrc @@ -0,0 +1 @@ +use flake diff --git a/goreleaser/.github/dependabot.yml b/goreleaser/.github/dependabot.yml index 022e304..3c8156f 100644 --- a/goreleaser/.github/dependabot.yml +++ b/goreleaser/.github/dependabot.yml @@ -8,7 +8,7 @@ updates: labels: - "dependencies" commit-message: - prefix: "feat" + prefix: "chore" include: "scope" - package-ecosystem: "github-actions" directory: "/" @@ -28,5 +28,5 @@ updates: labels: - "dependencies" commit-message: - prefix: "feat" + prefix: "chore" include: "scope" diff --git a/goreleaser/.github/workflows/build.yml b/goreleaser/.github/workflows/build.yml index b6c10fe..884b5be 100644 --- a/goreleaser/.github/workflows/build.yml +++ b/goreleaser/.github/workflows/build.yml @@ -48,14 +48,14 @@ jobs: - uses: crazy-max/ghaction-upx@v3 with: install-only: true - - uses: cachix/install-nix-action@v24 + - uses: cachix/install-nix-action@v25 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4 with: go-version: stable - - uses: sigstore/cosign-installer@v3.3.0 - - uses: anchore/sbom-action/download-syft@v0.15.1 + - uses: sigstore/cosign-installer@v3.4.0 + - uses: anchore/sbom-action/download-syft@v0.15.8 - name: setup-validate-krew-manifest run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest - name: setup-tparse @@ -66,7 +66,7 @@ jobs: task build - name: test run: ./scripts/test.sh - - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3 + - uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4 with: file: ./coverage.txt - run: ./goreleaser check diff --git a/goreleaser/.github/workflows/depsreview.yaml b/goreleaser/.github/workflows/depsreview.yaml index 635c419..2fb04c8 100644 --- a/goreleaser/.github/workflows/depsreview.yaml +++ b/goreleaser/.github/workflows/depsreview.yaml @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3 - - uses: actions/dependency-review-action@v3 + - uses: actions/dependency-review-action@v4 with: allow-licenses: BSD-2-Clause, BSD-3-Clause, MIT, Apache-2.0, MPL-2.0 diff --git a/goreleaser/.github/workflows/docs.yml b/goreleaser/.github/workflows/docs.yml index dc2455c..587b5bb 100644 --- a/goreleaser/.github/workflows/docs.yml +++ b/goreleaser/.github/workflows/docs.yml @@ -20,14 +20,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3 - - uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1 + - uses: cachix/install-nix-action@v25 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4 - with: - go-version: stable - - run: task docs:build - - uses: wjdp/htmltest-action@09118714cd26bef56bd3d0819e4f9b1dce6f60a9 # master - with: - path: www/site - config: www/htmltest.yml + nix_path: nixpkgs=channel:nixos-unstable + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - run: nix develop .#docs --command task docs:test diff --git a/goreleaser/.github/workflows/generate.yml b/goreleaser/.github/workflows/generate.yml index 1cc35ac..7fe975d 100644 --- a/goreleaser/.github/workflows/generate.yml +++ b/goreleaser/.github/workflows/generate.yml @@ -23,12 +23,15 @@ jobs: with: version: 3.x repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: "go install mvdan.cc/gofumpt@latest" + - run: "go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest" - run: task docs:releases env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: task docs:generate - run: task schema:generate - run: task nix:licenses:generate + - run: task schema:validate - uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5 with: commit_message: "chore: docs auto-update" diff --git a/goreleaser/.github/workflows/nightly-oss.yml b/goreleaser/.github/workflows/nightly-oss.yml index 96e0bc5..c7b245a 100644 --- a/goreleaser/.github/workflows/nightly-oss.yml +++ b/goreleaser/.github/workflows/nightly-oss.yml @@ -28,12 +28,12 @@ jobs: - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4 with: go-version: stable - - uses: sigstore/cosign-installer@v3.3.0 - - uses: anchore/sbom-action/download-syft@v0.15.1 + - uses: sigstore/cosign-installer@v3.4.0 + - uses: anchore/sbom-action/download-syft@v0.15.8 - uses: crazy-max/ghaction-upx@v3 with: install-only: true - - uses: cachix/install-nix-action@v24 + - uses: cachix/install-nix-action@v25 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: dockerhub-login diff --git a/goreleaser/.github/workflows/release.yml b/goreleaser/.github/workflows/release.yml index 3a5a171..68bc07a 100644 --- a/goreleaser/.github/workflows/release.yml +++ b/goreleaser/.github/workflows/release.yml @@ -57,7 +57,7 @@ jobs: version: 3.x repo-token: ${{ secrets.GITHUB_TOKEN }} - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2 - - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 + - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4 with: path: | ./dist/*.deb @@ -89,19 +89,19 @@ jobs: - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v4 with: go-version: stable - - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3 + - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4 with: path: | ./dist/*.deb ./dist/*.rpm ./dist/*.apk key: ${{ github.ref }} - - uses: sigstore/cosign-installer@v3.3.0 - - uses: anchore/sbom-action/download-syft@v0.15.1 + - uses: sigstore/cosign-installer@v3.4.0 + - uses: anchore/sbom-action/download-syft@v0.15.8 - uses: crazy-max/ghaction-upx@v3 with: install-only: true - - uses: cachix/install-nix-action@v24 + - uses: cachix/install-nix-action@v25 with: github_access_token: ${{ secrets.GITHUB_TOKEN }} - name: dockerhub-login diff --git a/goreleaser/.gitignore b/goreleaser/.gitignore index ba6a0ca..c3c03a3 100644 --- a/goreleaser/.gitignore +++ b/goreleaser/.gitignore @@ -14,4 +14,5 @@ completions/ .idea/ manpages output.json +.direnv !/int/pipe/dist diff --git a/goreleaser/.goreleaser.yaml b/goreleaser/.goreleaser.yaml index ba98adb..743ea80 100644 --- a/goreleaser/.goreleaser.yaml +++ b/goreleaser/.goreleaser.yaml @@ -74,7 +74,7 @@ changelog: - go mod tidy groups: - title: Dependency updates - regexp: '^.*?(feat|fix)\(deps\)!?:.+$' + regexp: '^.*?(feat|fix|chore)\(deps\)!?:.+$' order: 300 - title: "New Features" regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' @@ -83,13 +83,13 @@ changelog: regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$' order: 150 - title: "Bug fixes" - regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' + regexp: '^.*?(fix|refactor)(\([[:word:]]+\))??!?:.+$' order: 200 - title: "Documentation updates" - regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$ + regexp: ^.*?docs?(\([[:word:]]+\))??!?:.+$ order: 400 - title: "Build process updates" - regexp: ^.*?build(\([[:word:]]+\))??!?:.+$ + regexp: ^.*?(build|ci)(\([[:word:]]+\))??!?:.+$ order: 400 - title: Other work order: 9999 @@ -154,6 +154,14 @@ docker_manifests: image_templates: - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64" - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64" + - name_template: "{{ if .IsNightly }}goreleaser/goreleaser:nightly{{ end }}" + image_templates: + - "goreleaser/goreleaser:v{{ .Version }}-amd64" + - "goreleaser/goreleaser:v{{ .Version }}-arm64" + - name_template: "{{ if .IsNightly }}ghcr.io/goreleaser/goreleaser:nightly{{ end }}" + image_templates: + - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-amd64" + - "ghcr.io/goreleaser/goreleaser:v{{ .Version }}-arm64" archives: - name_template: >- diff --git a/goreleaser/Dockerfile b/goreleaser/Dockerfile index 06b503c..31b8cd4 100644 --- a/goreleaser/Dockerfile +++ b/goreleaser/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21.5-alpine@sha256:4db4aac30880b978cae5445dd4a706215249ad4f43d28bd7cdf7906e9be8dd6b +FROM golang:1.21.6-alpine@sha256:a6a7f1fcf12f5efa9e04b1e75020931a616cd707f14f62ab5262bfbe109aa84a RUN apk add --no-cache bash \ curl \ diff --git a/goreleaser/README.md b/goreleaser/README.md index a696955..23ef26c 100644 --- a/goreleaser/README.md +++ b/goreleaser/README.md @@ -126,5 +126,4 @@ This project exists thanks to all the people who contribute. [[Contribute](CONTR ## Stargazers over time - -[![Stargazers over time](https://starchart.cc/goreleaser/goreleaser.svg)](https://starchart.cc/goreleaser/goreleaser) +[![Stargazers over time](https://starchart.cc/goreleaser/goreleaser.svg?variant=adaptive)](https://starchart.cc/goreleaser/goreleaser) diff --git a/goreleaser/Taskfile.yml b/goreleaser/Taskfile.yml index 62f98e2..6144193 100644 --- a/goreleaser/Taskfile.yml +++ b/goreleaser/Taskfile.yml @@ -6,9 +6,6 @@ env: GO111MODULE: on GOPROXY: https://proxy.golang.org,direct -vars: - DOCKER: '{{default "docker" .DOCKER}}' - tasks: dev: desc: Setup git hooks @@ -83,6 +80,13 @@ tasks: generates: - ./www/docs/static/schema.json + schema:validate: + desc: Validate JSONSchema + cmds: + - jv ./www/docs/static/schema.json + sources: + - ./www/docs/static/schema.json + docs:generate: desc: Generate docs cmds: @@ -124,15 +128,19 @@ tasks: desc: Start documentation server cmds: - task: docs:generate - - "{{.DOCKER}} build -t mkdocs -f www/docker/Dockerfile www/docker" - - "{{.DOCKER}} run --rm -p 8000:8000 -v ${PWD}/www:/docs mkdocs" + - "mkdocs serve -f www/mkdocs.yml -a 0.0.0.0:8000" docs:build: desc: Build docs cmds: - task: docs:generate - - "{{.DOCKER}} build -t mkdocs -f www/docker/Dockerfile www/docker" - - "{{.DOCKER}} run --rm -v ${PWD}/www:/docs mkdocs build" + - "mkdocs build -f www/mkdocs.yml" + + docs:test: + desc: Test docs with htmltest + cmds: + - task: docs:build + - "htmltest www/site -c www/htmltest.yml" release: desc: Create a new tag diff --git a/goreleaser/USERS.md b/goreleaser/USERS.md index ccd32e1..0e5774f 100644 --- a/goreleaser/USERS.md +++ b/goreleaser/USERS.md @@ -95,4 +95,4 @@ If you're going to edit it, please: [^1]: Entries were either added by the companies themselves or by the maintainers after seeing it in the wild. - You can see all public repositories using GoReleaser by [searching on GitHub](https://github.com/search?q=filename%3Agoreleaser+language%3Ayaml+path%3A%2F). + You can see all public repositories using GoReleaser by [searching on GitHub](https://github.com/search?q=path%3A.goreleaser.yml+OR+path%3A.goreleaser.yaml+&type=code). diff --git a/goreleaser/cmd/build.go b/goreleaser/cmd/build.go index 0ec7acf..2a0a286 100644 --- a/goreleaser/cmd/build.go +++ b/goreleaser/cmd/build.go @@ -167,6 +167,7 @@ func setupPipeline(ctx *context.Context, options buildOpts) []pipeline.Piper { } func setupBuildContext(ctx *context.Context, options buildOpts) error { + ctx.Action = context.ActionBuild ctx.Deprecated = options.deprecated // test only ctx.Parallelism = runtime.GOMAXPROCS(0) if options.parallelism > 0 { diff --git a/goreleaser/cmd/build_test.go b/goreleaser/cmd/build_test.go index 75a8de9..3a938e0 100644 --- a/goreleaser/cmd/build_test.go +++ b/goreleaser/cmd/build_test.go @@ -137,6 +137,11 @@ func TestBuildFlags(t *testing.T) { return ctx } + t.Run("action", func(t *testing.T) { + ctx := setup(buildOpts{}) + require.Equal(t, context.ActionBuild, ctx.Action) + }) + t.Run("snapshot", func(t *testing.T) { ctx := setup(buildOpts{ snapshot: true, diff --git a/goreleaser/cmd/release.go b/goreleaser/cmd/release.go index c3cdc28..dd30584 100644 --- a/goreleaser/cmd/release.go +++ b/goreleaser/cmd/release.go @@ -171,6 +171,7 @@ func releaseProject(options releaseOpts) (*context.Context, error) { } func setupReleaseContext(ctx *context.Context, options releaseOpts) error { + ctx.Action = context.ActionRelease ctx.Deprecated = options.deprecated // test only ctx.Parallelism = runtime.GOMAXPROCS(0) if options.parallelism > 0 { diff --git a/goreleaser/cmd/release_test.go b/goreleaser/cmd/release_test.go index ec8ba93..96fdd39 100644 --- a/goreleaser/cmd/release_test.go +++ b/goreleaser/cmd/release_test.go @@ -62,6 +62,11 @@ func TestReleaseFlags(t *testing.T) { return ctx } + t.Run("action", func(t *testing.T) { + ctx := setup(t, releaseOpts{}) + require.Equal(t, context.ActionRelease, ctx.Action) + }) + t.Run("snapshot", func(t *testing.T) { ctx := setup(t, releaseOpts{ snapshot: true, diff --git a/goreleaser/flake.lock b/goreleaser/flake.lock new file mode 100644 index 0000000..14efb3c --- /dev/null +++ b/goreleaser/flake.lock @@ -0,0 +1,78 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1703438236, + "narHash": "sha256-aqVBq1u09yFhL7bj1/xyUeJjzr92fXVvQSSEx6AdB1M=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5f64a12a728902226210bf01d25ec6cbb9d9265b", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "staging": "staging" + } + }, + "staging": { + "locked": { + "lastModified": 1703777495, + "narHash": "sha256-ISkNWa58+6Uk/nQ47omTETrV+yhKFbnU/wR9n+3ux8g=", + "owner": "caarlos0", + "repo": "nixpkgs", + "rev": "e1d1738a056a052aedb6560c240b2749af33fee0", + "type": "github" + }, + "original": { + "owner": "caarlos0", + "ref": "wip", + "repo": "nixpkgs", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/goreleaser/flake.nix b/goreleaser/flake.nix new file mode 100644 index 0000000..d2af567 --- /dev/null +++ b/goreleaser/flake.nix @@ -0,0 +1,50 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + staging.url = "github:caarlos0/nixpkgs/wip"; + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = { nixpkgs, staging, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + staging-pkgs = staging.legacyPackages.${system}; + in + { + packages.default = pkgs.buildGoModule { + pname = "goreleaser"; + version = "unversioned"; + src = ./.; + ldflags = [ "-s" "-w" "-X main.version=dev" "-X main.builtBy=flake" ]; + doCheck = false; + vendorHash = "sha256-wY3kIhNIqTaK9MT1VeePERNhqvbtf6bsyRTjG8nrqxU="; + }; + + devShells.default = pkgs.mkShellNoCC { + packages = with pkgs; [ + go + go-task + gofumpt + syft + upx + cosign + gnupg + ]; + shellHook = "go mod tidy"; + }; + + devShells.docs = pkgs.mkShellNoCC { + packages = with pkgs; with staging-pkgs.python311Packages; [ + go-task + htmltest + mkdocs-material + mkdocs-redirects + mkdocs-minify + mkdocs-rss-plugin + mkdocs-include-markdown-plugin + ] ++ mkdocs-material.passthru.optional-dependencies.git; + }; + } + ); +} + diff --git a/goreleaser/go.mod b/goreleaser/go.mod index 877d9a3..bbef9e2 100644 --- a/goreleaser/go.mod +++ b/goreleaser/go.mod @@ -3,10 +3,10 @@ module github.com/goreleaser/goreleaser go 1.21 require ( - code.gitea.io/sdk/gitea v0.17.0 + code.gitea.io/sdk/gitea v0.17.1 dario.cat/mergo v1.0.0 github.com/Masterminds/semver/v3 v3.2.1 - github.com/atc0005/go-teams-notify/v2 v2.8.0 + github.com/atc0005/go-teams-notify/v2 v2.9.0 github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8 github.com/caarlos0/ctrlc v1.2.0 github.com/caarlos0/env/v9 v9.0.0 @@ -20,16 +20,14 @@ require ( github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 github.com/dghubble/go-twitter v0.0.0-20211115160449-93a8679adecb github.com/dghubble/oauth1 v0.7.2 - github.com/disgoorg/disgo v0.17.0 - github.com/disgoorg/snowflake/v2 v2.0.1 github.com/distribution/distribution/v3 v3.0.0-20221021092657-c47a966fded8 github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible - github.com/google/go-containerregistry v0.17.0 + github.com/google/go-containerregistry v0.19.0 github.com/google/go-github/v57 v57.0.0 github.com/google/ko v0.15.1 - github.com/google/uuid v1.5.0 + github.com/google/uuid v1.6.0 github.com/goreleaser/fileglob v1.3.0 - github.com/goreleaser/nfpm/v2 v2.35.1 + github.com/goreleaser/nfpm/v2 v2.35.3 github.com/hashicorp/go-multierror v1.1.1 github.com/invopop/jsonschema v0.12.0 github.com/jarcoal/httpmock v1.3.1 @@ -45,18 +43,19 @@ require ( github.com/stretchr/testify v1.8.4 github.com/ulikunitz/xz v0.5.11 github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 - github.com/xanzy/go-gitlab v0.95.2 - gocloud.dev v0.35.0 - golang.org/x/crypto v0.17.0 - golang.org/x/oauth2 v0.15.0 - golang.org/x/sync v0.5.0 + github.com/xanzy/go-gitlab v0.97.0 + gocloud.dev v0.36.0 + golang.org/x/crypto v0.18.0 + golang.org/x/oauth2 v0.16.0 + golang.org/x/sync v0.6.0 golang.org/x/text v0.14.0 - golang.org/x/tools v0.16.1 + golang.org/x/tools v0.17.0 gopkg.in/mail.v2 v2.3.1 gopkg.in/yaml.v3 v3.0.1 ) require ( + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.1.0 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect @@ -99,33 +98,32 @@ require ( github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect + github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect - github.com/aws/aws-sdk-go v1.48.3 // indirect - github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect + github.com/aws/aws-sdk-go v1.50.10 + github.com/aws/aws-sdk-go-v2 v1.24.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect + github.com/aws/aws-sdk-go-v2/config v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.12 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 // indirect github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2 // indirect github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.26.3 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 // indirect + github.com/aws/smithy-go v1.19.0 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -134,7 +132,7 @@ require ( github.com/cavaliergopher/cpio v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cloudflare/circl v1.3.5 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect @@ -142,7 +140,6 @@ require ( github.com/davidmz/go-pageant v1.0.2 // indirect github.com/dghubble/sling v1.4.0 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/disgoorg/json v1.1.0 // indirect github.com/docker/cli v24.0.7+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v24.0.7+incompatible // indirect @@ -156,8 +153,8 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-fed/httpsig v1.1.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.4.1 // indirect - github.com/go-git/go-git/v5 v5.7.0 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect + github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/go-openapi/analysis v0.21.4 // indirect github.com/go-openapi/errors v0.20.4 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect @@ -196,7 +193,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.5 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/letsencrypt/boulder v0.0.0-20231026200631-000cd05d5491 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect @@ -214,7 +211,7 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc5 // indirect - github.com/opencontainers/runc v1.1.5 // indirect + github.com/opencontainers/runc v1.1.12 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect @@ -227,14 +224,13 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/rivo/uniseg v0.4.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/sigstore/cosign/v2 v2.2.1 // indirect github.com/sigstore/rekor v1.3.3 // indirect github.com/sigstore/sigstore v1.7.5 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/skeema/knownhosts v1.1.1 // indirect + github.com/skeema/knownhosts v1.2.1 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -255,9 +251,9 @@ require ( go.uber.org/automaxprocs v1.5.3 golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/time v0.4.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.151.0 // indirect diff --git a/goreleaser/go.sum b/goreleaser/go.sum index c503dd1..32842dc 100644 --- a/goreleaser/go.sum +++ b/goreleaser/go.sum @@ -47,8 +47,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= -code.gitea.io/sdk/gitea v0.17.0 h1:8JPBss4+Jf7AE1YcfyiGrngTXE8dFSG3si/bypsTH34= -code.gitea.io/sdk/gitea v0.17.0/go.mod h1:ndkDk99BnfiUCCYEUhpNzi0lpmApXlwRFqClBlOlEBg= +code.gitea.io/sdk/gitea v0.17.1 h1:3jCPOG2ojbl8AcfaUCRYLT5MUcBMFwS0OSK2mA5Zok8= +code.gitea.io/sdk/gitea v0.17.1/go.mod h1:aCnBqhHpoEWA180gMbaCtdX9Pl6BWBAuuP2miadoTNM= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -104,8 +104,6 @@ github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= @@ -118,16 +116,14 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE= -github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= +github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ekTTXpdwKYF8eBlsYsDVoggDAuAjoK66k= github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw= github.com/ProtonMail/gopenpgp/v2 v2.7.1 h1:Awsg7MPc2gD3I7IFac2qE3Gdls0lZW8SzrFZ3k1oz0s= github.com/ProtonMail/gopenpgp/v2 v2.7.1/go.mod h1:/BU5gfAVwqyd8EfC3Eu7zmuhwYQpKs+cGD8M//iiaxs= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= @@ -139,58 +135,58 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/atc0005/go-teams-notify/v2 v2.8.0 h1:971J5qivrzBbYMDAdmW7v9s7W2u2jiIRVcY+LaIJqww= -github.com/atc0005/go-teams-notify/v2 v2.8.0/go.mod h1:SIeE1UfCcVRYMqP5b+r1ZteHyA/2UAjzWF5COnZ8q0w= -github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g= -github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/atc0005/go-teams-notify/v2 v2.9.0 h1:VkZm1LSotDxvooLYabdM8TcRh0hFU8/iIP1JvChs0Y4= +github.com/atc0005/go-teams-notify/v2 v2.9.0/go.mod h1:SIeE1UfCcVRYMqP5b+r1ZteHyA/2UAjzWF5COnZ8q0w= +github.com/aws/aws-sdk-go v1.50.10 h1:H3NQvqRUKG+9oysCKTIyylpkqfPA7MiBtzTnu/cIGqE= +github.com/aws/aws-sdk-go v1.50.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2 h1:3q7vcLhq6JXqTLPpPuDJgw3f+DFqd4p+BWL2DlplRPc= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.14.2/go.mod h1:9aqZoo/OeMBK/Nf3wzQzTlM92u7Bip256GHpY0oQbX4= +github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk= +github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo= +github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o= +github.com/aws/aws-sdk-go-v2/config v1.26.1/go.mod h1:ZB+CuKHRbb5v5F0oJtGdhFTelmrxd4iWO1lf0rQwSAg= +github.com/aws/aws-sdk-go-v2/credentials v1.16.12 h1:v/WgB8NxprNvr5inKIiVVrXPuuTegM+K8nncFkr1usU= +github.com/aws/aws-sdk-go-v2/credentials v1.16.12/go.mod h1:X21k0FjEJe+/pauud82HYiQbEr9jRKY3kXEIQ4hXeTQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6JkVzjowOKeOJRHERyy1vh58= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4/go.mod h1:u77N7eEECzUv7F0xl2gcfK/vzc8wcjWobpy+DcrLJ5E= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9/go.mod h1:hqamLz7g1/4EJP+GH5NBhcUMLjW+gKLQabgyz6/7WAU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9/go.mod h1:YD0aYBWCrPENpHolhKw2XDlTIWae2GKXT1T4o6N6hiM= github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2 h1:y6LX9GUoEA3mO0qpFl1ZQHj1rFyPWVphlzebiSt2tKE= github.com/aws/aws-sdk-go-v2/service/ecr v1.20.2/go.mod h1:Q0LcmaN/Qr8+4aSBrdrXXePqoX0eOuYpJLbYpilmWnA= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2 h1:PpbXaecV3sLAS6rjQiaKw4/jyq3Z8gNzmoJupHAoBp0= github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.18.2/go.mod h1:fUHpGXr4DrXkEDpGAjClPsviWf+Bszeb0daKE0blxv8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 h1:6DRKQc+9cChgzL5gplRGusI5dBGeiEod4m/pmGbcX48= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4/go.mod h1:s8ORvrW4g4v7IvYKIAoBg17w3GQ+XuwXDXYrQ5SkzU0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 h1:o3DcfCxGDIT20pTbVKVhp3vWXOj/VvgazNJvumWeYW0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4/go.mod h1:Uy0KVOxuTK2ne+/PKQ+VvEeWmjMMksE17k/2RK/r5oM= -github.com/aws/aws-sdk-go-v2/service/kms v1.26.3 h1:li5dFiK1tkAFXvOC9QPWAVWqTu8ZxpIR0KzKmof6TIE= -github.com/aws/aws-sdk-go-v2/service/kms v1.26.3/go.mod h1:N3++/sLV97B8Zliz7KRqNcojOX7iMBZWKiuit5FKtH0= -github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0 h1:FJTWR2nP1ddLIbk4n7Glw8wGbeWGHaViUwADPzE/EBo= -github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0/go.mod h1:dqJ5JBL0clzgHriH35Amx3LRFY6wNIPUX7QO/BerSBo= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 h1:/90OR2XbSYfXucBMJ4U14wrjlfleq/0SB6dZDPncgmo= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9/go.mod h1:dN/Of9/fNZet7UrQQ6kTDo/VSwKPIq94vjlU16bRARc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 h1:Nf2sHxjMJR8CSImIVCONRi4g0Su3J+TSTbS7G0pUeMU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9/go.mod h1:idky4TER38YIjr2cADF1/ugFMKvZV7p//pVeV5LZbF0= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4FzlJPP9H3Ko1TXpdjdqWffxXjp8SY6uk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9/go.mod h1:kjsXoK23q9Z/tLBrckZLLyvjhZoS+AGrzqzUfEClvMM= +github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 h1:7lKTr8zJ2nVaVgyII+7hUayTi7xWedMuANiNVXiD2S8= +github.com/aws/aws-sdk-go-v2/service/kms v1.27.5/go.mod h1:D9FVDkZjkZnnFHymJ3fPVz0zOUlNSd0xcIIVmmrAac8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.5/go.mod h1:CaFfXLYL376jgbP7VKC96uFcU8Rlavak0UlAwk1Dlhc= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5/go.mod h1:W+nd4wWDVkSUIox9bacmkBP5NMFQeTJ/xqNabpzSR38= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNICmcgKPAO1CER25Wg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.5/go.mod h1:XX5gh4CB7wAs4KhcF46G6C8a2i7eupU19dcAAE+EydU= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= +github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8 h1:SoFYaT9UyGkR0+nogNyD/Lj+bsixB+SNuAS4ABlEs6M= github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231024185945-8841054dbdb8/go.mod h1:2JF49jcDOrLStIXN/j/K1EKRq8a8R2qRnlZA6/o/c7c= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= @@ -212,8 +208,8 @@ github.com/caarlos0/env/v9 v9.0.0 h1:SI6JNsOA+y5gj9njpgybykATIylrRMklbs5ch6wO6pc github.com/caarlos0/env/v9 v9.0.0/go.mod h1:ye5mlCVMYh6tZ+vCgrs/B95sj88cg5Tlnc0XIzgZ020= github.com/caarlos0/go-reddit/v3 v3.0.1 h1:w8ugvsrHhaE/m4ez0BO/sTBOBWI9WZTjG7VTecHnql4= github.com/caarlos0/go-reddit/v3 v3.0.1/go.mod h1:QlwgmG5SAqxMeQvg/A2dD1x9cIZCO56BMnMdjXLoisI= -github.com/caarlos0/go-rpmutils v0.2.1-0.20211112020245-2cd62ff89b11 h1:IRrDwVlWQr6kS1U8/EtyA1+EHcc4yl8pndcqXWrEamg= -github.com/caarlos0/go-rpmutils v0.2.1-0.20211112020245-2cd62ff89b11/go.mod h1:je2KZ+LxaCNvCoKg32jtOIULcFogJKcL1ZWUaIBjKj0= +github.com/caarlos0/go-rpmutils v0.2.1-0.20240105125627-01185134a559 h1:5TPRjT2njvPKzXUcrcg6Dt+JPzQF+M5K7xb5V1Nwteg= +github.com/caarlos0/go-rpmutils v0.2.1-0.20240105125627-01185134a559/go.mod h1:sUS7SdlihaphHRYa/Uu4haxl9zL6DLGrFjoTsurEYOw= github.com/caarlos0/go-shellwords v1.0.12 h1:HWrUnu6lGbWfrDcFiHcZiwOLzHWjjrPVehULaTFgPp8= github.com/caarlos0/go-shellwords v1.0.12/go.mod h1:bYeeX1GrTLPl5cAMYEzdm272qdsQAZiaHgeF0KTk1Gw= github.com/caarlos0/go-version v0.1.1 h1:1bikKHkGGVIIxqCmufhSSs3hpBScgHGacrvsi8FuIfc= @@ -236,34 +232,30 @@ github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1 github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/charmbracelet/x/exp/ordered v0.0.0-20231010190216-1cb11efc897d h1:+o+e/8hf7cG0SbAzEAm/usJ8qoZPgFXhudLjop+TM0g= github.com/charmbracelet/x/exp/ordered v0.0.0-20231010190216-1cb11efc897d/go.mod h1:aoG4bThKYIOnyB55r202eHqo6TkN7ZXV+cu4Do3eoBQ= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 h1:krfRl01rzPzxSxyLyrChD+U+MzsBXbm0OwYYB67uF+4= github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589/go.mod h1:OuDyvmLnMCwa2ep4Jkm6nyA0ocJuZlGyk2gGseVzERM= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= -github.com/cloudflare/circl v1.3.5 h1:g+wWynZqVALYAlpSQFAa7TscDnUK8mKYtrxMpw6AUKo= -github.com/cloudflare/circl v1.3.5/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -278,12 +270,6 @@ github.com/dghubble/sling v1.4.0 h1:/n8MRosVTthvMbwlNZgLx579OGVjUOy3GNEv5BIqAWY= github.com/dghubble/sling v1.4.0/go.mod h1:0r40aNsU9EdDUVBNhfCstAtFgutjgJGYbO1oNzkMoM8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/disgoorg/disgo v0.17.0 h1:/LcgXgPDhzHt3GkQ4cpjmIJBim1/VYfS31VhGYif3Ms= -github.com/disgoorg/disgo v0.17.0/go.mod h1:AE2J/8oLR2PtYfqcARsk1mgBxQ5z3Z1OD6Lc2SA0gak= -github.com/disgoorg/json v1.1.0 h1:7xigHvomlVA9PQw9bMGO02PHGJJPqvX5AnwlYg/Tnys= -github.com/disgoorg/json v1.1.0/go.mod h1:BHDwdde0rpQFDVsRLKhma6Y7fTbQKub/zdGO5O9NqqA= -github.com/disgoorg/snowflake/v2 v2.0.1 h1:CuUxGLwggUxEswZOmZ+mZ5i0xSumQdXW9tXW7uGqe+0= -github.com/disgoorg/snowflake/v2 v2.0.1/go.mod h1:SPU9c2CNn5DSyb86QcKtdZgix9osEtKrHLW4rMhfLCs= github.com/distribution/distribution/v3 v3.0.0-20221021092657-c47a966fded8 h1:zuxvqNfQKyGNH3a1yFh1ofD4Y7ycgdwQhHX6QRH+Cwo= github.com/distribution/distribution/v3 v3.0.0-20221021092657-c47a966fded8/go.mod h1:6rIc5NMSjXjjnwzWWy3HAm9gDBu+X7aCzL8VrHIKgxM= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= @@ -302,11 +288,10 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 h1:RIB4cRk+lBqKK3Oy0r2gRX4ui7tuhiZq2SuTtTCi0/0= -github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elliotchance/orderedmap/v2 v2.2.0 h1:7/2iwO98kYT4XkOjA9mBEIwvi4KpGB4cyHeOFOnj4Vk= github.com/elliotchance/orderedmap/v2 v2.2.0/go.mod h1:85lZyVbpGaGvHvnKa7Qhx7zncAdBIBq6u56Hb1PRU5Q= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -321,7 +306,6 @@ github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -332,12 +316,12 @@ github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI= github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= -github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE= -github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.11.0 h1:XIZc1p+8YzypNr34itUfSvYJcv+eYdTnTvOZ2vD3cA4= +github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lKqXmCUiUCY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -417,8 +401,6 @@ github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/V github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -478,8 +460,8 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.17.0 h1:5p+zYs/R4VGHkhyvgWurWrpJ2hW4Vv9fQI+GzdcwXLk= -github.com/google/go-containerregistry v0.17.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= +github.com/google/go-containerregistry v0.19.0 h1:uIsMRBV7m/HDkDxE/nXMnv1q+lOOSPlQ/ywc5JbB8Ic= +github.com/google/go-containerregistry v0.19.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs= github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -519,8 +501,8 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3 github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= @@ -536,8 +518,8 @@ github.com/goreleaser/chglog v0.5.0 h1:Sk6BMIpx8+vpAf8KyPit34OgWui8c7nKTMHhYx88j github.com/goreleaser/chglog v0.5.0/go.mod h1:Ri46M3lrMuv76FHszs3vtABR8J8k1w9JHYAzxeeOl28= github.com/goreleaser/fileglob v1.3.0 h1:/X6J7U8lbDpQtBvGcwwPS6OpzkNVlVEsFUVRx9+k+7I= github.com/goreleaser/fileglob v1.3.0/go.mod h1:Jx6BoXv3mbYkEzwm9THo7xbr5egkAraxkGorbJb4RxU= -github.com/goreleaser/nfpm/v2 v2.35.1 h1:QpDus/yMTwG/IpRxI/hL7VuRII1mzYwbLInsPiWrtaM= -github.com/goreleaser/nfpm/v2 v2.35.1/go.mod h1:KeO5wxOHyU1nPFO5siSfw6Ds5dKyy0E6y89/ypM7+ZI= +github.com/goreleaser/nfpm/v2 v2.35.3 h1:YGEygriY8hbsNdCBUif6RLb5xPISDHc+d22rRGXV4Zk= +github.com/goreleaser/nfpm/v2 v2.35.3/go.mod h1:eyKRLSdXPCV1GgJ0tDNe4SqcZD0Fr5cezRwcuLjpxyM= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -556,7 +538,6 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.7.4 h1:ZQgVdpTdAL7WpMIwLzCfbalOcSUdkDZnpUv3/+BxzFA= github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -603,8 +584,8 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E= +github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -636,7 +617,6 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -666,7 +646,6 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -676,7 +655,6 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/muesli/mango v0.1.0 h1:DZQK45d2gGbql1arsYA4vfg4d7I9Hfx5rX/GCmzsAvI= github.com/muesli/mango v0.1.0/go.mod h1:5XFpbC8jY5UUv89YQciiXNlbi+iJgt29VDC5xbzrLL4= github.com/muesli/mango-cobra v1.2.0 h1:DQvjzAM0PMZr85Iv9LIMaYISpTOliMEg+uMFtNbYvWg= @@ -693,14 +671,14 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= -github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/runc v1.1.12 h1:BOIssBaW1La0/qbNZHXOOa71dZfZEQOzW7dqQf3phss= +github.com/opencontainers/runc v1.1.12/go.mod h1:S+lQwSfncpBha7XTy/5lBwWgm5+y5Ma/O44Ekby9FK8= github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4aNE4= github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -749,25 +727,20 @@ github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUc github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b h1:qYTY2tN72LhgDj2rtWG+LI6TXFl2ygFQQ4YezfVaGQE= -github.com/sasha-s/go-csync v0.0.0-20210812194225-61421b77c44b/go.mod h1:/pA7k3zsXKdjjAiUhB5CjuKib9KJGCaLvZwtxGC8U0s= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sigstore/cosign/v2 v2.2.1 h1:HauwPOMYYaVdQsnvUbF0P+ZsVPrkTB0G7Eq65+z1bQc= github.com/sigstore/cosign/v2 v2.2.1/go.mod h1:4l1hELKWoFYzZ/p7+umrK6dhdBoBW0JbQRCIjOZIM9g= github.com/sigstore/rekor v1.3.3 h1:pLZ0UjutL7SUdeiysmJCabnRqvI7DsIxnJj8c/+e0Fk= @@ -779,11 +752,10 @@ github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.1.1 h1:MTk78x9FPgDFVFkDLTrsnnfCJl7g1C/nnKvePgrIngE= -github.com/skeema/knownhosts v1.1.1/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= +github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/slack-go/slack v0.12.3 h1:92/dfFU8Q5XP6Wp5rr5/T5JHLM5c5Smtn53fhToAP88= github.com/slack-go/slack v0.12.3/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartystreets/assertions v1.13.1 h1:Ef7KhSmjZcK6AVf9YbJdvPYG9avaF0ZxudX+ThRdWfU= @@ -824,7 +796,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM= github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -834,17 +805,14 @@ github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 h1:nrZ3ySNYwJ github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80/go.mod h1:iFyPdL66DjUD96XmzVL3ZntbzcflLnznH0fr99w5VqE= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 h1:+dBg5k7nuTE38VVdoroRsT0Z88fmvdYrI2EjzJst35I= github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1/go.mod h1:nmuySobZb4kFgFy6BptpXp/BBw+xFSyvVPP6auoJB4k= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= -github.com/xanzy/go-gitlab v0.95.2 h1:4p0IirHqEp5f0baK/aQqr4TR57IsD+8e4fuyAA1yi88= -github.com/xanzy/go-gitlab v0.95.2/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= +github.com/xanzy/go-gitlab v0.97.0 h1:StMqJ1Kvt00X43pYIBBjj52dFlghwSeBhRDRfzaZ7xY= +github.com/xanzy/go-gitlab v0.97.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -888,8 +856,8 @@ go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -gocloud.dev v0.35.0 h1:x/Gtt5OJdT4j+ir1AXAIXb7bBnFawXAAaJptCUGk3HU= -gocloud.dev v0.35.0/go.mod h1:wbyF+BhfdtLWyUtVEWRW13hFLb1vXnV2ovEhYGQe3ck= +gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus= +gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -902,15 +870,15 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -990,8 +958,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1001,8 +970,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1017,8 +986,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1032,13 +1001,11 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1069,9 +1036,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1079,15 +1043,19 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1101,6 +1069,7 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1164,8 +1133,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1274,7 +1243,6 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/goreleaser/int/artifact/artifact.go b/goreleaser/int/artifact/artifact.go index 01e262c..e521b50 100644 --- a/goreleaser/int/artifact/artifact.go +++ b/goreleaser/int/artifact/artifact.go @@ -354,6 +354,7 @@ func shouldRelPath(a *Artifact) bool { func (artifacts *Artifacts) Add(a *Artifact) { artifacts.lock.Lock() defer artifacts.lock.Unlock() + a.Name = cleanName(*a) if shouldRelPath(a) { rel, err := relPath(a) if rel != "" && err == nil { @@ -575,3 +576,17 @@ func (artifacts *Artifacts) Visit(fn VisitFn) error { } return nil } + +func cleanName(a Artifact) string { + name := a.Name + ext := filepath.Ext(name) + result := strings.TrimSpace(strings.TrimSuffix(name, ext)) + ext + if name != result { + log.WithField("name", a.Name). + WithField("new name", result). + WithField("type", a.Type). + WithField("path", a.Path). + Warn("removed trailing whitespaces from artifact name") + } + return result +} diff --git a/goreleaser/int/artifact/artifact_test.go b/goreleaser/int/artifact/artifact_test.go index 0fe12e8..5f9f311 100644 --- a/goreleaser/int/artifact/artifact_test.go +++ b/goreleaser/int/artifact/artifact_test.go @@ -23,7 +23,7 @@ func TestAdd(t *testing.T) { wd, _ := os.Getwd() for _, a := range []*Artifact{ { - Name: "foo", + Name: " whitespaces .zip", Type: UploadableArchive, Path: filepath.Join(wd, "/foo/bar.tgz"), }, @@ -31,6 +31,10 @@ func TestAdd(t *testing.T) { Name: "bar", Type: Binary, }, + { + Name: " whitespaces ", + Type: UploadableBinary, + }, { Name: "foobar", Type: DockerImage, @@ -47,9 +51,13 @@ func TestAdd(t *testing.T) { }) } require.NoError(t, g.Wait()) - require.Len(t, artifacts.List(), 4) + require.Len(t, artifacts.List(), 5) archives := artifacts.Filter(ByType(UploadableArchive)).List() require.Len(t, archives, 1) + require.Equal(t, "whitespaces.zip", archives[0].Name) + binaries := artifacts.Filter(ByType(UploadableBinary)).List() + require.Len(t, binaries, 1) + require.Equal(t, "whitespaces", binaries[0].Name) } func TestFilter(t *testing.T) { @@ -933,4 +941,8 @@ func TestArtifactTypeStringer(t *testing.T) { require.NotEqual(t, "unknown", Type(i).String()) }) } + + t.Run("unknown", func(t *testing.T) { + require.Equal(t, "unknown", Type(99999).String()) + }) } diff --git a/goreleaser/int/client/gitea.go b/goreleaser/int/client/gitea.go index 514c75b..bd7c5d6 100644 --- a/goreleaser/int/client/gitea.go +++ b/goreleaser/int/client/gitea.go @@ -96,9 +96,11 @@ func (c *giteaClient) getDefaultBranch(_ *context.Context, repo Repo) (string, e projectID := repo.String() p, res, err := c.client.GetRepo(repo.Owner, repo.Name) if err != nil { - log.WithField("projectID", projectID). - WithField("statusCode", res.StatusCode). - WithError(err). + log := log.WithField("projectID", projectID) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log.WithError(err). Warn("error checking for default branch") return "", err } diff --git a/goreleaser/int/client/github.go b/goreleaser/int/client/github.go index 3df9a8c..a68ef35 100644 --- a/goreleaser/int/client/github.go +++ b/goreleaser/int/client/github.go @@ -132,8 +132,11 @@ func (c *githubClient) getDefaultBranch(ctx *context.Context, repo Repo) (string c.checkRateLimit(ctx) p, res, err := c.client.Repositories.Get(ctx, repo.Owner, repo.Name) if err != nil { - log.WithField("projectID", repo.String()). - WithField("statusCode", res.StatusCode). + log := log.WithField("projectID", repo.String()) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log. WithError(err). Warn("error checking for default branch") return "", err diff --git a/goreleaser/int/client/gitlab.go b/goreleaser/int/client/gitlab.go index 9ba2185..3bb51f8 100644 --- a/goreleaser/int/client/gitlab.go +++ b/goreleaser/int/client/gitlab.go @@ -88,11 +88,11 @@ func (c *gitlabClient) getDefaultBranch(_ *context.Context, repo Repo) (string, projectID := repo.String() p, res, err := c.client.Projects.GetProject(projectID, nil) if err != nil { - log. - WithField("projectID", projectID). - WithField("statusCode", res.StatusCode). - WithError(err). - Warn("error checking for default branch") + log := log.WithField("projectID", projectID) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log.WithError(err).Warn("error checking for default branch") return "", err } return p.DefaultBranch, nil @@ -182,12 +182,14 @@ func (c *gitlabClient) CreateFile( _, res, err := c.client.RepositoryFiles.GetFile(repo.String(), fileName, opts) if err != nil && (res == nil || res.StatusCode != 404) { - log. + log := log. WithField("fileName", fileName). WithField("ref", ref). - WithField("projectID", projectID). - WithField("statusCode", res.StatusCode). - WithError(err). + WithField("projectID", projectID) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log.WithError(err). Error("error getting file for brew formula") return err } @@ -213,12 +215,14 @@ func (c *gitlabClient) CreateFile( } fileInfo, res, err := c.client.RepositoryFiles.CreateFile(projectID, fileName, createOpts) if err != nil { - log. + log := log. WithField("fileName", fileName). WithField("branch", branch). - WithField("projectID", projectID). - WithField("statusCode", res.StatusCode). - WithError(err). + WithField("projectID", projectID) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log.WithError(err). Error("error creating brew formula file") return err } @@ -247,23 +251,27 @@ func (c *gitlabClient) CreateFile( updateFileInfo, res, err := c.client.RepositoryFiles.UpdateFile(projectID, fileName, updateOpts) if err != nil { - log. + log := log. WithField("fileName", fileName). WithField("branch", branch). - WithField("projectID", projectID). - WithField("statusCode", res.StatusCode). - WithError(err). + WithField("projectID", projectID) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log.WithError(err). Error("error updating brew formula file") return err } - log. + log := log. WithField("fileName", fileName). WithField("branch", branch). WithField("projectID", projectID). - WithField("filePath", updateFileInfo.FilePath). - WithField("statusCode", res.StatusCode). - Debug("updated brew formula file") + WithField("filePath", updateFileInfo.FilePath) + if res != nil { + log = log.WithField("statusCode", res.StatusCode) + } + log.Debug("updated brew formula file") return nil } diff --git a/goreleaser/int/exec/exec.go b/goreleaser/int/exec/exec.go index 167b18b..d68f21e 100644 --- a/goreleaser/int/exec/exec.go +++ b/goreleaser/int/exec/exec.go @@ -86,7 +86,6 @@ func executePublisher(ctx *context.Context, publisher config.Publisher) error { func executeCommand(c *command, artifact *artifact.Artifact) error { log.WithField("args", c.Args). - WithField("env", c.Env). WithField("artifact", artifact.Name). Debug("executing command") diff --git a/goreleaser/int/git/config.go b/goreleaser/int/git/config.go index 852d863..b5a7f9b 100644 --- a/goreleaser/int/git/config.go +++ b/goreleaser/int/git/config.go @@ -21,10 +21,30 @@ func ExtractRepoFromConfig(ctx context.Context) (result config.Repo, err error) if err != nil { return result, fmt.Errorf("no remote configured to list refs from") } + // This is a relative remote URL and requires some additional processing + if out == "." { + return extractRelativeRepoFromConfig(ctx) + } log.WithField("rawurl", out).Debugf("got git url") return ExtractRepoFromURL(out) } +func extractRelativeRepoFromConfig(ctx context.Context) (result config.Repo, err error) { + out, err := Clean(Run(ctx, "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}")) + if err != nil || out == "" { + return result, fmt.Errorf("unable to get upstream while qualifying relative remote") + } + out, err = Clean(Run(ctx, "config", "--get", fmt.Sprintf("branch.%s.remote", out))) + if err != nil || out == "" { + return result, fmt.Errorf("unable to get upstream's remote while qualifying relative remote") + } + out, err = Clean(Run(ctx, "ls-remote", "--get-url", out)) + if err != nil { + return result, fmt.Errorf("unable to get upstream while qualifying relative remote") + } + return ExtractRepoFromURL(out) +} + func ExtractRepoFromURL(rawurl string) (config.Repo, error) { // removes the .git suffix and any new lines s := strings.TrimSuffix(strings.TrimSpace(rawurl), ".git") diff --git a/goreleaser/int/git/config_test.go b/goreleaser/int/git/config_test.go index 03ed03e..a8a24e8 100644 --- a/goreleaser/int/git/config_test.go +++ b/goreleaser/int/git/config_test.go @@ -2,6 +2,7 @@ package git_test import ( "context" + "strings" "testing" "github.com/goreleaser/goreleaser/int/git" @@ -22,6 +23,25 @@ func TestNoRemote(t *testing.T) { require.EqualError(t, err, `no remote configured to list refs from`) } +func TestRelativeRemote(t *testing.T) { + ctx := context.Background() + testlib.Mktmp(t) + testlib.GitInit(t) + testlib.GitRemoteAddWithName(t, "upstream", "https://github.com/goreleaser/goreleaser.git") + _, err := git.Run(ctx, "pull", "upstream", "main") + require.NoError(t, err) + _, err = git.Run(ctx, "branch", "--set-upstream-to", "upstream/main") + require.NoError(t, err) + _, err = git.Run(ctx, "checkout", "--track", "-b", "relative_branch") + require.NoError(t, err) + gitCfg, err := git.Run(ctx, "config", "--local", "--list") + require.NoError(t, err) + require.True(t, strings.Contains(gitCfg, "branch.relative_branch.remote=.")) + repo, err := git.ExtractRepoFromConfig(ctx) + require.NoError(t, err) + require.Equal(t, "goreleaser/goreleaser", repo.String()) +} + func TestRepoName(t *testing.T) { testlib.Mktmp(t) testlib.GitInit(t) diff --git a/goreleaser/int/http/http.go b/goreleaser/int/http/http.go index cae2e05..886413f 100644 --- a/goreleaser/int/http/http.go +++ b/goreleaser/int/http/http.go @@ -169,9 +169,9 @@ func Upload(ctx *context.Context, uploads []config.Upload, kind string, check Re // - "binary": Upload only the raw binaries switch v := strings.ToLower(upload.Mode); v { case ModeArchive: - // TODO: should we add source archives here too? filters = append(filters, artifact.ByType(artifact.UploadableArchive), + artifact.ByType(artifact.UploadableSourceArchive), artifact.ByType(artifact.LinuxPackage), ) case ModeBinary: @@ -197,6 +197,9 @@ func Upload(ctx *context.Context, uploads []config.Upload, kind string, check Re func uploadWithFilter(ctx *context.Context, upload *config.Upload, filter artifact.Filter, kind string, check ResponseChecker) error { artifacts := ctx.Artifacts.Filter(filter).List() + if len(artifacts) == 0 { + log.Info("no artifacts found") + } log.Debugf("will upload %d artifacts", len(artifacts)) g := semerrgroup.New(ctx.Parallelism) for _, artifact := range artifacts { @@ -238,15 +241,13 @@ func uploadAsset(ctx *context.Context, upload *config.Upload, artifact *artifact } log.Debugf("generated target url: %s", targetURL) - headers := map[string]string{} - if upload.CustomHeaders != nil { - for name, value := range upload.CustomHeaders { - resolvedValue, err := tmpl.New(ctx).WithArtifact(artifact).Apply(value) - if err != nil { - return fmt.Errorf("%s: %s: failed to resolve custom_headers template: %w", upload.Name, kind, err) - } - headers[name] = resolvedValue + headers := make(map[string]string, len(upload.CustomHeaders)) + for name, value := range upload.CustomHeaders { + resolvedValue, err := tmpl.New(ctx).WithArtifact(artifact).Apply(value) + if err != nil { + return fmt.Errorf("%s: %s: failed to resolve custom_headers template: %w", upload.Name, kind, err) } + headers[name] = resolvedValue } if upload.ChecksumHeader != "" { sum, err := artifact.Checksum("sha256") diff --git a/goreleaser/int/http/http_test.go b/goreleaser/int/http/http_test.go index c7d35bb..d753f7e 100644 --- a/goreleaser/int/http/http_test.go +++ b/goreleaser/int/http/http_test.go @@ -243,6 +243,7 @@ func TestUpload(t *testing.T) { {"deb", artifact.LinuxPackage}, {"bin", artifact.Binary}, {"tar", artifact.UploadableArchive}, + {"tar.gz", artifact.UploadableSourceArchive}, {"ubi", artifact.UploadableBinary}, {"sum", artifact.Checksum}, {"sig", artifact.Signature}, @@ -298,6 +299,7 @@ func TestUpload(t *testing.T) { checks( check{"/blah/2.1.0/a.deb", "u2", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.tar", "u2", "x", content, map[string]string{}}, + check{"/blah/2.1.0/a.tar.gz", "u2", "x", content, map[string]string{}}, ), }, { @@ -315,6 +317,7 @@ func TestUpload(t *testing.T) { checks( check{"/blah/2.1.0/a.deb", "u1", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.tar", "u1", "x", content, map[string]string{}}, + check{"/blah/2.1.0/a.tar.gz", "u1", "x", content, map[string]string{}}, ), }, { @@ -331,6 +334,7 @@ func TestUpload(t *testing.T) { checks( check{"/blah/2.1.0/a.deb", "u1", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.tar", "u1", "x", content, map[string]string{}}, + check{"/blah/2.1.0/a.tar.gz", "u1", "x", content, map[string]string{}}, ), }, { @@ -347,6 +351,7 @@ func TestUpload(t *testing.T) { checks( check{"/blah/2.1.0/linux/amd64/a.deb", "u1", "x", content, map[string]string{}}, check{"/blah/2.1.0/linux/amd64/a.tar", "u1", "x", content, map[string]string{}}, + check{"/blah/2.1.0/linux/amd64/a.tar.gz", "u1", "x", content, map[string]string{}}, ), }, { @@ -364,6 +369,7 @@ func TestUpload(t *testing.T) { checks( check{"/blah/2.1.0/a.deb", "u1", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.tar", "u1", "x", content, map[string]string{}}, + check{"/blah/2.1.0/a.tar.gz", "u1", "x", content, map[string]string{}}, ), }, { @@ -435,6 +441,7 @@ func TestUpload(t *testing.T) { checks( check{"/blah/2.1.0/a.deb", "u3", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.tar", "u3", "x", content, map[string]string{}}, + check{"/blah/2.1.0/a.tar.gz", "u3", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.sum", "u3", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.sig", "u3", "x", content, map[string]string{}}, check{"/blah/2.1.0/a.pem", "u3", "x", content, map[string]string{}}, diff --git a/goreleaser/int/pipe/archive/archive_test.go b/goreleaser/int/pipe/archive/archive_test.go index 2bc9800..3e5b6a4 100644 --- a/goreleaser/int/pipe/archive/archive_test.go +++ b/goreleaser/int/pipe/archive/archive_test.go @@ -549,6 +549,52 @@ func TestRunPipeInvalidGlob(t *testing.T) { require.EqualError(t, Pipe{}.Run(ctx), `failed to find files to archive: globbing failed for pattern [x-]: compile glob pattern: unexpected end of input`) } +func TestRunPipeNameTemplateWithSpace(t *testing.T) { + folder := testlib.Mktmp(t) + dist := filepath.Join(folder, "dist") + require.NoError(t, os.Mkdir(dist, 0o755)) + require.NoError(t, os.Mkdir(filepath.Join(dist, "darwinamd64"), 0o755)) + f, err := os.Create(filepath.Join(dist, "darwinamd64", "mybin")) + require.NoError(t, err) + require.NoError(t, f.Close()) + ctx := testctx.NewWithCfg( + config.Project{ + Dist: dist, + Archives: []config.Archive{ + { + Builds: []string{"default"}, + NameTemplate: " foo_{{.Os}}_{{.Arch}} ", + Format: "zip", + }, + { + Builds: []string{"default"}, + NameTemplate: " foo_{{.Os}}_{{.Arch}} ", + Format: "binary", + }, + }, + }, + testctx.WithCurrentTag("v0.0.1"), + ) + ctx.Artifacts.Add(&artifact.Artifact{ + Goos: "darwin", + Goarch: "amd64", + Name: "mybin", + Path: filepath.Join("dist", "darwinamd64", "mybin"), + Type: artifact.Binary, + Extra: map[string]interface{}{ + artifact.ExtraBinary: "mybin", + artifact.ExtraID: "default", + }, + }) + require.NoError(t, Pipe{}.Run(ctx)) + list := ctx.Artifacts.Filter(artifact.ByType(artifact.UploadableBinary)).List() + require.Len(t, list, 1) + require.Equal(t, "foo_darwin_amd64", list[0].Name) + list = ctx.Artifacts.Filter(artifact.ByType(artifact.UploadableArchive)).List() + require.Len(t, list, 1) + require.Equal(t, "foo_darwin_amd64.zip", list[0].Name) +} + func TestRunPipeInvalidNameTemplate(t *testing.T) { folder := testlib.Mktmp(t) dist := filepath.Join(folder, "dist") diff --git a/goreleaser/int/pipe/blob/blob.go b/goreleaser/int/pipe/blob/blob.go index b879bdd..9a5811d 100644 --- a/goreleaser/int/pipe/blob/blob.go +++ b/goreleaser/int/pipe/blob/blob.go @@ -4,6 +4,7 @@ package blob import ( "fmt" + "github.com/goreleaser/goreleaser/int/deprecate" "github.com/goreleaser/goreleaser/int/pipe" "github.com/goreleaser/goreleaser/int/semerrgroup" "github.com/goreleaser/goreleaser/int/tmpl" @@ -28,6 +29,17 @@ func (Pipe) Default(ctx *context.Context) error { if blob.Folder == "" { blob.Folder = "{{ .ProjectName }}/{{ .Tag }}" } + if blob.ContentDisposition == "" { + blob.ContentDisposition = "attachment;filename={{.Filename}}" + } + if blob.OldDisableSSL { + deprecate.Notice(ctx, "blobs.disableSSL") + blob.DisableSSL = true + } + if blob.OldKMSKey != "" { + deprecate.Notice(ctx, "blobs.kmskey") + blob.KMSKey = blob.OldKMSKey + } } return nil } diff --git a/goreleaser/int/pipe/blob/blob_minio_test.go b/goreleaser/int/pipe/blob/blob_minio_test.go index 718ac1b..0d4007b 100644 --- a/goreleaser/int/pipe/blob/blob_minio_test.go +++ b/goreleaser/int/pipe/blob/blob_minio_test.go @@ -86,11 +86,13 @@ func TestMinioUpload(t *testing.T) { ProjectName: "testupload", Blobs: []config.Blob{ { - Provider: "s3", - Bucket: name, - Region: "us-east", - Endpoint: "http://" + listen, - IDs: []string{"foo", "bar"}, + Provider: "s3", + Bucket: name, + Region: "us-east", + Endpoint: "http://" + listen, + IDs: []string{"foo", "bar"}, + CacheControl: []string{"max-age=9999"}, + ContentDisposition: "inline", ExtraFiles: []config.ExtraFile{ { Glob: "./testdata/*.golden", diff --git a/goreleaser/int/pipe/blob/blob_test.go b/goreleaser/int/pipe/blob/blob_test.go index 4e857dd..bee46a3 100644 --- a/goreleaser/int/pipe/blob/blob_test.go +++ b/goreleaser/int/pipe/blob/blob_test.go @@ -69,28 +69,48 @@ func TestDefaults(t *testing.T) { ctx := testctx.NewWithCfg(config.Project{ Blobs: []config.Blob{ { - Bucket: "foo", - Provider: "azblob", - IDs: []string{"foo", "bar"}, + Bucket: "foo", + Provider: "azblob", + IDs: []string{"foo", "bar"}, + ContentDisposition: "inline", }, { Bucket: "foobar", Provider: "gcs", }, + { + Bucket: "deprecated", + Provider: "s3", + Folder: "static", + OldDisableSSL: true, + OldKMSKey: "fake", + }, }, }) require.NoError(t, Pipe{}.Default(ctx)) require.Equal(t, []config.Blob{ { - Bucket: "foo", - Provider: "azblob", - Folder: "{{ .ProjectName }}/{{ .Tag }}", - IDs: []string{"foo", "bar"}, + Bucket: "foo", + Provider: "azblob", + Folder: "{{ .ProjectName }}/{{ .Tag }}", + IDs: []string{"foo", "bar"}, + ContentDisposition: "inline", + }, + { + Bucket: "foobar", + Provider: "gcs", + Folder: "{{ .ProjectName }}/{{ .Tag }}", + ContentDisposition: "attachment;filename={{.Filename}}", }, { - Bucket: "foobar", - Provider: "gcs", - Folder: "{{ .ProjectName }}/{{ .Tag }}", + Bucket: "deprecated", + Provider: "s3", + Folder: "static", + OldDisableSSL: true, + DisableSSL: true, + OldKMSKey: "fake", + KMSKey: "fake", + ContentDisposition: "attachment;filename={{.Filename}}", }, }, ctx.Config.Blobs) } diff --git a/goreleaser/int/pipe/blob/upload.go b/goreleaser/int/pipe/blob/upload.go index 4e5acb2..d03ba92 100644 --- a/goreleaser/int/pipe/blob/upload.go +++ b/goreleaser/int/pipe/blob/upload.go @@ -8,6 +8,8 @@ import ( "path" "strings" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/caarlos0/log" "github.com/goreleaser/goreleaser/int/artifact" "github.com/goreleaser/goreleaser/int/extrafiles" @@ -53,7 +55,11 @@ func urlFor(ctx *context.Context, conf config.Blob) (string, error) { } if endpoint != "" { query.Add("endpoint", endpoint) - query.Add("s3ForcePathStyle", "true") + if conf.S3ForcePathStyle == nil { + query.Add("s3ForcePathStyle", "true") + } else { + query.Add("s3ForcePathStyle", fmt.Sprintf("%t", *conf.S3ForcePathStyle)) + } } region, err := tmpl.New(ctx).Apply(conf.Region) @@ -104,7 +110,21 @@ func doUpload(ctx *context.Context, conf config.Blob) error { filter = artifact.And(filter, artifact.ByIDs(conf.IDs...)) } - up := &productionUploader{} + up := &productionUploader{ + cacheControl: conf.CacheControl, + contentDisposition: conf.ContentDisposition, + } + if conf.Provider == "s3" && conf.ACL != "" { + up.beforeWrite = func(asFunc func(interface{}) bool) error { + req := &s3manager.UploadInput{} + if !asFunc(&req) { + return fmt.Errorf("could not apply before write") + } + req.ACL = aws.String(conf.ACL) + return nil + } + } + if err := up.Open(ctx, bucketURL); err != nil { return handleError(err, bucketURL) } @@ -210,7 +230,10 @@ type uploader interface { // productionUploader actually do upload to. type productionUploader struct { - bucket *blob.Bucket + bucket *blob.Bucket + beforeWrite func(asFunc func(interface{}) bool) error + cacheControl []string + contentDisposition string } func (u *productionUploader) Close() error { @@ -234,8 +257,17 @@ func (u *productionUploader) Open(ctx *context.Context, bucket string) error { func (u *productionUploader) Upload(ctx *context.Context, filepath string, data []byte) error { log.WithField("path", filepath).Info("uploading") + disp, err := tmpl.New(ctx).WithExtraFields(tmpl.Fields{ + "Filename": path.Base(filepath), + }).Apply(u.contentDisposition) + if err != nil { + return err + } + opts := &blob.WriterOptions{ - ContentDisposition: "attachment; filename=" + path.Base(filepath), + ContentDisposition: disp, + BeforeWrite: u.beforeWrite, + CacheControl: strings.Join(u.cacheControl, ", "), } w, err := u.bucket.NewWriter(ctx, filepath, opts) if err != nil { diff --git a/goreleaser/int/pipe/brew/brew.go b/goreleaser/int/pipe/brew/brew.go index 80269b6..c255e51 100644 --- a/goreleaser/int/pipe/brew/brew.go +++ b/goreleaser/int/pipe/brew/brew.go @@ -296,9 +296,21 @@ func buildFormula(ctx *context.Context, brew config.Homebrew, client client.Rele } func doBuildFormula(ctx *context.Context, data templateData) (string, error) { - t, err := template. - New(data.Name). - Parse(formulaTemplate) + t := template.New("cask.rb") + var err error + t, err = t.Funcs(map[string]any{ + "include": func(name string, data interface{}) (string, error) { + buf := bytes.NewBuffer(nil) + if err := t.ExecuteTemplate(buf, name, data); err != nil { + return "", err + } + return buf.String(), nil + }, + "indent": func(spaces int, v string) string { + pad := strings.Repeat(" ", spaces) + return pad + strings.ReplaceAll(v, "\n", "\n"+pad) + }, + }).ParseFS(formulaTemplate, "templates/*.rb") if err != nil { return "", err } diff --git a/goreleaser/int/pipe/brew/template.go b/goreleaser/int/pipe/brew/template.go index 0e41847..1ba2db2 100644 --- a/goreleaser/int/pipe/brew/template.go +++ b/goreleaser/int/pipe/brew/template.go @@ -1,6 +1,10 @@ package brew -import "github.com/goreleaser/goreleaser/pkg/config" +import ( + "embed" + + "github.com/goreleaser/goreleaser/pkg/config" +) type templateData struct { Name string @@ -31,178 +35,5 @@ type releasePackage struct { Install []string } -const formulaTemplate = `# typed: false -# frozen_string_literal: true - -# This file was generated by GoReleaser. DO NOT EDIT. -{{ if .CustomRequire -}} -require_relative "{{ .CustomRequire }}" -{{ end -}} -class {{ .Name }} < Formula - desc "{{ .Desc }}" - homepage "{{ .Homepage }}" - version "{{ .Version }}" - {{- if .License }} - license "{{ .License }}" - {{- end }} - {{- with .Dependencies }} - {{ range $index, $element := . }} - depends_on "{{ .Name }}" - {{- if .Type }} => :{{ .Type }}{{- else if .Version }} => "{{ .Version }}"{{- end }} - {{- with .OS }} if OS.{{ . }}?{{- end }} - {{- end }} - {{- end -}} - - {{- if and (not .LinuxPackages) .MacOSPackages }} - depends_on :macos - {{- end }} - {{- if and (not .MacOSPackages) .LinuxPackages }} - depends_on :linux - {{- end }} - {{- printf "\n" }} - - {{- if .MacOSPackages }} - on_macos do - {{- range $element := .MacOSPackages }} - {{- if eq $element.Arch "all" }} - url "{{ $element.DownloadURL }}" - {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} - sha256 "{{ $element.SHA256 }}" - - def install - {{- range $index, $element := .Install }} - {{ . -}} - {{- end }} - end - {{- else if $.HasOnlyAmd64MacOsPkg }} - url "{{ $element.DownloadURL }}" - {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} - sha256 "{{ $element.SHA256 }}" - - def install - {{- range $index, $element := .Install }} - {{ . -}} - {{- end }} - end - - if Hardware::CPU.arm? - def caveats - <<~EOS - The darwin_arm64 architecture is not supported for the {{ $.Name }} - formula at this time. The darwin_amd64 binary may work in compatibility - mode, but it might not be fully supported. - EOS - end - end - {{- else }} - {{- if eq $element.Arch "amd64" }} - if Hardware::CPU.intel? - {{- end }} - {{- if eq $element.Arch "arm64" }} - if Hardware::CPU.arm? - {{- end}} - url "{{ $element.DownloadURL }}" - {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} - sha256 "{{ $element.SHA256 }}" - - def install - {{- range $index, $element := .Install }} - {{ . -}} - {{- end }} - end - end - {{- end }} - {{- end }} - end - {{- end }} - - {{- if and .MacOSPackages .LinuxPackages }}{{ printf "\n" }}{{ end }} - - {{- if .LinuxPackages }} - on_linux do - {{- range $element := .LinuxPackages }} - {{- if eq $element.Arch "amd64" }} - if Hardware::CPU.intel? - {{- end }} - {{- if eq $element.Arch "arm" }} - if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - {{- end }} - {{- if eq $element.Arch "arm64" }} - if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - {{- end }} - url "{{ $element.DownloadURL }}" - {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} - sha256 "{{ $element.SHA256 }}" - - def install - {{- range $index, $element := .Install }} - {{ . -}} - {{- end }} - end - end - {{- end }} - end - {{- end }} - - {{- with .Conflicts }} - {{ range $index, $element := . }} - conflicts_with "{{ . }}" - {{- end }} - {{- end }} - - {{- with .CustomBlock }} - {{ range $index, $element := . }} - {{ . }} - {{- end }} - {{- end }} - - {{- with .PostInstall }} - - def post_install - {{- range . }} - {{ . }} - {{- end }} - end - {{- end -}} - - {{- with .Caveats }} - - def caveats - <<~EOS - {{- range $index, $element := . }} - {{ . -}} - {{- end }} - EOS - end - {{- end -}} - - {{- with .Plist }} - - plist_options startup: false - - def plist - <<~EOS - {{ . }} - EOS - end - {{- end -}} - - {{- with .Service }} - - service do - {{- range . }} - {{ . }} - {{- end }} - end - {{- end -}} - - {{- if .Tests }} - - test do - {{- range $index, $element := .Tests }} - {{ . -}} - {{- end }} - end - {{- end }} -end -` +//go:embed templates +var formulaTemplate embed.FS diff --git a/goreleaser/int/pipe/brew/templates/cask.rb b/goreleaser/int/pipe/brew/templates/cask.rb new file mode 100644 index 0000000..2b7808d --- /dev/null +++ b/goreleaser/int/pipe/brew/templates/cask.rb @@ -0,0 +1,109 @@ +# typed: false +# frozen_string_literal: true + +# This file was generated by GoReleaser. DO NOT EDIT. +{{ if .CustomRequire -}} +require_relative "{{ .CustomRequire }}" +{{ end -}} +class {{ .Name }} < Formula + desc "{{ .Desc }}" + homepage "{{ .Homepage }}" + version "{{ .Version }}" + {{- if .License }} + license "{{ .License }}" + {{- end }} + {{- with .Dependencies }} + {{ range $index, $element := . }} + depends_on "{{ .Name }}" + {{- if .Type }} => :{{ .Type }}{{- else if .Version }} => "{{ .Version }}"{{- end }} + {{- with .OS }} if OS.{{ . }}?{{- end }} + {{- end }} + {{- end -}} + + {{- if and (not .LinuxPackages) .MacOSPackages }} + depends_on :macos + {{- end }} + {{- if and (not .MacOSPackages) .LinuxPackages }} + depends_on :linux + {{- end }} + {{- printf "\n" }} + + {{- if and .MacOSPackages .LinuxPackages }} + on_macos do + {{- include "macos_packages" . | indent 2 }} + end + + on_linux do + {{- include "linux_packages" . | indent 2 }} + end + {{- end }} + + {{- if and (.MacOSPackages) (not .LinuxPackages) }} + {{- template "macos_packages" . }} + {{- end }} + + {{- if and (not .MacOSPackages) (.LinuxPackages) }} + {{- template "linux_packages" . }} + {{- end }} + + {{- with .Conflicts }} + {{ range $index, $element := . }} + conflicts_with "{{ . }}" + {{- end }} + {{- end }} + + {{- with .CustomBlock }} + {{ range $index, $element := . }} + {{ . }} + {{- end }} + {{- end }} + + {{- with .PostInstall }} + + def post_install + {{- range . }} + {{ . }} + {{- end }} + end + {{- end -}} + + {{- with .Caveats }} + + def caveats + <<~EOS + {{- range $index, $element := . }} + {{ . -}} + {{- end }} + EOS + end + {{- end -}} + + {{- with .Plist }} + + plist_options startup: false + + def plist + <<~EOS + {{ . }} + EOS + end + {{- end -}} + + {{- with .Service }} + + service do + {{- range . }} + {{ . }} + {{- end }} + end + {{- end -}} + + {{- if .Tests }} + + test do + {{- range $index, $element := .Tests }} + {{ . -}} + {{- end }} + end + {{- end }} +end diff --git a/goreleaser/int/pipe/brew/templates/linux_packages.rb b/goreleaser/int/pipe/brew/templates/linux_packages.rb new file mode 100644 index 0000000..8e86cea --- /dev/null +++ b/goreleaser/int/pipe/brew/templates/linux_packages.rb @@ -0,0 +1,23 @@ +{{- define "linux_packages" }} +{{- range $element := .LinuxPackages }} + {{- if eq $element.Arch "amd64" }} + if Hardware::CPU.intel? + {{- end }} + {{- if eq $element.Arch "arm" }} + if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? + {{- end }} + {{- if eq $element.Arch "arm64" }} + if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + {{- end }} + url "{{ $element.DownloadURL }}" + {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} + sha256 "{{ $element.SHA256 }}" + + def install + {{- range $index, $element := .Install }} + {{ . -}} + {{- end }} + end + end +{{- end }} +{{- end }} diff --git a/goreleaser/int/pipe/brew/templates/macos_packages.rb b/goreleaser/int/pipe/brew/templates/macos_packages.rb new file mode 100644 index 0000000..f4bcb4f --- /dev/null +++ b/goreleaser/int/pipe/brew/templates/macos_packages.rb @@ -0,0 +1,52 @@ +{{- define "macos_packages" }} +{{- range $element := .MacOSPackages }} + {{- if eq $element.Arch "all" }} + url "{{ $element.DownloadURL }}" + {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} + sha256 "{{ $element.SHA256 }}" + + def install + {{- range $index, $element := .Install }} + {{ . -}} + {{- end }} + end + {{- else if $.HasOnlyAmd64MacOsPkg }} + url "{{ $element.DownloadURL }}" + {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} + sha256 "{{ $element.SHA256 }}" + + def install + {{- range $index, $element := .Install }} + {{ . -}} + {{- end }} + end + + if Hardware::CPU.arm? + def caveats + <<~EOS + The darwin_arm64 architecture is not supported for the {{ $.Name }} + formula at this time. The darwin_amd64 binary may work in compatibility + mode, but it might not be fully supported. + EOS + end + end + {{- else }} + {{- if eq $element.Arch "amd64" }} + if Hardware::CPU.intel? + {{- end }} + {{- if eq $element.Arch "arm64" }} + if Hardware::CPU.arm? + {{- end}} + url "{{ $element.DownloadURL }}" + {{- if .DownloadStrategy }}, using: {{ .DownloadStrategy }}{{- end }} + sha256 "{{ $element.SHA256 }}" + + def install + {{- range $index, $element := .Install }} + {{ . -}} + {{- end }} + end + end + {{- end }} +{{- end }} +{{- end }} diff --git a/goreleaser/int/pipe/brew/testdata/TestFullFormulaeLinuxOnly.rb.golden b/goreleaser/int/pipe/brew/testdata/TestFullFormulaeLinuxOnly.rb.golden index db3a652..a1e17af 100644 --- a/goreleaser/int/pipe/brew/testdata/TestFullFormulaeLinuxOnly.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestFullFormulaeLinuxOnly.rb.golden @@ -8,30 +8,28 @@ class Test < Formula version "0.1.3" depends_on :linux - on_linux do - if Hardware::CPU.intel? - url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Linux_x86_64.tar.gz" - sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67" + if Hardware::CPU.intel? + url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Linux_x86_64.tar.gz" + sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67" - def install - bin.install "test" - end + def install + bin.install "test" end - if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Arm6.tar.gz" - sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67" + end + if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? + url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Arm6.tar.gz" + sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67" - def install - bin.install "test" - end + def install + bin.install "test" end - if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Arm64.tar.gz" - sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67" + end + if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? + url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Arm64.tar.gz" + sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c67" - def install - bin.install "test" - end + def install + bin.install "test" end end end diff --git a/goreleaser/int/pipe/brew/testdata/TestFullFormulaeMacOSOnly.rb.golden b/goreleaser/int/pipe/brew/testdata/TestFullFormulaeMacOSOnly.rb.golden index e5537ba..2d6ae1e 100644 --- a/goreleaser/int/pipe/brew/testdata/TestFullFormulaeMacOSOnly.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestFullFormulaeMacOSOnly.rb.golden @@ -8,22 +8,20 @@ class Test < Formula version "0.1.3" depends_on :macos - on_macos do - if Hardware::CPU.intel? - url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz" - sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68" + if Hardware::CPU.intel? + url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_x86_64.tar.gz" + sha256 "1633f61598ab0791e213135923624eb342196b3494909c91899bcd0560f84c68" - def install - bin.install "test" - end + def install + bin.install "test" end - if Hardware::CPU.arm? - url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz" - sha256 "1df5fdc2bad4ed4c28fbdc77b6c542988c0dc0e2ae34e0dc912bbb1c66646c58" + end + if Hardware::CPU.arm? + url "https://github.com/caarlos0/test/releases/download/v0.1.3/test_Darwin_arm64.tar.gz" + sha256 "1df5fdc2bad4ed4c28fbdc77b6c542988c0dc0e2ae34e0dc912bbb1c66646c58" - def install - bin.install "test" - end + def install + bin.install "test" end end end diff --git a/goreleaser/int/pipe/brew/testdata/TestRunPipeBinaryRelease.rb.golden b/goreleaser/int/pipe/brew/testdata/TestRunPipeBinaryRelease.rb.golden index e192158..e427ba1 100644 --- a/goreleaser/int/pipe/brew/testdata/TestRunPipeBinaryRelease.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestRunPipeBinaryRelease.rb.golden @@ -8,13 +8,11 @@ class Foo < Formula version "1.2.1" depends_on :macos - on_macos do - url "https://dummyhost/download/v1.2.1/foo_macos" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + url "https://dummyhost/download/v1.2.1/foo_macos" + sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - def install - bin.install "foo_macos" => "foo" - man1.install "./man/foo.1.gz" - end + def install + bin.install "foo_macos" => "foo" + man1.install "./man/foo.1.gz" end end diff --git a/goreleaser/int/pipe/brew/testdata/TestRunPipeNameTemplate.rb.golden b/goreleaser/int/pipe/brew/testdata/TestRunPipeNameTemplate.rb.golden index 8d43aaf..be92de1 100644 --- a/goreleaser/int/pipe/brew/testdata/TestRunPipeNameTemplate.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestRunPipeNameTemplate.rb.golden @@ -8,22 +8,20 @@ class FooIsBar < Formula version "1.0.1" depends_on :macos - on_macos do - url "https://dummyhost/download/v1.0.1/bin.tar.gz" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + url "https://dummyhost/download/v1.0.1/bin.tar.gz" + sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - def install - bin.install "foo" - end + def install + bin.install "foo" + end - if Hardware::CPU.arm? - def caveats - <<~EOS - The darwin_arm64 architecture is not supported for the FooIsBar - formula at this time. The darwin_amd64 binary may work in compatibility - mode, but it might not be fully supported. - EOS - end + if Hardware::CPU.arm? + def caveats + <<~EOS + The darwin_arm64 architecture is not supported for the FooIsBar + formula at this time. The darwin_amd64 binary may work in compatibility + mode, but it might not be fully supported. + EOS end end end diff --git a/goreleaser/int/pipe/brew/testdata/TestRunPipePullRequest.rb.golden b/goreleaser/int/pipe/brew/testdata/TestRunPipePullRequest.rb.golden index e192158..e427ba1 100644 --- a/goreleaser/int/pipe/brew/testdata/TestRunPipePullRequest.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestRunPipePullRequest.rb.golden @@ -8,13 +8,11 @@ class Foo < Formula version "1.2.1" depends_on :macos - on_macos do - url "https://dummyhost/download/v1.2.1/foo_macos" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + url "https://dummyhost/download/v1.2.1/foo_macos" + sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - def install - bin.install "foo_macos" => "foo" - man1.install "./man/foo.1.gz" - end + def install + bin.install "foo_macos" => "foo" + man1.install "./man/foo.1.gz" end end diff --git a/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinary.rb.golden b/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinary.rb.golden index 3a599fc..0722da5 100644 --- a/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinary.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinary.rb.golden @@ -8,12 +8,10 @@ class Unibin < Formula version "1.0.1" depends_on :macos - on_macos do - url "https://dummyhost/download/v1.0.1/bin.tar.gz" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + url "https://dummyhost/download/v1.0.1/bin.tar.gz" + sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - def install - bin.install "unibin" - end + def install + bin.install "unibin" end end diff --git a/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinaryNotReplacing.rb.golden b/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinaryNotReplacing.rb.golden index f17ace7..8f6f8f4 100644 --- a/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinaryNotReplacing.rb.golden +++ b/goreleaser/int/pipe/brew/testdata/TestRunPipeUniversalBinaryNotReplacing.rb.golden @@ -8,22 +8,20 @@ class Unibin < Formula version "1.0.1" depends_on :macos - on_macos do - if Hardware::CPU.intel? - url "https://dummyhost/download/v1.0.1/bin_amd64.tar.gz" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + if Hardware::CPU.intel? + url "https://dummyhost/download/v1.0.1/bin_amd64.tar.gz" + sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - def install - bin.install "unibin" - end + def install + bin.install "unibin" end - if Hardware::CPU.arm? - url "https://dummyhost/download/v1.0.1/bin_arm64.tar.gz" - sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + end + if Hardware::CPU.arm? + url "https://dummyhost/download/v1.0.1/bin_arm64.tar.gz" + sha256 "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" - def install - bin.install "unibin" - end + def install + bin.install "unibin" end end end diff --git a/goreleaser/int/pipe/changelog/changelog.go b/goreleaser/int/pipe/changelog/changelog.go index ffaf1b7..e5f0f22 100644 --- a/goreleaser/int/pipe/changelog/changelog.go +++ b/goreleaser/int/pipe/changelog/changelog.go @@ -12,6 +12,7 @@ import ( "github.com/caarlos0/log" "github.com/goreleaser/goreleaser/int/client" + "github.com/goreleaser/goreleaser/int/deprecate" "github.com/goreleaser/goreleaser/int/git" "github.com/goreleaser/goreleaser/int/tmpl" "github.com/goreleaser/goreleaser/pkg/context" @@ -43,7 +44,12 @@ func (Pipe) Skip(ctx *context.Context) (bool, error) { if ctx.Snapshot { return true, nil } - return tmpl.New(ctx).Bool(ctx.Config.Changelog.Skip) + if ctx.Config.Changelog.Skip != "" { + deprecate.Notice(ctx, "changelog.skip") + ctx.Config.Changelog.Disable = ctx.Config.Changelog.Skip + } + + return tmpl.New(ctx).Bool(ctx.Config.Changelog.Disable) } // Run the pipe. diff --git a/goreleaser/int/pipe/changelog/changelog_test.go b/goreleaser/int/pipe/changelog/changelog_test.go index d8ad73e..73549a0 100644 --- a/goreleaser/int/pipe/changelog/changelog_test.go +++ b/goreleaser/int/pipe/changelog/changelog_test.go @@ -682,7 +682,7 @@ func TestSkip(t *testing.T) { require.True(t, b) }) - t.Run("skip on patches", func(t *testing.T) { + t.Run("skip/disable", func(t *testing.T) { ctx := testctx.NewWithCfg(config.Project{ Changelog: config.Changelog{ Skip: "{{gt .Patch 0}}", @@ -691,12 +691,24 @@ func TestSkip(t *testing.T) { b, err := Pipe{}.Skip(ctx) require.NoError(t, err) require.True(t, b) + require.Equal(t, ctx.Config.Changelog.Skip, ctx.Config.Changelog.Disable) + }) + + t.Run("disable on patches", func(t *testing.T) { + ctx := testctx.NewWithCfg(config.Project{ + Changelog: config.Changelog{ + Disable: "{{gt .Patch 0}}", + }, + }, testctx.WithSemver(0, 0, 1, "")) + b, err := Pipe{}.Skip(ctx) + require.NoError(t, err) + require.True(t, b) }) t.Run("invalid template", func(t *testing.T) { ctx := testctx.NewWithCfg(config.Project{ Changelog: config.Changelog{ - Skip: "{{if eq .Patch 123}", + Disable: "{{if eq .Patch 123}", }, }, testctx.WithSemver(0, 0, 1, "")) _, err := Pipe{}.Skip(ctx) @@ -712,7 +724,7 @@ func TestSkip(t *testing.T) { t.Run("dont skip based on template", func(t *testing.T) { ctx := testctx.NewWithCfg(config.Project{ Changelog: config.Changelog{ - Skip: "{{gt .Patch 0}}", + Disable: "{{gt .Patch 0}}", }, }) b, err := Pipe{}.Skip(ctx) diff --git a/goreleaser/int/pipe/chocolatey/chocolatey.go b/goreleaser/int/pipe/chocolatey/chocolatey.go index 081efa0..b2ce90f 100644 --- a/goreleaser/int/pipe/chocolatey/chocolatey.go +++ b/goreleaser/int/pipe/chocolatey/chocolatey.go @@ -12,6 +12,7 @@ import ( "github.com/caarlos0/log" "github.com/goreleaser/goreleaser/int/artifact" "github.com/goreleaser/goreleaser/int/client" + "github.com/goreleaser/goreleaser/int/skips" "github.com/goreleaser/goreleaser/int/tmpl" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" @@ -31,9 +32,11 @@ var cmd cmder = stdCmd{} // Pipe for chocolatey packaging. type Pipe struct{} -func (Pipe) String() string { return "chocolatey packages" } -func (Pipe) ContinueOnError() bool { return true } -func (Pipe) Skip(ctx *context.Context) bool { return len(ctx.Config.Chocolateys) == 0 } +func (Pipe) String() string { return "chocolatey packages" } +func (Pipe) ContinueOnError() bool { return true } +func (Pipe) Skip(ctx *context.Context) bool { + return skips.Any(ctx, skips.Chocolatey) || len(ctx.Config.Chocolateys) == 0 +} func (Pipe) Dependencies(_ *context.Context) []string { return []string{"choco"} } // Default sets the pipe defaults. diff --git a/goreleaser/int/pipe/chocolatey/chocolatey_test.go b/goreleaser/int/pipe/chocolatey/chocolatey_test.go index 22c1cd4..464062f 100644 --- a/goreleaser/int/pipe/chocolatey/chocolatey_test.go +++ b/goreleaser/int/pipe/chocolatey/chocolatey_test.go @@ -9,6 +9,7 @@ import ( "github.com/goreleaser/goreleaser/int/artifact" "github.com/goreleaser/goreleaser/int/client" "github.com/goreleaser/goreleaser/int/golden" + "github.com/goreleaser/goreleaser/int/skips" "github.com/goreleaser/goreleaser/int/testctx" "github.com/goreleaser/goreleaser/int/testlib" "github.com/goreleaser/goreleaser/pkg/config" @@ -25,8 +26,26 @@ func TestDescription(t *testing.T) { } func TestSkip(t *testing.T) { - ctx := testctx.New() - require.True(t, Pipe{}.Skip(ctx)) + t.Run("skip", func(t *testing.T) { + require.True(t, Pipe{}.Skip(testctx.New())) + }) + t.Run("skip flag", func(t *testing.T) { + ctx := testctx.NewWithCfg(config.Project{ + Chocolateys: []config.Chocolatey{ + {}, + }, + }, testctx.Skip(skips.Chocolatey)) + require.True(t, Pipe{}.Skip(ctx)) + }) + + t.Run("dont skip", func(t *testing.T) { + ctx := testctx.NewWithCfg(config.Project{ + Chocolateys: []config.Chocolatey{ + {}, + }, + }) + require.False(t, Pipe{}.Skip(ctx)) + }) } func TestDefault(t *testing.T) { diff --git a/goreleaser/int/pipe/discord/discord.go b/goreleaser/int/pipe/discord/discord.go index 60d0b1c..daf5d82 100644 --- a/goreleaser/int/pipe/discord/discord.go +++ b/goreleaser/int/pipe/discord/discord.go @@ -1,14 +1,15 @@ package discord import ( + "bytes" + "encoding/json" "fmt" + "net/http" + "net/url" "strconv" "github.com/caarlos0/env/v9" "github.com/caarlos0/log" - "github.com/disgoorg/disgo/discord" - "github.com/disgoorg/disgo/webhook" - "github.com/disgoorg/snowflake/v2" "github.com/goreleaser/goreleaser/int/tmpl" "github.com/goreleaser/goreleaser/pkg/context" ) @@ -59,19 +60,21 @@ func (p Pipe) Announce(ctx *context.Context) error { log.Infof("posting: '%s'", msg) - webhookID, err := snowflake.Parse(cfg.WebhookID) + color, err := strconv.Atoi(ctx.Config.Announce.Discord.Color) if err != nil { return fmt.Errorf("discord: %w", err) } - color, err := strconv.Atoi(ctx.Config.Announce.Discord.Color) + u, err := url.Parse("https://discord.com/api") if err != nil { return fmt.Errorf("discord: %w", err) } - if _, err = webhook.New(webhookID, cfg.WebhookToken).CreateMessage(discord.WebhookMessageCreate{ - Embeds: []discord.Embed{ + u = u.JoinPath("webhooks", cfg.WebhookID, cfg.WebhookToken) + + bts, err := json.Marshal(WebhookMessageCreate{ + Embeds: []Embed{ { - Author: &discord.EmbedAuthor{ + Author: &EmbedAuthor{ Name: ctx.Config.Announce.Discord.Author, IconURL: ctx.Config.Announce.Discord.IconURL, }, @@ -79,8 +82,34 @@ func (p Pipe) Announce(ctx *context.Context) error { Color: color, }, }, - }); err != nil { + }) + if err != nil { return fmt.Errorf("discord: %w", err) } + + resp, err := http.Post(u.String(), "application/json", bytes.NewReader(bts)) + if err != nil { + return fmt.Errorf("discord: %w", err) + } + + if resp.StatusCode != 204 && resp.StatusCode != 200 { + return fmt.Errorf("discord: %s", resp.Status) + } + return nil } + +type WebhookMessageCreate struct { + Embeds []Embed `json:"embeds,omitempty"` +} + +type Embed struct { + Description string `json:"description,omitempty"` + Color int `json:"color,omitempty"` + Author *EmbedAuthor `json:"author,omitempty"` +} + +type EmbedAuthor struct { + Name string `json:"name,omitempty"` + IconURL string `json:"icon_url,omitempty"` +} diff --git a/goreleaser/int/pipe/discord/discord_test.go b/goreleaser/int/pipe/discord/discord_test.go index 7ad2ae6..10ca681 100644 --- a/goreleaser/int/pipe/discord/discord_test.go +++ b/goreleaser/int/pipe/discord/discord_test.go @@ -56,3 +56,21 @@ func TestSkip(t *testing.T) { require.False(t, Pipe{}.Skip(ctx)) }) } + +func TestLive(t *testing.T) { + t.SkipNow() + t.Setenv("DISCORD_WEBHOOK_ID", "TODO") + t.Setenv("DISCORD_WEBHOOK_TOKEN", "TODO") + + ctx := testctx.NewWithCfg(config.Project{ + Announce: config.Announce{ + Discord: config.Discord{ + MessageTemplate: "test", + Enabled: true, + }, + }, + }) + + require.NoError(t, Pipe{}.Default(ctx)) + require.NoError(t, Pipe{}.Announce(ctx)) +} diff --git a/goreleaser/int/pipe/docker/api_docker.go b/goreleaser/int/pipe/docker/api_docker.go index b22bb9d..6507aa6 100644 --- a/goreleaser/int/pipe/docker/api_docker.go +++ b/goreleaser/int/pipe/docker/api_docker.go @@ -73,7 +73,7 @@ func (i dockerImager) Build(ctx *context.Context, root string, images, flags []s func (i dockerImager) buildCommand(images, flags []string) []string { base := []string{"build", "."} if i.buildx { - base = []string{"buildx", "--builder", "default", "build", ".", "--load"} + base = []string{"buildx", "build", ".", "--load"} } for _, image := range images { base = append(base, "-t", image) diff --git a/goreleaser/int/pipe/docker/docker_test.go b/goreleaser/int/pipe/docker/docker_test.go index 2b819ad..dd26188 100644 --- a/goreleaser/int/pipe/docker/docker_test.go +++ b/goreleaser/int/pipe/docker/docker_test.go @@ -1113,7 +1113,7 @@ func TestBuildCommand(t *testing.T) { name: "buildx", buildx: true, flags: []string{"--label=foo", "--build-arg=bar=baz"}, - expect: []string{"buildx", "--builder", "default", "build", ".", "--load", "-t", images[0], "-t", images[1], "--label=foo", "--build-arg=bar=baz"}, + expect: []string{"buildx", "build", ".", "--load", "-t", images[0], "-t", images[1], "--label=foo", "--build-arg=bar=baz"}, }, } for _, tt := range tests { diff --git a/goreleaser/int/pipe/linkedin/client.go b/goreleaser/int/pipe/linkedin/client.go index a4b8d0a..24f5b52 100644 --- a/goreleaser/int/pipe/linkedin/client.go +++ b/goreleaser/int/pipe/linkedin/client.go @@ -114,8 +114,7 @@ func (c client) getProfileSub() (string, error) { defer resp.Body.Close() var result map[string]interface{} - err = json.Unmarshal(value, &result) - if err != nil { + if err := json.Unmarshal(value, &result); err != nil { return "", fmt.Errorf("could not unmarshal: %w", err) } @@ -123,7 +122,7 @@ func (c client) getProfileSub() (string, error) { return v.(string), nil } - return "", fmt.Errorf("could not find 'sub' in result: %w", err) + return "", fmt.Errorf("could not find 'sub' in result: %v", result) } // Person or Organization URN - urn:li:person:PROFILE_IDENTIFIER diff --git a/goreleaser/int/pipe/nfpm/nfpm.go b/goreleaser/int/pipe/nfpm/nfpm.go index bfbfd7c..7795d0b 100644 --- a/goreleaser/int/pipe/nfpm/nfpm.go +++ b/goreleaser/int/pipe/nfpm/nfpm.go @@ -37,8 +37,10 @@ const ( // Pipe for nfpm packaging. type Pipe struct{} -func (Pipe) String() string { return "linux packages" } -func (Pipe) Skip(ctx *context.Context) bool { return len(ctx.Config.NFPMs) == 0 } +func (Pipe) String() string { return "linux packages" } +func (Pipe) Skip(ctx *context.Context) bool { + return skips.Any(ctx, skips.NFPM) || len(ctx.Config.NFPMs) == 0 +} // Default sets the pipe defaults. func (Pipe) Default(ctx *context.Context) error { @@ -51,6 +53,15 @@ func (Pipe) Default(ctx *context.Context) error { if fpm.Bindir == "" { fpm.Bindir = "/usr/bin" } + if fpm.Libdirs.Header == "" { + fpm.Libdirs.Header = "/usr/include" + } + if fpm.Libdirs.CShared == "" { + fpm.Libdirs.CShared = "/usr/lib" + } + if fpm.Libdirs.CArchive == "" { + fpm.Libdirs.CArchive = "/usr/lib" + } if fpm.PackageName == "" { fpm.PackageName = ctx.Config.ProjectName } @@ -83,7 +94,12 @@ func (Pipe) Run(ctx *context.Context) error { func doRun(ctx *context.Context, fpm config.NFPM) error { filters := []artifact.Filter{ - artifact.ByType(artifact.Binary), + artifact.Or( + artifact.ByType(artifact.Binary), + artifact.ByType(artifact.Header), + artifact.ByType(artifact.CArchive), + artifact.ByType(artifact.CShared), + ), artifact.Or( artifact.ByGoos("linux"), artifact.ByGoos("ios"), @@ -137,11 +153,11 @@ func isSupportedTermuxArch(arch string) bool { return false } -func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*artifact.Artifact) error { +func create(ctx *context.Context, fpm config.NFPM, format string, artifacts []*artifact.Artifact) error { // TODO: improve mips handling on nfpm - infoArch := binaries[0].Goarch + binaries[0].Goarm + binaries[0].Gomips // key used for the ConventionalFileName et al - arch := infoArch + binaries[0].Goamd64 // unique arch key - infoPlatform := binaries[0].Goos + infoArch := artifacts[0].Goarch + artifacts[0].Goarm + artifacts[0].Gomips // key used for the ConventionalFileName et al + arch := infoArch + artifacts[0].Goamd64 // unique arch key + infoPlatform := artifacts[0].Goos if infoPlatform == "ios" { if format == "deb" { infoPlatform = "iphoneos-arm64" @@ -163,7 +179,10 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar ) infoArch = replacer.Replace(infoArch) arch = replacer.Replace(arch) - fpm.Bindir = filepath.Join("/data/data/com.termux/files", fpm.Bindir) + fpm.Bindir = termuxPrefixedDir(fpm.Bindir) + fpm.Libdirs.Header = termuxPrefixedDir(fpm.Libdirs.Header) + fpm.Libdirs.CArchive = termuxPrefixedDir(fpm.Libdirs.CArchive) + fpm.Libdirs.CShared = termuxPrefixedDir(fpm.Libdirs.CShared) } overridden, err := mergeOverrides(fpm, format) @@ -177,7 +196,7 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar } t := tmpl.New(ctx). - WithArtifact(binaries[0]). + WithArtifact(artifacts[0]). WithExtraFields(tmpl.Fields{ "Release": fpm.Release, "Epoch": fpm.Epoch, @@ -199,6 +218,10 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar // We cannot use t.ApplyAll on the following fields as they are shared // across multiple nfpms. + // + t = t.WithExtraFields(tmpl.Fields{ + "Format": format, + }) debKeyFile, err := t.Apply(overridden.Deb.Signature.KeyFile) if err != nil { @@ -220,6 +243,21 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar return err } + libdirs := config.Libdirs{} + + libdirs.Header, err = t.Apply(fpm.Libdirs.Header) + if err != nil { + return err + } + libdirs.CShared, err = t.Apply(fpm.Libdirs.CShared) + if err != nil { + return err + } + libdirs.CArchive, err = t.Apply(fpm.Libdirs.CArchive) + if err != nil { + return err + } + contents := files.Contents{} for _, content := range overridden.Contents { src, err := t.Apply(content.Source) @@ -251,10 +289,13 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar // FPM meta package should not contain binaries at all if !fpm.Meta { - for _, binary := range binaries { - src := binary.Path - dst := filepath.Join(fpm.Bindir, binary.Name) - log.WithField("src", src).WithField("dst", dst).Debug("adding binary to package") + for _, art := range artifacts { + src := art.Path + dst := filepath.Join(artifactPackageDir(fpm.Bindir, libdirs, art), art.Name) + log.WithField("src", src). + WithField("dst", dst). + WithField("type", art.Type.String()). + Debug("adding artifact to package") contents = append(contents, &files.Content{ Source: filepath.ToSlash(src), Destination: filepath.ToSlash(dst), @@ -414,11 +455,11 @@ func create(ctx *context.Context, fpm config.NFPM, format string, binaries []*ar Type: artifact.LinuxPackage, Name: packageFilename, Path: path, - Goos: binaries[0].Goos, - Goarch: binaries[0].Goarch, - Goarm: binaries[0].Goarm, - Gomips: binaries[0].Gomips, - Goamd64: binaries[0].Goamd64, + Goos: artifacts[0].Goos, + Goarch: artifacts[0].Goarch, + Goarm: artifacts[0].Goarm, + Gomips: artifacts[0].Gomips, + Goamd64: artifacts[0].Goamd64, Extra: map[string]interface{}{ artifact.ExtraID: fpm.ID, artifact.ExtraFormat: format, @@ -479,3 +520,26 @@ func getPassphraseFromEnv(ctx *context.Context, packager string, nfpmID string) return passphrase } + +func termuxPrefixedDir(dir string) string { + if dir == "" { + return "" + } + return filepath.Join("/data/data/com.termux/files", dir) +} + +func artifactPackageDir(bindir string, libdirs config.Libdirs, art *artifact.Artifact) string { + switch art.Type { + case artifact.Binary: + return bindir + case artifact.Header: + return libdirs.Header + case artifact.CShared: + return libdirs.CShared + case artifact.CArchive: + return libdirs.CArchive + default: + // should never happen + return "" + } +} diff --git a/goreleaser/int/pipe/nfpm/nfpm_test.go b/goreleaser/int/pipe/nfpm/nfpm_test.go index ab746c3..bda4775 100644 --- a/goreleaser/int/pipe/nfpm/nfpm_test.go +++ b/goreleaser/int/pipe/nfpm/nfpm_test.go @@ -98,9 +98,18 @@ func TestRunPipe(t *testing.T) { require.NoError(t, os.Mkdir(dist, 0o755)) require.NoError(t, os.Mkdir(filepath.Join(dist, "mybin"), 0o755)) binPath := filepath.Join(dist, "mybin", "mybin") - f, err := os.Create(binPath) - require.NoError(t, err) - require.NoError(t, f.Close()) + foohPath := filepath.Join(dist, "foo.h") + foosoPath := filepath.Join(dist, "foo.so") + fooaPath := filepath.Join(dist, "foo.a") + for _, name := range []string{binPath, foosoPath, foohPath, fooaPath} { + f, err := os.Create(name) + require.NoError(t, err) + require.NoError(t, f.Close()) + + } + libPrefix := `/usr/lib + {{- if eq .Arch "amd64" }}{{if eq .Format "rpm"}}_rpm{{end}}64{{- end -}} + ` ctx := testctx.NewWithCfg(config.Project{ ProjectName: "mybin", Dist: dist, @@ -113,7 +122,7 @@ func TestRunPipe(t *testing.T) { { ID: "someid", Bindir: "/usr/bin", - Builds: []string{"default"}, + Builds: []string{"default", "lib1", "lib2", "lib3"}, Formats: []string{"deb", "rpm", "apk", "termux.deb", "archlinux"}, Section: "somesection", Priority: "standard", @@ -123,6 +132,11 @@ func TestRunPipe(t *testing.T) { Vendor: "asdf", Homepage: "https://goreleaser.com/{{ .Env.PRO }}", Changelog: "./testdata/changelog.yaml", + Libdirs: config.Libdirs{ + Header: libPrefix + "/headers", + CArchive: libPrefix + "/c-archives", + CShared: libPrefix + "/c-shareds", + }, NFPMOverridables: config.NFPMOverridables{ FileNameTemplate: defaultNameTemplate + "-{{ .Release }}-{{ .Epoch }}", PackageName: "foo", @@ -201,6 +215,39 @@ func TestRunPipe(t *testing.T) { artifact.ExtraID: "default", }, }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.h", + Path: foohPath, + Goarch: goarch, + Goos: goos, + Goarm: goarm, + Type: artifact.Header, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib1", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.so", + Path: foosoPath, + Goarch: goarch, + Goos: goos, + Goarm: goarm, + Type: artifact.CShared, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib2", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.a", + Path: fooaPath, + Goarch: goarch, + Goos: goos, + Goarm: goarm, + Type: artifact.CArchive, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib3", + }, + }) } case "amd64": for _, goamd64 := range []string{"v1", "v2", "v3", "v4"} { @@ -215,6 +262,39 @@ func TestRunPipe(t *testing.T) { artifact.ExtraID: "default", }, }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.h", + Path: foohPath, + Goarch: goarch, + Goos: goos, + Goamd64: goamd64, + Type: artifact.Header, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib1", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.so", + Path: foosoPath, + Goarch: goarch, + Goos: goos, + Goamd64: goamd64, + Type: artifact.CShared, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib2", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.a", + Path: fooaPath, + Goarch: goarch, + Goos: goos, + Goamd64: goamd64, + Type: artifact.CArchive, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib3", + }, + }) } case "mips": for _, gomips := range []string{"softfloat", "hardfloat"} { @@ -229,6 +309,39 @@ func TestRunPipe(t *testing.T) { artifact.ExtraID: "default", }, }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.h", + Path: foohPath, + Goarch: goarch, + Goos: goos, + Gomips: gomips, + Type: artifact.Header, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib1", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.so", + Path: foosoPath, + Goarch: goarch, + Goos: goos, + Gomips: gomips, + Type: artifact.CShared, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib2", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.a", + Path: fooaPath, + Goarch: goarch, + Goos: goos, + Gomips: gomips, + Type: artifact.CArchive, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib3", + }, + }) } default: ctx.Artifacts.Add(&artifact.Artifact{ @@ -241,6 +354,36 @@ func TestRunPipe(t *testing.T) { artifact.ExtraID: "default", }, }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.h", + Path: foohPath, + Goarch: goarch, + Goos: goos, + Type: artifact.Header, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib1", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.so", + Path: foosoPath, + Goarch: goarch, + Goos: goos, + Type: artifact.CShared, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib2", + }, + }) + ctx.Artifacts.Add(&artifact.Artifact{ + Name: "foo.a", + Path: fooaPath, + Goarch: goarch, + Goos: goos, + Type: artifact.CArchive, + Extra: map[string]interface{}{ + artifact.ExtraID: "lib3", + }, + }) } } } @@ -286,13 +429,36 @@ func TestRunPipe(t *testing.T) { "./testdata/folder", "./testdata/testfile-" + pkg.Goarch + pkg.Goamd64 + pkg.Goarm + pkg.Gomips + ".txt", binPath, + foohPath, + fooaPath, + foosoPath, }, sources(artifact.ExtraOr(*pkg, extraFiles, files.Contents{}))) bin := "/usr/bin/subdir/" + header := "/usr/lib/headers" + carchive := "/usr/lib/c-archives" + cshared := "/usr/lib/c-shareds" + if pkg.Goarch == "amd64" { + if pkg.Format() == "rpm" { + header = "/usr/lib_rpm64/headers" + carchive = "/usr/lib_rpm64/c-archives" + cshared = "/usr/lib_rpm64/c-shareds" + } else { + header = "/usr/lib64/headers" + carchive = "/usr/lib64/c-archives" + cshared = "/usr/lib64/c-shareds" + } + } if format == termuxFormat { bin = filepath.Join("/data/data/com.termux/files", bin) + header = filepath.Join("/data/data/com.termux/files", header) + cshared = filepath.Join("/data/data/com.termux/files", cshared) + carchive = filepath.Join("/data/data/com.termux/files", carchive) } bin = filepath.Join(bin, "mybin") + header = filepath.Join(header, "foo.h") + cshared = filepath.Join(cshared, "foo.so") + carchive = filepath.Join(carchive, "foo.a") require.ElementsMatch(t, []string{ "/var/log/foobar", "/usr/share/testfile.txt", @@ -303,6 +469,9 @@ func TestRunPipe(t *testing.T) { "/etc/nope3_mybin.conf", "/etc/folder", bin, + header, + carchive, + cshared, }, destinations(artifact.ExtraOr(*pkg, extraFiles, files.Contents{}))) } require.Len(t, ctx.Config.NFPMs[0].Contents, 8, "should not modify the config file list") @@ -1407,6 +1576,14 @@ func TestSkip(t *testing.T) { t.Run("skip", func(t *testing.T) { require.True(t, Pipe{}.Skip(testctx.New())) }) + t.Run("skip flag", func(t *testing.T) { + ctx := testctx.NewWithCfg(config.Project{ + NFPMs: []config.NFPM{ + {}, + }, + }, testctx.Skip(skips.NFPM)) + require.True(t, Pipe{}.Skip(ctx)) + }) t.Run("dont skip", func(t *testing.T) { ctx := testctx.NewWithCfg(config.Project{ diff --git a/goreleaser/int/pipe/nix/nix.go b/goreleaser/int/pipe/nix/nix.go index 9b29f26..570f176 100644 --- a/goreleaser/int/pipe/nix/nix.go +++ b/goreleaser/int/pipe/nix/nix.go @@ -23,6 +23,7 @@ import ( "github.com/goreleaser/goreleaser/int/tmpl" "github.com/goreleaser/goreleaser/pkg/config" "github.com/goreleaser/goreleaser/pkg/context" + "golang.org/x/exp/maps" ) const nixConfigExtra = "NixConfig" @@ -253,15 +254,11 @@ func preparePkg( return "", err } - folder := artifact.ExtraOr(*archives[0], artifact.ExtraWrappedIn, ".") - if folder == "" { - folder = "." - } - inputs := []string{"installShellFiles"} dependencies := depNames(nix.Dependencies) if len(dependencies) > 0 { inputs = append(inputs, "makeWrapper") + dependencies = append(dependencies, "makeWrapper") } for _, arch := range archives { if arch.Format() == "zip" { @@ -277,7 +274,7 @@ func preparePkg( Install: installs, PostInstall: postInstall, Archives: map[string]Archive{}, - SourceRoot: folder, + SourceRoots: map[string]string{}, Description: nix.Description, Homepage: nix.Homepage, License: nix.License, @@ -305,11 +302,20 @@ func preparePkg( if _, ok := data.Archives[key]; ok { return "", ErrMultipleArchivesSamePlatform } + folder := artifact.ExtraOr(*art, artifact.ExtraWrappedIn, ".") + if folder == "" { + folder = "." + } + data.SourceRoots[key] = folder data.Archives[key] = archive plat := goosToPlatform[art.Goos+goarch+art.Goarm] platforms[plat] = true } } + + if roots := slices.Compact(maps.Values(data.SourceRoots)); len(roots) == 1 { + data.SourceRoot = roots[0] + } data.Platforms = keys(platforms) sort.Strings(data.Platforms) @@ -498,10 +504,10 @@ func binInstallFormats(nix config.Nix) []string { var depStrings []string if len(darwinDeps) > 0 { - depStrings = append(depStrings, fmt.Sprintf("lib.optionals stdenv.isDarwin [ %s ]", strings.Join(darwinDeps, " "))) + depStrings = append(depStrings, fmt.Sprintf("lib.optionals stdenvNoCC.isDarwin [ %s ]", strings.Join(darwinDeps, " "))) } if len(linuxDeps) > 0 { - depStrings = append(depStrings, fmt.Sprintf("lib.optionals stdenv.isLinux [ %s ]", strings.Join(linuxDeps, " "))) + depStrings = append(depStrings, fmt.Sprintf("lib.optionals stdenvNoCC.isLinux [ %s ]", strings.Join(linuxDeps, " "))) } if len(deps) > 0 { depStrings = append(depStrings, fmt.Sprintf("[ %s ]", strings.Join(deps, " "))) diff --git a/goreleaser/int/pipe/nix/nix_test.go b/goreleaser/int/pipe/nix/nix_test.go index a57250f..44f0c09 100644 --- a/goreleaser/int/pipe/nix/nix_test.go +++ b/goreleaser/int/pipe/nix/nix_test.go @@ -489,7 +489,7 @@ func TestRunPipe(t *testing.T) { if goos != "darwin" { createFakeArtifact("unibin-replaces", goos, goarch, "v1", "", "tar.gz", nil) } - createFakeArtifact("wrapped-in-dir", goos, goarch, "v1", "", "tar.gz", map[string]any{artifact.ExtraWrappedIn: "./foo"}) + createFakeArtifact("wrapped-in-dir", goos, goarch, "v1", "", "tar.gz", map[string]any{artifact.ExtraWrappedIn: "./foo_" + goarch}) createFakeArtifact("foo-zip", goos, goarch, "v1", "", "zip", nil) continue } @@ -508,7 +508,7 @@ func TestRunPipe(t *testing.T) { if goos != "darwin" { createFakeArtifact("unibin-replaces", goos, goarch, "", "", "tar.gz", nil) } - createFakeArtifact("wrapped-in-dir", goos, goarch, "", "", "tar.gz", map[string]any{artifact.ExtraWrappedIn: "./foo"}) + createFakeArtifact("wrapped-in-dir", goos, goarch, "", "", "tar.gz", map[string]any{artifact.ExtraWrappedIn: "./foo_" + goarch}) createFakeArtifact("foo-zip", goos, goarch, "v1", "", "zip", nil) if goos == "darwin" { createFakeArtifact("zip-and-tar", goos, goarch, "v1", "", "zip", nil) diff --git a/goreleaser/int/pipe/nix/template.go b/goreleaser/int/pipe/nix/template.go index a87aff4..719d51f 100644 --- a/goreleaser/int/pipe/nix/template.go +++ b/goreleaser/int/pipe/nix/template.go @@ -15,6 +15,7 @@ type templateData struct { Install []string PostInstall []string SourceRoot string + SourceRoots map[string]string Archives map[string]Archive Description string Homepage string diff --git a/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/darwin-only-deps.golden b/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/darwin-only-deps.golden index 1a618b6..f4b14d8 100644 --- a/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/darwin-only-deps.golden +++ b/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/darwin-only-deps.golden @@ -1,2 +1,2 @@ cp -vr ./%[1]s $out/bin/%[1]s -wrapProgram $out/bin/%[1]s --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isDarwin [ foo bar ])} \ No newline at end of file +wrapProgram $out/bin/%[1]s --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isDarwin [ foo bar ])} \ No newline at end of file diff --git a/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/linux-only-deps.golden b/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/linux-only-deps.golden index 1447b8b..6da1784 100644 --- a/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/linux-only-deps.golden +++ b/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/linux-only-deps.golden @@ -1,2 +1,2 @@ cp -vr ./%[1]s $out/bin/%[1]s -wrapProgram $out/bin/%[1]s --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isLinux [ foo bar ])} \ No newline at end of file +wrapProgram $out/bin/%[1]s --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isLinux [ foo bar ])} \ No newline at end of file diff --git a/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/mixed-deps.golden b/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/mixed-deps.golden index 1916631..71d341c 100644 --- a/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/mixed-deps.golden +++ b/goreleaser/int/pipe/nix/testdata/TestBinInstallFormats/mixed-deps.golden @@ -1,2 +1,2 @@ cp -vr ./%[1]s $out/bin/%[1]s -wrapProgram $out/bin/%[1]s --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isDarwin [ bar ] ++ lib.optionals stdenv.isLinux [ foo ] ++ [ fish ])} \ No newline at end of file +wrapProgram $out/bin/%[1]s --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isDarwin [ bar ] ++ lib.optionals stdenvNoCC.isLinux [ foo ] ++ [ fish ])} \ No newline at end of file diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_build.nix.golden index 7974cf4..ba46853 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_build.nix.golden @@ -2,16 +2,15 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , fish , bash , ttyd , chromium +, makeWrapper }: let shaMap = { @@ -34,7 +33,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { @@ -49,7 +48,7 @@ pkgs.stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin cp -vr ./foo $out/bin/foo - wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isDarwin [ chromium ] ++ lib.optionals stdenv.isLinux [ ttyd ] ++ [ fish bash ])} + wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isDarwin [ chromium ] ++ lib.optionals stdenvNoCC.isLinux [ ttyd ] ++ [ fish bash ])} ''; system = system; diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_publish.nix.golden index a8efc14..2401e66 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/deps_publish.nix.golden @@ -2,16 +2,15 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , fish , bash , ttyd , chromium +, makeWrapper }: let shaMap = { @@ -34,7 +33,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { @@ -49,7 +48,7 @@ pkgs.stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin cp -vr ./foo $out/bin/foo - wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isDarwin [ chromium ] ++ lib.optionals stdenv.isLinux [ ttyd ] ++ [ fish bash ])} + wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isDarwin [ chromium ] ++ lib.optionals stdenvNoCC.isLinux [ ttyd ] ++ [ fish bash ])} ''; system = system; diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_build.nix.golden index d78aff7..e04166f 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_build.nix.golden @@ -2,16 +2,15 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , fish , bash , ttyd , chromium +, makeWrapper }: let shaMap = { @@ -34,7 +33,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { @@ -49,7 +48,7 @@ pkgs.stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin cp -vr ./foo $out/bin/foo - wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isDarwin [ chromium ] ++ lib.optionals stdenv.isLinux [ ttyd ] ++ [ fish bash ])} + wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isDarwin [ chromium ] ++ lib.optionals stdenvNoCC.isLinux [ ttyd ] ++ [ fish bash ])} installManPage ./manpages/foo.1.gz ''; diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_publish.nix.golden index c9d694f..e25cb7a 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/extra-install_publish.nix.golden @@ -2,16 +2,15 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , fish , bash , ttyd , chromium +, makeWrapper }: let shaMap = { @@ -34,7 +33,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { @@ -49,7 +48,7 @@ pkgs.stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin cp -vr ./foo $out/bin/foo - wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenv.isDarwin [ chromium ] ++ lib.optionals stdenv.isLinux [ ttyd ] ++ [ fish bash ])} + wrapProgram $out/bin/foo --prefix PATH : ${lib.makeBinPath (lib.optionals stdenvNoCC.isDarwin [ chromium ] ++ lib.optionals stdenvNoCC.isLinux [ ttyd ] ++ [ fish bash ])} installManPage ./manpages/foo.1.gz ''; diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_build.nix.golden index 7ae78b1..360d8c8 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -28,7 +28,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_publish.nix.golden index ba68c14..1c9bb88 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/minimal_publish.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -28,7 +28,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_build.nix.golden index 43c4c3e..3e9e04b 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -28,7 +28,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_publish.nix.golden index 0ddbf0c..567bc9a 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/open-pr_publish.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -28,7 +28,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foo"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_build.nix.golden index d4a5b9f..8bf9e57 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -18,7 +18,7 @@ let x86_64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_amd64v1.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "partial"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_publish.nix.golden index dbdab02..e956d97 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/partial_publish.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -18,7 +18,7 @@ let x86_64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_amd64v1.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "partial"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload-auto_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload-auto_build.nix.golden index b47ff6d..5a50eed 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload-auto_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload-auto_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -28,7 +28,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "doesnotmatter"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload_build.nix.golden index b47ff6d..5a50eed 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/skip-upload_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -28,7 +28,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "doesnotmatter"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_build.nix.golden index 471a47b..84cea3d 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -24,7 +24,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_all.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "unibin-replaces"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_publish.nix.golden index 2154ea9..dd69bde 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/unibin-replaces_publish.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -24,7 +24,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_all.tar.gz"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "unibin-replaces"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_build.nix.golden index fa23167..c3b3a9f 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_build.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -23,8 +23,15 @@ let x86_64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_amd64v1.tar.gz"; aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; + sourceRootMap = { + i686-linux = "./foo_386"; + x86_64-linux = "./foo_amd64"; + aarch64-linux = "./foo_arm64"; + x86_64-darwin = "./foo_amd64"; + aarch64-darwin = "./foo_arm64"; + }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "wrapped-in-dir"; version = "1.2.1"; src = fetchurl { @@ -32,7 +39,7 @@ pkgs.stdenv.mkDerivation { sha256 = shaMap.${system}; }; - sourceRoot = "./foo"; + sourceRoot = sourceRootMap.${system}; nativeBuildInputs = [ installShellFiles ]; diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_publish.nix.golden index e301e74..5866d64 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/wrapped-in-dir_publish.nix.golden @@ -2,10 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles +, stdenvNoCC }: let shaMap = { @@ -23,8 +23,15 @@ let x86_64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_amd64v1.tar.gz"; aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.tar.gz"; }; + sourceRootMap = { + i686-linux = "./foo_386"; + x86_64-linux = "./foo_amd64"; + aarch64-linux = "./foo_arm64"; + x86_64-darwin = "./foo_amd64"; + aarch64-darwin = "./foo_arm64"; + }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "wrapped-in-dir"; version = "1.2.1"; src = fetchurl { @@ -32,7 +39,7 @@ pkgs.stdenv.mkDerivation { sha256 = shaMap.${system}; }; - sourceRoot = "./foo"; + sourceRoot = sourceRootMap.${system}; nativeBuildInputs = [ installShellFiles ]; diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_build.nix.golden index 07c2200..c53340d 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_build.nix.golden @@ -2,12 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , unzip }: let @@ -23,7 +21,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foozip"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_publish.nix.golden index d4998cc..87b574c 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-and-tar_publish.nix.golden @@ -2,12 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , unzip }: let @@ -23,7 +21,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foozip"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_build.nix.golden index 951e577..fa83b19 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_build.nix.golden @@ -2,13 +2,12 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , git +, makeWrapper , unzip }: let @@ -28,7 +27,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foozip"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_publish.nix.golden index 915cbea..504da54 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip-with-dependencies_publish.nix.golden @@ -2,13 +2,12 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , git +, makeWrapper , unzip }: let @@ -28,7 +27,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foozip"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_build.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_build.nix.golden index 5c784c4..90e0c51 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_build.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_build.nix.golden @@ -2,12 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , unzip }: let @@ -27,7 +25,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foozip"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_publish.nix.golden b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_publish.nix.golden index 94224c2..ccbb266 100644 --- a/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_publish.nix.golden +++ b/goreleaser/int/pipe/nix/testdata/TestRunPipe/zip_publish.nix.golden @@ -2,12 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -, makeWrapper -, stdenv +, stdenvNoCC , unzip }: let @@ -27,7 +25,7 @@ let aarch64-darwin = "https://dummyhost/download/v1.2.1/foo_darwin_arm64.zip"; }; in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "foozip"; version = "1.2.1"; src = fetchurl { diff --git a/goreleaser/int/pipe/nix/tmpl.nix b/goreleaser/int/pipe/nix/tmpl.nix index e3b7314..c09355d 100644 --- a/goreleaser/int/pipe/nix/tmpl.nix +++ b/goreleaser/int/pipe/nix/tmpl.nix @@ -2,14 +2,10 @@ # vim: set ft=nix ts=2 sw=2 sts=2 et sta { system ? builtins.currentSystem -, pkgs , lib , fetchurl , installShellFiles -{{- if .Dependencies }} -, makeWrapper -, stdenv -{{- end -}} +, stdenvNoCC {{- range $index, $element := .Dependencies }} , {{ . -}} {{- end }} @@ -62,8 +58,34 @@ let aarch64-darwin = "{{ . }}"; {{- end }} }; + + {{- if not .SourceRoot }} + sourceRootMap = { + {{- with .SourceRoots.linux386 }} + i686-linux = "{{ . }}"; + {{- end }} + {{- with .SourceRoots.linuxamd64 }} + x86_64-linux = "{{ . }}"; + {{- end }} + {{- with .SourceRoots.linuxarm6 }} + armv6l-linux = "{{ . }}"; + {{- end }} + {{- with .SourceRoots.linuxarm7 }} + armv7l-linux = "{{ . }}"; + {{- end }} + {{- with .SourceRoots.linuxarm64 }} + aarch64-linux = "{{ . }}"; + {{- end }} + {{- with .SourceRoots.darwinamd64 }} + x86_64-darwin = "{{ . }}"; + {{- end }} + {{- with .SourceRoots.darwinarm64 }} + aarch64-darwin = "{{ . }}"; + {{- end }} + }; + {{- end }} in -pkgs.stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "{{ .Name }}"; version = "{{ .Version }}"; src = fetchurl { @@ -71,7 +93,7 @@ pkgs.stdenv.mkDerivation { sha256 = shaMap.${system}; }; - sourceRoot = "{{ .SourceRoot }}"; + sourceRoot = {{ with .SourceRoot }}"{{ . }}"{{ else }}sourceRootMap.${system}{{ end }}; nativeBuildInputs = [ {{ range $input, $plat := .Inputs }}{{ . }} {{ end }}]; diff --git a/goreleaser/int/pipe/sbom/sbom.go b/goreleaser/int/pipe/sbom/sbom.go index 0d3e25e..48cb34c 100644 --- a/goreleaser/int/pipe/sbom/sbom.go +++ b/goreleaser/int/pipe/sbom/sbom.go @@ -201,8 +201,7 @@ func catalogArtifact(ctx *context.Context, cfg config.SBOM, a *artifact.Artifact cmd.Env = append(cmd.Env, envs...) cmd.Dir = ctx.Config.Dist - log.WithField("env", cmd.Env). - WithField("dir", cmd.Dir). + log.WithField("dir", cmd.Dir). WithField("cmd", cmd.Args). Debug("running") diff --git a/goreleaser/int/pipe/slack/slack.go b/goreleaser/int/pipe/slack/slack.go index 5d16670..b15db56 100644 --- a/goreleaser/int/pipe/slack/slack.go +++ b/goreleaser/int/pipe/slack/slack.go @@ -3,6 +3,7 @@ package slack import ( "encoding/json" "fmt" + "strings" "github.com/caarlos0/env/v9" "github.com/caarlos0/log" @@ -102,7 +103,11 @@ func unmarshal(ctx *context.Context, in interface{}, target interface{}) error { return fmt.Errorf("failed to marshal input as JSON: %w", err) } - tplApplied, err := tmpl.New(ctx).Apply(string(jazon)) + body := string(jazon) + // ensure that double quotes that are inside the string get un-escaped so they can be interpreted for templates + body = strings.ReplaceAll(body, "\\\"", "\"") + + tplApplied, err := tmpl.New(ctx).Apply(body) if err != nil { return fmt.Errorf("failed to evaluate template: %w", err) } diff --git a/goreleaser/int/pipe/slack/slack_test.go b/goreleaser/int/pipe/slack/slack_test.go index eef26ad..fe4c02b 100644 --- a/goreleaser/int/pipe/slack/slack_test.go +++ b/goreleaser/int/pipe/slack/slack_test.go @@ -2,6 +2,7 @@ package slack import ( "bytes" + "encoding/json" "testing" "github.com/goreleaser/goreleaser/int/testctx" @@ -9,6 +10,7 @@ import ( "github.com/goreleaser/goreleaser/int/yaml" "github.com/goreleaser/goreleaser/pkg/config" "github.com/slack-go/slack" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -33,6 +35,42 @@ func TestAnnounceInvalidTemplate(t *testing.T) { testlib.RequireTemplateError(t, Pipe{}.Announce(ctx)) } +func TestAnnounceWithQuotes(t *testing.T) { + t.Setenv("SLACK_WEBHOOK", slackTestHook()) + t.Setenv("USER", "bot-mc-botyson") + + t.Run("with a plain message", func(t *testing.T) { + ctx := testctx.NewWithCfg(config.Project{ + Announce: config.Announce{ + Slack: config.Slack{ + MessageTemplate: "{{ envOrDefault \"USER\" \"\" }}", + }, + }, + }) + require.NoError(t, Pipe{}.Announce(ctx)) + }) + + t.Run("with rich text", func(t *testing.T) { + var project config.Project + require.NoError(t, yaml.Unmarshal(goodRichSlackConfWithEnv(), &project)) + ctx := testctx.NewWithCfg(project) + blocks, attachments, err := parseAdvancedFormatting(ctx) + require.NoError(t, err) + assert.Len(t, blocks.BlockSet, 2) + + blocksBody, err := json.Marshal(blocks.BlockSet) + require.NoError(t, err) + + assert.Contains(t, string(blocksBody), `The current user is bot-mc-botyson`) + assert.Contains(t, string(blocksBody), `The current user is bot-mc-botyson\nnewline!`) + + assert.Len(t, attachments, 1) + attachmentsBody, err := json.Marshal(attachments) + require.NoError(t, err) + assert.Contains(t, string(attachmentsBody), `The current user is bot-mc-botyson\n\nIncluding newlines\n`) + }) +} + func TestAnnounceMissingEnv(t *testing.T) { ctx := testctx.NewWithCfg(config.Project{ Announce: config.Announce{ @@ -311,3 +349,33 @@ announce: return bytes.ReplaceAll(buf.Bytes(), []byte("\t"), []byte(" ")) } + +func goodRichSlackConfWithEnv() []byte { + const conf = ` +project_name: test +announce: + slack: + enabled: true + blocks: + - type: header + text: + type: plain_text + text: 'The current user is {{ envOrDefault "USER" "" }}' + - type: header + text: + type: plain_text + text: "The current user is {{ envOrDefault \"USER\" \"\" }}\nnewline!" + attachments: + - + title: Release artifacts + color: '#2eb886' + text: | + The current user is {{ envOrDefault "USER" "" }} + + Including newlines +` + + buf := bytes.NewBufferString(conf) + + return bytes.ReplaceAll(buf.Bytes(), []byte("\t"), []byte(" ")) +} diff --git a/goreleaser/int/pipe/winget/winget.go b/goreleaser/int/pipe/winget/winget.go index 58c9b28..3ee0458 100644 --- a/goreleaser/int/pipe/winget/winget.go +++ b/goreleaser/int/pipe/winget/winget.go @@ -211,73 +211,9 @@ func (p Pipe) doRun(ctx *context.Context, winget config.Winget, cl client.Releas return err } - var deps []PackageDependency - for _, dep := range winget.Dependencies { - if err := tp.ApplyAll(&dep.MinimumVersion, &dep.PackageIdentifier); err != nil { - return err - } - deps = append(deps, PackageDependency{ - PackageIdentifier: dep.PackageIdentifier, - MinimumVersion: dep.MinimumVersion, - }) - } - - installer := Installer{ - PackageIdentifier: winget.PackageIdentifier, - PackageVersion: ctx.Version, - InstallerLocale: defaultLocale, - InstallerType: "zip", - Commands: []string{}, - ReleaseDate: ctx.Date.Format(time.DateOnly), - Installers: []InstallerItem{}, - ManifestType: "installer", - ManifestVersion: manifestVersion, - Dependencies: Dependencies{ - PackageDependencies: deps, - }, - } - - var amd64Count, i386count, zipCount, binaryCount int - for _, archive := range archives { - sha256, err := archive.Checksum("sha256") - if err != nil { - return err - } - url, err := tmpl.New(ctx).WithArtifact(archive).Apply(winget.URLTemplate) - if err != nil { - return err - } - item := InstallerItem{ - Architecture: fromGoArch[archive.Goarch], - InstallerURL: url, - InstallerSha256: sha256, - UpgradeBehavior: "uninstallPrevious", - } - if archive.Format() == "zip" { - zipCount++ - installer.InstallerType = "zip" - item.NestedInstallerType = "portable" - item.NestedInstallerFiles = installerItemFilesFor(*archive) - } else { - binaryCount++ - installer.InstallerType = "portable" - installer.Commands = []string{winget.Name} - } - installer.Installers = append(installer.Installers, item) - switch archive.Goarch { - case "386": - i386count++ - case "amd64": - amd64Count++ - } - } - - if binaryCount > 0 && zipCount > 0 { - return errMixedFormats - } - - if i386count > 1 || amd64Count > 1 { - return errMultipleArchives + installer, err := makeInstaller(ctx, winget, archives) + if err != nil { + return err } if err := createYAML(ctx, winget, installer, artifact.WingetInstaller); err != nil { @@ -460,3 +396,77 @@ func installerItemFilesFor(archive artifact.Artifact) []InstallerItemFile { } return files } + +func makeInstaller(ctx *context.Context, winget config.Winget, archives []*artifact.Artifact) (Installer, error) { + tp := tmpl.New(ctx) + var deps []PackageDependency + for _, dep := range winget.Dependencies { + if err := tp.ApplyAll(&dep.MinimumVersion, &dep.PackageIdentifier); err != nil { + return Installer{}, err + } + deps = append(deps, PackageDependency{ + PackageIdentifier: dep.PackageIdentifier, + MinimumVersion: dep.MinimumVersion, + }) + } + + installer := Installer{ + PackageIdentifier: winget.PackageIdentifier, + PackageVersion: ctx.Version, + InstallerLocale: defaultLocale, + InstallerType: "zip", + Commands: []string{}, + ReleaseDate: ctx.Date.Format(time.DateOnly), + Installers: []InstallerItem{}, + ManifestType: "installer", + ManifestVersion: manifestVersion, + Dependencies: Dependencies{ + PackageDependencies: deps, + }, + } + + var amd64Count, i386count, zipCount, binaryCount int + for _, archive := range archives { + sha256, err := archive.Checksum("sha256") + if err != nil { + return Installer{}, err + } + url, err := tmpl.New(ctx).WithArtifact(archive).Apply(winget.URLTemplate) + if err != nil { + return Installer{}, err + } + item := InstallerItem{ + Architecture: fromGoArch[archive.Goarch], + InstallerURL: url, + InstallerSha256: sha256, + UpgradeBehavior: "uninstallPrevious", + } + if archive.Format() == "zip" { + zipCount++ + installer.InstallerType = "zip" + item.NestedInstallerType = "portable" + item.NestedInstallerFiles = installerItemFilesFor(*archive) + } else { + binaryCount++ + installer.InstallerType = "portable" + installer.Commands = []string{winget.Name} + } + installer.Installers = append(installer.Installers, item) + switch archive.Goarch { + case "386": + i386count++ + case "amd64": + amd64Count++ + } + } + + if binaryCount > 0 && zipCount > 0 { + return Installer{}, errMixedFormats + } + + if i386count > 1 || amd64Count > 1 { + return Installer{}, errMultipleArchives + } + + return installer, nil +} diff --git a/goreleaser/int/semerrgroup/sem.go b/goreleaser/int/semerrgroup/sem.go index e3558dd..d6ff2e0 100644 --- a/goreleaser/int/semerrgroup/sem.go +++ b/goreleaser/int/semerrgroup/sem.go @@ -6,6 +6,7 @@ import ( "sync" "github.com/goreleaser/goreleaser/int/pipe" + "github.com/hashicorp/go-multierror" "golang.org/x/sync/errgroup" ) @@ -30,9 +31,9 @@ func NewSkipAware(g Group) Group { } type skipAwareGroup struct { - g Group - skipErr error - skipOnce sync.Once + g Group + skipErr *multierror.Error + l sync.Mutex } // Go execs runs `fn` and saves the result if no error has been encountered. @@ -42,9 +43,9 @@ func (s *skipAwareGroup) Go(fn func() error) { // if the err is a skip, set it for later, but return nil for now so the // group proceeds. if pipe.IsSkip(err) { - s.skipOnce.Do(func() { - s.skipErr = err - }) + s.l.Lock() + defer s.l.Unlock() + s.skipErr = multierror.Append(s.skipErr, err) return nil } return err @@ -57,5 +58,13 @@ func (s *skipAwareGroup) Wait() error { if err := s.g.Wait(); err != nil { return err } + if s.skipErr == nil { + return nil + } + + if s.skipErr.Len() == 1 { + return s.skipErr.Errors[0] + } + return s.skipErr } diff --git a/goreleaser/int/semerrgroup/sem_test.go b/goreleaser/int/semerrgroup/sem_test.go index 77026e3..5c08b9d 100644 --- a/goreleaser/int/semerrgroup/sem_test.go +++ b/goreleaser/int/semerrgroup/sem_test.go @@ -7,6 +7,7 @@ import ( "time" "github.com/goreleaser/goreleaser/int/pipe" + "github.com/hashicorp/go-multierror" "github.com/stretchr/testify/require" ) @@ -71,19 +72,49 @@ func TestSemaphoreSkipAware(t *testing.T) { for _, i := range []int{1, 4} { t.Run(fmt.Sprintf("limit-%d", i), func(t *testing.T) { g := NewSkipAware(New(i)) - var lock sync.Mutex - var counter int for i := 0; i < 10; i++ { g.Go(func() error { time.Sleep(10 * time.Millisecond) - lock.Lock() - counter++ - lock.Unlock() return pipe.Skip("fake skip") }) } + merr := &multierror.Error{} + require.ErrorAs(t, g.Wait(), &merr, "must be a multierror") + require.Len(t, merr.Errors, 10) + }) + } +} + +func TestSemaphoreSkipAwareSingleError(t *testing.T) { + for _, i := range []int{1, 4} { + t.Run(fmt.Sprintf("limit-%d", i), func(t *testing.T) { + g := NewSkipAware(New(i)) + for i := 0; i < 10; i++ { + i := i + g.Go(func() error { + time.Sleep(10 * time.Millisecond) + if i == 5 { + return pipe.Skip("fake skip") + } + return nil + }) + } require.EqualError(t, g.Wait(), "fake skip") - require.Equal(t, 10, counter) + }) + } +} + +func TestSemaphoreSkipAwareNoSkips(t *testing.T) { + for _, i := range []int{1, 4} { + t.Run(fmt.Sprintf("limit-%d", i), func(t *testing.T) { + g := NewSkipAware(New(i)) + for i := 0; i < 10; i++ { + g.Go(func() error { + time.Sleep(10 * time.Millisecond) + return nil + }) + } + require.NoError(t, g.Wait()) }) } } diff --git a/goreleaser/int/shell/shell.go b/goreleaser/int/shell/shell.go index 7dbd6cd..68b990a 100644 --- a/goreleaser/int/shell/shell.go +++ b/goreleaser/int/shell/shell.go @@ -18,7 +18,6 @@ import ( func Run(ctx *context.Context, dir string, command, env []string, output bool) error { log := log. WithField("cmd", command). - WithField("env", env). WithField("dir", dir) /* #nosec */ diff --git a/goreleaser/int/skips/skips.go b/goreleaser/int/skips/skips.go index ee21eb8..5135af7 100644 --- a/goreleaser/int/skips/skips.go +++ b/goreleaser/int/skips/skips.go @@ -29,6 +29,8 @@ const ( Homebrew Key = "homebrew" Nix Key = "nix" AUR Key = "aur" + NFPM Key = "nfpm" + Chocolatey Key = "chocolatey" ) func String(ctx *context.Context) string { @@ -104,11 +106,13 @@ var Release = Keys{ Ko, Docker, Winget, + Chocolatey, Snapcraft, Scoop, Homebrew, Nix, AUR, + NFPM, Before, } diff --git a/goreleaser/int/tmpl/tmpl.go b/goreleaser/int/tmpl/tmpl.go index 1f65658..5ee50a5 100644 --- a/goreleaser/int/tmpl/tmpl.go +++ b/goreleaser/int/tmpl/tmpl.go @@ -46,6 +46,8 @@ const ( tagBody = "TagBody" releaseURL = "ReleaseURL" isGitDirty = "IsGitDirty" + isGitClean = "IsGitClean" + gitTreeState = "GitTreeState" major = "Major" minor = "Minor" patch = "Patch" @@ -83,6 +85,10 @@ const ( func New(ctx *context.Context) *Template { sv := ctx.Semver rawVersionV := fmt.Sprintf("%d.%d.%d", sv.Major, sv.Minor, sv.Patch) + treeState := "clean" + if ctx.Git.Dirty { + treeState = "dirty" + } fields := map[string]interface{}{} for k, v := range map[string]interface{}{ @@ -101,6 +107,8 @@ func New(ctx *context.Context) *Template { commitTimestamp: ctx.Git.CommitDate.UTC().Unix(), gitURL: ctx.Git.URL, isGitDirty: ctx.Git.Dirty, + isGitClean: !ctx.Git.Dirty, + gitTreeState: treeState, env: ctx.Env, date: ctx.Date.UTC().Format(time.RFC3339), timestamp: ctx.Date.UTC().Unix(), @@ -205,6 +213,7 @@ func (t *Template) Apply(s string) (string, error) { "time": func(s string) string { return time.Now().UTC().Format(s) }, + "contains": strings.Contains, "tolower": strings.ToLower, "toupper": strings.ToUpper, "trim": strings.TrimSpace, diff --git a/goreleaser/int/tmpl/tmpl_test.go b/goreleaser/int/tmpl/tmpl_test.go index 619be25..3060123 100644 --- a/goreleaser/int/tmpl/tmpl_test.go +++ b/goreleaser/int/tmpl/tmpl_test.go @@ -92,6 +92,8 @@ func TestWithArtifact(t *testing.T) { "nightly false": `nightly {{.IsNightly}}`, "draft true": `draft {{.IsDraft}}`, "dirty true": `dirty {{.IsGitDirty}}`, + "clean false": `clean {{.IsGitClean}}`, + "state dirty": `state {{.GitTreeState}}`, "env bar: barrrrr": `env bar: {{ envOrDefault "BAR" "barrrrr" }}`, "env foo: bar": `env foo: {{ envOrDefault "FOO" "barrrrr" }}`, @@ -249,6 +251,11 @@ func TestFuncMap(t *testing.T) { Name: "tolower", Expected: "test", }, + { + Template: `{{ if contains "TEST_TEST_TEST" "TEST" }}it does{{else}}nope{{end}}`, + Name: "contains", + Expected: "it does", + }, { Template: `{{ trimprefix "v1.2.4" "v" }}`, Name: "trimprefix", diff --git a/goreleaser/pkg/config/config.go b/goreleaser/pkg/config/config.go index c6eb1d0..aa4097a 100644 --- a/goreleaser/pkg/config/config.go +++ b/goreleaser/pkg/config/config.go @@ -285,8 +285,8 @@ func (a NixDependency) JSONSchema() *jsonschema.Schema { reflector := jsonschema.Reflector{ ExpandedStruct: true, } - type t NixDependency - schema := reflector.Reflect(&t{}) + type nixDependencyAlias NixDependency + schema := reflector.Reflect(&nixDependencyAlias{}) return &jsonschema.Schema{ OneOf: []*jsonschema.Schema{ { @@ -317,8 +317,8 @@ func (a *NixDependency) UnmarshalYAML(unmarshal func(interface{}) error) error { } type Winget struct { - Name string `yaml:"name,omitempty" json:"name,omitempty"` - PackageIdentifier string `yaml:"package_identifier" json:"package_identifier"` + Name string `yaml:"name" json:"name"` + PackageIdentifier string `yaml:"package_identifier,omitempty" json:"package_identifier,omitempty"` Publisher string `yaml:"publisher" json:"publisher"` PublisherURL string `yaml:"publisher_url,omitempty" json:"publisher_url,omitempty"` PublisherSupportURL string `yaml:"publisher_support_url,omitempty" json:"publisher_support_url,omitempty"` @@ -536,7 +536,7 @@ type BuildDetailsOverride struct { } type BuildDetails struct { - Buildmode string `yaml:"buildmode,omitempty" json:"buildmode,omitempty"` + Buildmode string `yaml:"buildmode,omitempty" json:"buildmode,omitempty" jsonschema:"enum=c-archive,enum=c-shared,enum=,default="` Ldflags StringArray `yaml:"ldflags,omitempty" json:"ldflags,omitempty"` Tags FlagArray `yaml:"tags,omitempty" json:"tags,omitempty"` Flags FlagArray `yaml:"flags,omitempty" json:"flags,omitempty"` @@ -611,11 +611,11 @@ func (bh *Hook) UnmarshalYAML(unmarshal func(interface{}) error) error { } func (bh Hook) JSONSchema() *jsonschema.Schema { - type t Hook + type hookAlias Hook reflector := jsonschema.Reflector{ ExpandedStruct: true, } - schema := reflector.Reflect(&t{}) + schema := reflector.Reflect(&hookAlias{}) return &jsonschema.Schema{ OneOf: []*jsonschema.Schema{ { @@ -668,11 +668,11 @@ func (f *File) UnmarshalYAML(unmarshal func(interface{}) error) error { } func (f File) JSONSchema() *jsonschema.Schema { - type t File + type fileAlias File reflector := jsonschema.Reflector{ ExpandedStruct: true, } - schema := reflector.Reflect(&t{}) + schema := reflector.Reflect(&fileAlias{}) return &jsonschema.Schema{ OneOf: []*jsonschema.Schema{ { @@ -786,10 +786,17 @@ type NFPM struct { Description string `yaml:"description,omitempty" json:"description,omitempty"` License string `yaml:"license,omitempty" json:"license,omitempty"` Bindir string `yaml:"bindir,omitempty" json:"bindir,omitempty"` + Libdirs Libdirs `yaml:"libdirs,omitempty" json:"libdirs,omitempty"` Changelog string `yaml:"changelog,omitempty" json:"changelog,omitempty"` Meta bool `yaml:"meta,omitempty" json:"meta,omitempty"` // make package without binaries - only deps } +type Libdirs struct { + Header string `yaml:"header,omitempty" json:"header,omitempty"` + CArchive string `yaml:"carchive,omitempty" json:"carchive,omitempty"` + CShared string `yaml:"cshared,omitempty" json:"cshared,omitempty"` +} + // NFPMScripts is used to specify maintainer scripts. type NFPMScripts struct { PreInstall string `yaml:"preinstall,omitempty" json:"preinstall,omitempty"` @@ -1065,10 +1072,13 @@ type Filters struct { type Changelog struct { Filters Filters `yaml:"filters,omitempty" json:"filters,omitempty"` Sort string `yaml:"sort,omitempty" json:"sort,omitempty" jsonschema:"enum=asc,enum=desc,enum=,default="` - Skip string `yaml:"skip,omitempty" json:"skip,omitempty" jsonschema:"oneof_type=string;boolean"` // TODO(caarlos0): rename to Disable to match other pipes + Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"` Use string `yaml:"use,omitempty" json:"use,omitempty" jsonschema:"enum=git,enum=github,enum=github-native,enum=gitlab,default=git"` Groups []ChangelogGroup `yaml:"groups,omitempty" json:"groups,omitempty"` Abbrev int `yaml:"abbrev,omitempty" json:"abbrev,omitempty"` + + // Deprecated: use disable instead. + Skip string `yaml:"skip,omitempty" json:"skip,omitempty" jsonschema:"oneof_type=string;boolean,deprecated=true,description=use disable instead"` } // ChangelogGroup holds the grouping criteria for the changelog. @@ -1093,16 +1103,25 @@ type Before struct { // Blob contains config for GO CDK blob. type Blob struct { - Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty"` - Provider string `yaml:"provider,omitempty" json:"provider,omitempty"` - Region string `yaml:"region,omitempty" json:"region,omitempty"` - DisableSSL bool `yaml:"disableSSL,omitempty" json:"disableSSL,omitempty"` // nolint:tagliatelle // TODO(caarlos0): rename to disable_ssl - Folder string `yaml:"folder,omitempty" json:"folder,omitempty"` - KMSKey string `yaml:"kmskey,omitempty" json:"kmskey,omitempty"` - IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"` - Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty"` // used for minio for example - ExtraFiles []ExtraFile `yaml:"extra_files,omitempty" json:"extra_files,omitempty"` - Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"` + Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty"` + Provider string `yaml:"provider,omitempty" json:"provider,omitempty"` + Region string `yaml:"region,omitempty" json:"region,omitempty"` + DisableSSL bool `yaml:"disable_ssl,omitempty" json:"disable_ssl,omitempty"` + Folder string `yaml:"folder,omitempty" json:"folder,omitempty"` + KMSKey string `yaml:"kms_key,omitempty" json:"kms_key,omitempty"` + IDs []string `yaml:"ids,omitempty" json:"ids,omitempty"` + Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty"` // used for minio for example + ExtraFiles []ExtraFile `yaml:"extra_files,omitempty" json:"extra_files,omitempty"` + Disable string `yaml:"disable,omitempty" json:"disable,omitempty" jsonschema:"oneof_type=string;boolean"` + S3ForcePathStyle *bool `yaml:"s3_force_path_style,omitempty" json:"s3_force_path_style,omitempty"` + ACL string `yaml:"acl,omitempty" json:"acl,omitempty"` + CacheControl []string `yaml:"cache_control,omitempty" json:"cache_control,omitempty"` + ContentDisposition string `yaml:"content_disposition,omitempty" json:"content_disposition,omitempty"` + + // Deprecated: use disable_ssl instead + OldDisableSSL bool `yaml:"disableSSL,omitempty" json:"disableSSL,omitempty" jsonschema:"deprecated=true,description=use disable_ssl instead"` // nolint:tagliatelle + // Deprecated: use kms_key instead + OldKMSKey string `yaml:"kmskey,omitempty" json:"kmskey,omitempty" jsonschema:"deprecated=true,description=use kms_key instead"` } // Upload configuration. diff --git a/goreleaser/pkg/context/context.go b/goreleaser/pkg/context/context.go index 180bd2c..ccfae08 100644 --- a/goreleaser/pkg/context/context.go +++ b/goreleaser/pkg/context/context.go @@ -69,9 +69,18 @@ const ( TokenTypeGitea TokenType = "gitea" ) +type Action uint8 + +const ( + ActionNone Action = iota + ActionBuild + ActionRelease +) + // Context carries along some data through the pipes. type Context struct { stdctx.Context + Action Action Config config.Project Env Env Token string diff --git a/goreleaser/scripts/cmd_docs.sh b/goreleaser/scripts/cmd_docs.sh index a2f6303..bcaeae8 100755 --- a/goreleaser/scripts/cmd_docs.sh +++ b/goreleaser/scripts/cmd_docs.sh @@ -8,7 +8,6 @@ fi rm -rf www/docs/cmd/*.md go run . docs -go run . schema -o ./www/docs/static/schema.json "$SED" \ -i'' \ -e 's/SEE ALSO/See also/g' \ diff --git a/goreleaser/scripts/fury-upload.sh b/goreleaser/scripts/fury-upload.sh index 779bda4..2ddc46e 100755 --- a/goreleaser/scripts/fury-upload.sh +++ b/goreleaser/scripts/fury-upload.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [ "${1: -4}" == ".deb" ] || [ "${1: -4}" == ".rpm" ]; then cd dist diff --git a/goreleaser/scripts/get-releases.sh b/goreleaser/scripts/get-releases.sh index 029b9ea..ff7b7c8 100755 --- a/goreleaser/scripts/get-releases.sh +++ b/goreleaser/scripts/get-releases.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail get_last_page() { @@ -21,7 +21,7 @@ generate() { curl \ -H "Authorization: Bearer $GITHUB_TOKEN" \ -sSf "$url?page=$page" | - jq 'map({tag_name: .tag_name})' >"$tmp/$i.json" + jq 'map({tag_name: .tag_name})' >"$tmp/$i.json" done jq -s 'add' "$tmp"/*.json >"$file" diff --git a/goreleaser/scripts/pages/build.sh b/goreleaser/scripts/pages/build.sh index 7daaf0e..4b4182a 100755 --- a/goreleaser/scripts/pages/build.sh +++ b/goreleaser/scripts/pages/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail # unshallow (needed for the rss plugin) diff --git a/goreleaser/scripts/pre-commit.sh b/goreleaser/scripts/pre-commit.sh index 2c61702..1138f76 100755 --- a/goreleaser/scripts/pre-commit.sh +++ b/goreleaser/scripts/pre-commit.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash FILES=$(git diff --cached --name-only --diff-filter=ACMR) gofumpt -l -w . diff --git a/goreleaser/scripts/test.sh b/goreleaser/scripts/test.sh index f15cea0..2263fb5 100755 --- a/goreleaser/scripts/test.sh +++ b/goreleaser/scripts/test.sh @@ -1,9 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash set -o pipefail && TEST_OPTIONS="-json" task test | tee output.json | tparse -follow success=$? set -e -NO_COLOR=1 tparse -format markdown -slow 10 -file output.json > $GITHUB_STEP_SUMMARY +NO_COLOR=1 tparse -format markdown -slow 10 -file output.json >$GITHUB_STEP_SUMMARY exit $success diff --git a/goreleaser/www/README.md b/goreleaser/www/README.md index 463757e..c729ce9 100644 --- a/goreleaser/www/README.md +++ b/goreleaser/www/README.md @@ -7,15 +7,31 @@ To iterate with documentation, therefore, it is recommended to run the mkdocs se ## Prerequisites -- [Get Docker](https://docs.docker.com/get-docker/) - [Get Task](https://taskfile.dev/installation/) +- [Get MkDocs](https://www.mkdocs.org/user-guide/installation/) + - [Get MkDocs Material](https://squidfunk.github.io/mkdocs-material/getting-started/#installation) + - [Get MkDocs Redirect](https://github.com/mkdocs/mkdocs-redirects#installing) + - [Get MkDocs Minify](https://github.com/byrnereese/mkdocs-minify-plugin#setup) + - [Get MkDocs Include Markdown](https://github.com/mondeja/mkdocs-include-markdown-plugin#installation) + - [Get MkDocs RSS](https://github.com/guts/mkdocs-rss-plugin#installation) -### NOTE to M1/M2 mac owners +### With nix -If running on an arm64-based mac (M1 or M2, aka "Applie Silicon"), you may find this method quite slow. Until -multiarch docker images can be built and made available, you may wish to build your own via: +If you have nix installed, you can: ```bash -git clone git@github.com:squidfunk/mkdocs-material.git -docker build -t docker.io/squidfunk/mkdocs-material . +nix develop .#docs ``` + +To drop into a shell with all the needed dependencies. + +## Edit the docs + +After installing mkdocs and extensions, build and run the documentation locally: + +```sh +task docs:serve +``` + +The site will soon be available at http://localhost:8000 and +auto-update after changes. diff --git a/goreleaser/www/docker/Dockerfile b/goreleaser/www/docker/Dockerfile deleted file mode 100644 index cd0ae93..0000000 --- a/goreleaser/www/docker/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM squidfunk/mkdocs-material -RUN pip install mkdocs-include-markdown-plugin mkdocs-rss-plugin diff --git a/goreleaser/www/docs/blog/.authors.yml b/goreleaser/www/docs/blog/.authors.yml index abda921..f7bbc03 100644 --- a/goreleaser/www/docs/blog/.authors.yml +++ b/goreleaser/www/docs/blog/.authors.yml @@ -11,4 +11,11 @@ authors: name: Furkan Turkal description: Author avatar: https://avatars.githubusercontent.com/u/16493751 - + dirien: + name: Engin Diri + description: Author + avatar: https://avatars.githubusercontent.com/u/38325136 + hariso: + name: Haris Osmanagić + description: Author + avatar: https://avatars.githubusercontent.com/u/2166300 diff --git a/goreleaser/www/docs/blog/posts/2021-12-21-goreleaser-v1.2.md b/goreleaser/www/docs/blog/posts/2021-12-21-goreleaser-v1.2.md index f6d5aaa..aa82cc1 100644 --- a/goreleaser/www/docs/blog/posts/2021-12-21-goreleaser-v1.2.md +++ b/goreleaser/www/docs/blog/posts/2021-12-21-goreleaser-v1.2.md @@ -45,7 +45,7 @@ Here's to safer internet in the future! ### **Houston, we have a blog!** -We now have an official [blog](https://blog.goreleaser.com)! +We now have an official [blog](https://goreleaser.com/blog)! Before I was [posting everything here in my personal blog](https://carlosbecker.com/tags/goreleaser/), and will likely still post some things here, but here the idea is to collaborate with all GoReleaser contributors to post news in the _official blog_. diff --git a/goreleaser/www/docs/blog/posts/2022-01-23-docker-manifests.md b/goreleaser/www/docs/blog/posts/2022-01-23-docker-manifests.md new file mode 100644 index 0000000..6cbeae7 --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-01-23-docker-manifests.md @@ -0,0 +1,116 @@ +--- +date: 2022-01-23 +slug: docker-manifests +categories: + - tutorials +authors: + - dirien +--- + +# GoReleaser and Docker Manifests + +Let's see how to create Docker manifests with GoReleaser. + + + +### Question: + +Did you know, that you can create Docker Manifest Layer with GoReleaser? + +### No? + +In this article we will see what Docker Manifests are and how can use them in +GoReleaser to delivery multi-arch builds under one single tag. + +But let us start, with the idea behind Docker Image Manifest. + +## What are Docker Image Manifests? + +![Image Manifests](https://cdn-images-1.medium.com/max/2000/0*RgP9-e82VIkjmt0e.png) +_[Source](https://ownyourbits.com/2019/05/13/building-docker-containers-in-2019/)_ + +A Docker manifests describe all the layers inside an image. +And with the help of the manifest we can exact compare two images, independent +from their actual human-readable tag. + +Manifests are expressed in JSON and contain all the information about the +different image layers and the architectures. + +Docker uses then the manifests to work out if an image is compatible with the +current device architecture. +And then uses this particular informations to determine on how to start new +containers. + +Currently the +[manifest schema](https://docs.docker.com/registry/spec/manifest-v2-2) +is at version 2. + +A manifest file will declare its schema version and then a list of manifest +entries available for the image. +The entries will then point to a different variation of the image, such as +**amd64** and **arm64**. + +You can easily view the image manifest using the docker manifest inspect +command. + +This works fine with local images or images stored in a remote registry. + +```bash +docker manifest inspect : +``` + +![Example output of the docker manifest inspect command](https://cdn-images-1.medium.com/max/9488/1*Ek2pxYKtqs73ORRXg4c8zw.png) +_Example output of the docker manifest inspect command_ + +## Multi-Arch Builds and Manifests + +For a long time Docker did not support multiple image architectures. +You could only run images with the same architecture as they where build for. +With the rise of ARM-based machines this was really a limiting factor. + +But with manifests, developers can now support multiple architectures under one +single image tag. +The Docker client itself picks the underlying image version for its particular +platform. +Great and simple! + +**Keep in mind**: There should be no changes, other the target architecture or +operating system in the images. +Do not deliver images with completely different functionality under the same +tag. + +You can read more about docker manifests here: +[https://docs.docker.com/engine/reference/commandline/manifest/](https://docs.docker.com/engine/reference/commandline/manifest/) + +> On side note: docker manifest is still an experimental feature and needs to be +> activated in your Docker client. + +## GoReleaser + +Now that you know what Docker manifest are, we can give GoReleaser the task of +the heavy lifting and let it create the Docker manifest as part of our release +process. + +All you need to do is to add the `docker_manifests` to your `.goreleaser.yaml`. +The most important part is to map `name_template` to the `image_templates` you +created in the `dockers` step. + +![Example snippet of a gorelaser.yaml](https://cdn-images-1.medium.com/max/3518/1*j3i3LEhI9puKJQuYmYJ_Pw.png) +_Example snippet of a `.gorelaser.yaml`_ + +There are some additional flags you can set, e.g. if you have a self-hosted +Docker registry with self-signed certificates, you can pass the insecure flag. + +Check out the official GoReleaser documentation +[https://goreleaser.com/customization/docker_manifest/](https://goreleaser.com/customization/docker_manifest/) +for an in-depth overview. + +## Summary + +With GoReleaser its a breeze to create Docker manifest for your multi arch +builds. +Go try it out! + +![](https://cdn-images-1.medium.com/max/2000/0*2blEBypJ9QRvqDsm.jpg) + +[https://goreleaser.com/](https://goreleaser.com/customization/docker_manifest/) diff --git a/goreleaser/www/docs/blog/posts/2022-02-05-cloud-native-storage.md b/goreleaser/www/docs/blog/posts/2022-02-05-cloud-native-storage.md new file mode 100644 index 0000000..423eb0a --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-02-05-cloud-native-storage.md @@ -0,0 +1,316 @@ +--- +date: 2022-02-05 +slug: cloud-native-storage +categories: + - tutorials +authors: + - dirien +--- + +# How to use GoReleaser with Cloud Native Storage + +In this tutorial, I want to describe, how quickly we can deploy our release +artefacts to a cloud native storage when using GoReleaser. +It’s just a few additional lines in your `.goreleaser.yaml`. + + + +To better show this, I created a little demo and use the storage services of the +big three cloud providers: Azure Blob Storage, AWS S3 and Google Cloud Storage. + +![](https://cdn-images-1.medium.com/max/2000/1*4kvgGvBM9--v2rS7nO5c1g.png) + +You can use any S3 compatible storage provider too. +**GoReleaser** support this too! The most prominent (self-hosted) solution is +**MinIO**. + +![](https://cdn-images-1.medium.com/max/4802/1*SH5PQKBDEB0M8mAY7EONeQ.png) + +## The infrastructure code + +I created a very simple **Terraform** deployment to provision on all three cloud +provider their appropriate cloud storage service. +It’s a demo, why not? + +You don’t need to use **Terraform** for this, you could use any other means like +**Pulumi**, **CLI** or even the **UI**. + +###### `main.tf` + +```terraform +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "4.9.0" + } + azurerm = { + source = "hashicorp/azurerm" + version = "2.94.0" + } + aws = { + source = "hashicorp/aws" + version = "3.74.0" + } + } +} + +provider "azurerm" { + features {} +} + +provider "google" { + credentials = file(var.gcp_auth_file) + project = var.gcp_project + region = var.gcp_region +} + +provider "aws" { + region = var.aws_region +} +``` + +###### `variables.tf` + +```terraform +variable "gcp_project" { + type = string +} + +variable "gcp_region" { + default = "europe-west6" +} + +variable "gcp_zone" { + default = "europe-west6-a" +} + +variable "gcp_bucket_location" { + default = "EU" +} + +variable "gcp_auth_file" { + default = "./auth.json" + description = "Path to the GCP auth file" +} + +variable "aws_region" { + default = "eu-central-1" +} + +variable "azure_location" { + default = "West Europe" +} + +variable "name" { + default = "gorleaser-quickbites" +} +``` + +###### `blob.tf` + +```terraform +resource "google_storage_bucket" "goreleaser-gcp-storage-bucket" { + name = var.name + location = var.gcp_bucket_location + force_destroy = true + uniform_bucket_level_access = false +} +resource "google_storage_bucket_access_control" "goreleaser-gcp-storage-bucket-access-control" { + bucket = google_storage_bucket.goreleaser-gcp-storage-bucket.name + role = "READER" + entity = "allUsers" +} + +resource "azurerm_resource_group" "goreleaser-azure-resource-group" { + name = var.name + location = var.azure_location +} + +resource "azurerm_storage_account" "goreleaser-azure-storage-account" { + name = "gorleaserquickbites" + resource_group_name = azurerm_resource_group.goreleaser-azure-resource-group.name + location = azurerm_resource_group.goreleaser-azure-resource-group.location + account_tier = "Standard" + account_replication_type = "LRS" + allow_blob_public_access = true + network_rules { + default_action = "Allow" + } +} + +resource "azurerm_storage_container" "goreleaser-storage-container" { + name = var.name + storage_account_name = azurerm_storage_account.goreleaser-azure-storage-account.name + container_access_type = "container" +} + +resource "aws_s3_bucket" "goreleaser-s3-bucket" { + bucket = var.name + acl = "public-read" +} +``` + +###### Apply the Terraform script: + +```bash +terraform apply -var "gcp_project=xxx" +``` + +``` +... +azurerm_storage_container.goreleaser-storage-container: Creation complete after 0s [id=https://gorleaserquickbites.blob.core.windows.net/gorleaser-quickbites] + +Apply complete! Resources: 6 added, 0 changed, 0 destroyed. + +Outputs: + +aws-s3-bucket-name = "gorleaser-quickbites" +azure-storage-account-key = +azure-storage-account-name = "export AZURE_STORAGE_ACCOUNT=gorleaserquickbites" +gcp-bucket-url = "gs://gorleaser-quickbites" +``` + +###### Run this command + +```bash +terraform output azure-storage-account-key +``` + +to get the Azure Storage Account Key, as it is a output field with sensitive data in it. + +```bash +export AZURE_STORAGE_KEY=xxxx +``` + +Now we can add in our `.goreleaser.yaml` the new **blobs** field. +Important is here to set the right provider: **gs** (for Google Cloud Storage), +**azblob** (for Azure Blob) and **s3** (for AWS S3 or compatible provider)! + +```yaml +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + +release: + disable: true +--- +blobs: + - provider: gs + bucket: gorleaser-quickbites + - provider: azblob + bucket: gorleaser-quickbites + - provider: s3 + bucket: gorleaser-quickbites + region: eu-central-1 +``` + +In this demo, I disabled the **release **section, as I don’t want to upload to +GitHub. + +## Authentication + +In terms of authentication the GoReleaser’s blob pipe authentication varies depending upon the blob provider as mentioned below: + +### S3 Provider + +S3 provider support AWS [default credential +provider](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials) +chain in the following order: + +- Environment variables. +- Shared credentials file. +- If your application is running on an Amazon EC2 instance, IAM role for Amazon EC2. + +### Azure Blob Provider Currently it supports authentication only + +with [environment variables](https://docs.microsoft.com/en-us/azure/storage/common/storage-azure-cli#set-default-azure-storage-account-environment-variables): + +- AZURE_STORAGE_ACCOUNT +- AZURE_STORAGE_KEY or AZURE_STORAGE_SAS_TOKEN + +### GCS + +Provider GCS provider uses [Application Default +Credentials](https://cloud.google.com/docs/authentication/production) in the +following order: + +- Environment Variable (GOOGLE_APPLICATION_CREDENTIALS) +- Default Service Account from the compute instance (Compute Engine, Kubernetes + Engine, Cloud function etc). + +## Run GoReleaser + +After configuring we can finally execute **GoReleaser**, in your pipeline code +via the command: + +```bash +goreleaser release --rm-dist +``` + +If everything went smooth, you should see a similar output, showing the upload of your artefacts. + +``` + ... + • publishing + • blobs + • uploading path=quick-bites/0.1/quick-bites_0.1_checksums.txt + • uploading path=quick-bites/0.1/quick-bites_0.1_darwin_amd64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_arm64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_darwin_arm64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_amd64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_386.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_checksums.txt + • uploading path=quick-bites/0.1/quick-bites_0.1_checksums.txt + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_386.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_amd64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_arm64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_amd64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_darwin_amd64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_darwin_arm64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_386.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_linux_arm64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_darwin_arm64.tar.gz + • uploading path=quick-bites/0.1/quick-bites_0.1_darwin_amd64.tar.gz + • release succeeded after 22.63s + ... +``` + +> One note: The provider fails silently, if your credentials are wrong. You +> would still see uploading and release succeeded. Keep this in mind, if the +> files are not appearing in the UI. I wasted some time on this. The culprit is +> the underlying library GoReleaser is using. + +Let’s check in the consoles of the cloud provider too, If the files are present. + +###### Google Cloud Storage: + +![Google Cloud Storage](https://cdn-images-1.medium.com/max/2468/1*OHPaMIOK2YP7HsdgXEPpSw.png) + +###### Azure Blob Storage + +![Azure Blob Storage](https://cdn-images-1.medium.com/max/2792/1*K0BMoKe2qH29YHCOtZ8e9A.png) + +###### AWS S3 + +![AWS S3](https://cdn-images-1.medium.com/max/2868/1*mvgyZMWtZseRabusw_R4Dg.png) + +Looks very good! Now you can share the URLs of the files for further use! + +## Want more Informations? + +If you want to know more about some advanced options, feel free to check out the +[official documentation about the blob support in +GoReleaser](https://goreleaser.com/customization/blob/) + +And here is the example code: [dirien/quick-bytes](https://github.com/dirien/quick-bites/tree/main/goreleaser-blob) + +![Have fun](https://cdn-images-1.medium.com/max/2000/0*kbicxfar7Vo9rUon.jpg) diff --git a/goreleaser/www/docs/blog/posts/2022-02-20-azure-devops.md b/goreleaser/www/docs/blog/posts/2022-02-20-azure-devops.md new file mode 100644 index 0000000..89964fc --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-02-20-azure-devops.md @@ -0,0 +1,401 @@ +--- +date: 2022-02-20 +slug: azure-devops +categories: + - tutorials +authors: + - dirien +--- + +# Use GoReleaser With Azure DevOps + +In this blog article, I want to show how to use **GoReleaser** in **Azure DevOps**. + + + +![](https://cdn-images-1.medium.com/max/2000/1*hAK9NMa-YbSnTQdSEoX7Gw.png) + +In this blog article, I want to show how to use **GoReleaser** in **Azure +DevOps**. + +### But why? Are not everyone using GitHub? + +Exactly, not everyone is using GitHub. Actually, there are many companies who +use the Azure Cloud with **Azure DevOps**. + +## What is Azure DevOps? + +**Azure DevOps** provides developer services for allowing teams to plan work, +collaborate on code development, and build and deploy applications. + +**Azure DevOps** provides integrated features that you can access through your +web browser or IDE client. You can use one or more of the following standalone +services based on your business needs: + +- **Azure Repos** provides Git repositories. +- **Azure Pipelines** provides build and release services to support continuous + integration and delivery of your applications. +- **Azure Boards** delivers a suite of Agile tools to support planning and + tracking work, code defects, and issues using Kanban and Scrum methods. +- **Azure Test Plans** provides several tools to test your apps, including + manual/exploratory testing and continuous testing. +- **Azure Artifacts** allows teams to share packages such as Maven, npm, NuGet, + and more from public and private sources and integrate package sharing into your + pipelines. + +## Install GoReleaser Via The Marketplace + +![](https://cdn-images-1.medium.com/max/4144/1*NCY5i6iCEPW5ZpNhYeB6Jg.png) + +**GoReleaser** offers a [Plugin via the +Marketplace](https://marketplace.visualstudio.com/items?itemName=GoReleaser.goreleaser). +The installation itself is done via some clicks in the UI and you are ready to +start! + +In your pipeline editor you can lookup the task: + +![](https://cdn-images-1.medium.com/max/2000/1*U-zVyao5qwgjfzTcGHgSJA.png) + +And quickly change the default settings to fit with your use case! +For example set a specific version or execute certain **GoReleaser** commands. + +See the official docs for more details +[https://github.com/goreleaser/goreleaser-azure-devops-extension](https://github.com/goreleaser/goreleaser-azure-devops-extension) + +![](https://cdn-images-1.medium.com/max/2000/1*Aqtx-0KvADotNmeX7X1HTQ.png) + +## Finally The Demo! + +```go +package main + +import ( + "fmt" +) + +var ( + version = "0.0.1" + commit = "none" + date = "none" + builtBy = "none" +) + +func main() { + fmt.Println("Version:\t", version) + fmt.Println("Commit:\t\t", commit) + fmt.Println("Date:\t\t", date) + fmt.Println("Built by:\t", builtBy) +} +``` + +Before we head over to the configure the pipeline, let us create the +`.goreleaser.yaml` + +```yaml +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goarch: + - amd64 + - arm64 + goos: + - linux + - darwin + +project_name: goreleaser-ado + +checksum: + name_template: "checksums.txt" + +snapshot: + name_template: "{{ incpatch .Version }}-next" + +source: + enabled: true + +release: + disable: true + +sboms: + - artifacts: archive + - id: source + artifacts: source + +signs: + - cmd: cosign + certificate: "${artifact}.pem" + args: + - sign-blob + - "-key=cosign.key" + - "--output-certificate=${certificate}" + - "--output-signature=${signature}" + - "${artifact}" + artifacts: checksum + output: true + stdin: "{{ .Env.COSIGN_PASSWORD }}" + +docker_signs: + - cmd: cosign + artifacts: images + output: true + args: + - "sign" + - "-key=cosign.key" + - "${artifact}" + stdin: "{{ .Env.COSIGN_PASSWORD }}" + +dockers: + - image_templates: ["dirien/{{ .ProjectName }}:{{ .Version }}-amd64"] + goarch: amd64 + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - --platform=linux/amd64 + - image_templates: ["dirien/{{ .ProjectName }}:{{ .Version }}-arm64"] + goarch: arm64 + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - --platform=linux/arm64/v8 + +docker_manifests: + - name_template: "dirien/{{ .ProjectName }}:{{ .Version }}" + image_templates: + - "dirien/{{ .ProjectName }}:{{ .Version }}-amd64" + - "dirien/{{ .ProjectName }}:{{ .Version }}-arm64" + - name_template: "dirien/{{ .ProjectName }}:latest" + image_templates: + - "dirien/{{ .ProjectName }}:{{ .Version }}-amd64" + - "dirien/{{ .ProjectName }}:{{ .Version }}-arm64" +``` + +Here, we going to create **linux** and **darwin** binary, the corresponding +container, create the SBoM with syft and sign everything via cosign. + +> Here is one first important steps: you need to disable the **release** step in +> GoReleaser. +> Azure DevOps does not work the same way as GitHub what releases concerns. +> We handle the upload of the artefacts differently. + +If you need more infos, for the different settings and possibilities inside +**GoReleaser**, head over to the official documentation +[https://goreleaser.com/intro/](https://goreleaser.com/intro/) + +### Service + +Connection in Azure DevOps As we going to upload the image to Docker Hub, we +need to create in **Azure Devops** the Service Connection. + +Go to **Project Settings** and click **Service connections**: +![](https://cdn-images-1.medium.com/max/2000/1*QDD9dVR5ZYUtm4qh5Izy2w.png) +![](https://cdn-images-1.medium.com/max/2000/1*PMGoYUHoda1bVumVGW1Fow.png) + +Choose **Docker Registry**: +![](https://cdn-images-1.medium.com/max/2000/1*JmkHy2p5pjhc7llWCHjChw.png) + +In the detail view, select **Docker Hub **and then enter your details, like +**Docker ID**, **Docker Password** and the **Service Connection Name**: +![](https://cdn-images-1.medium.com/max/2000/1*WCT6xaaNtoT6Y-Ws7-0qOQ.png) + +Click **Verify and save**, we will come back to the service connection in our +Pipeline code. + +### The Azure Pipeline File + +Now starts the fun part, the creation of the actual Azure Pipeline. +If you are completely new to **Azure DevOps** pipeline, I highly suggest to +checkout the +[docs](https://docs.microsoft.com/en-us/azure/devops/pipelines/create-first-pipeline?view=azure-devops&tabs=java%2Ctfs-2018-2%2Cbrowser) +from Microsoft. + +In our example, we going to write the pipeline only as code (there is a +deprecated UI only option too! But meh!). + +Azure Pipeline are written in **yaml.** + +```yaml +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +pr: + branches: + include: + - main + +trigger: + tags: + include: + - "*" + branches: + include: + - "*" + +jobs: + - job: build + pool: + vmImage: ubuntu-latest + steps: + - task: GoTool@0 + displayName: "Install Go" + inputs: + version: "1.17" + - task: CmdLine@2 + displayName: "Build and Test" + inputs: + script: | + go mod tidy + go build . + - job: release + dependsOn: build + displayName: Release via GoReleaser + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + variables: + - group: cosign + pool: + vmImage: ubuntu-latest + steps: + - task: GoTool@0 + displayName: "Install Go" + inputs: + version: "1.17" + - task: CmdLine@2 + displayName: "Install Syft" + inputs: + script: | + curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin + - task: CmdLine@2 + displayName: "Install cosign" + inputs: + script: | + curl -sLO https://github.com/sigstore/cosign/releases/download/v1.5.2/cosign-linux-amd64 + chmod +x cosign-linux-amd64 + mv cosign-linux-amd64 /usr/local/bin/cosign + - task: Docker@2 + inputs: + containerRegistry: "dirien-docker-hub" + command: "login" + addPipelineData: false + addBaseImageData: false + - task: goreleaser@0 + inputs: + version: "latest" + distribution: "goreleaser" + args: "release --rm-dist" + + - task: CopyFiles@2 + displayName: "Copy GoReleaser dist folder to ArtifactStagingDirectory" + inputs: + Contents: | + dist/*.tar.gz + dist/*.zip + dist/*.txt + dist/*.sbom + dist/*.sig + cosign.pub + TargetFolder: "$(Build.ArtifactStagingDirectory)" + CleanTargetFolder: true + OverWrite: true + flattenFolders: true + + - task: PublishBuildArtifacts@1 + displayName: "Publish GoReleaser release artifacts" + inputs: + ArtifactName: "GoReleaser release" +``` + +The pipeline consist of two different jobs parts: + +- the **build** job, run every time something changes on any branch or when a + pull request gets created. Here we can run our tests, linting, SAST to get + quickly feedback. +- the **release** job, will run only when a git tag gets created (see the + condition tag under the job tag). Creating a git tag is part of the release + process. Similar as we do in the GitHub Flow. + +During the release job, we download [Anchore +syft](https://github.com/anchore/syft) and +[cosign](https://github.com/sigstore/cosign) as we going to need them during the +**gorleaser** task. +Currently there is no native task for this in **Azure DevOps**. We just use the +**CmdLine** task and curl the binaries. + +![](https://cdn-images-1.medium.com/max/2496/1*O01UvqQCv8255Kj9JEvxiw.png) + +It is also important to log into your **Docker Hub** account, via the **Service +Connection** we created earlier. +The **Docker** task takes care of the actual login. + +![](https://cdn-images-1.medium.com/max/2000/1*_uMeZymqEJ0Xqq64OP_UXA.png) + +Now we can call our **GoReleaser** task. + +![](https://cdn-images-1.medium.com/max/2000/1*blEbdGwd8PXZ9ExCScfYtw.png) + +### Azure Pipeline Secret Library + +For cosign, I use a password, I stored in the Azure Pipeline Library as secret +variable. + +![](https://cdn-images-1.medium.com/max/4028/1*ioSS8X6yT4qFNQrCrQbAYA.png) + +In my pipeline code, I will pass this value as environment variable via the +variables tag. + +![](https://cdn-images-1.medium.com/max/2000/1*CTox6hgrOCgaTs9AFJWUhQ.png) + +In this demo, I am going to publish the release artefacts as build artefacts. + +![](https://cdn-images-1.medium.com/max/2244/1*nwH4Ej9GbQ6RdE_MfYMelw.png) + +The task **CopyFiles** collects some files from the **dist** folder and the +cosign public key and **PublishBuildArtifacts** publish them. +You will find the artefacts on the pipeline detail + +![](https://cdn-images-1.medium.com/max/2000/1*GWCiLGBnHOnCjyRuqrPEEw.png) + +![](https://cdn-images-1.medium.com/max/4220/1*MLeku1FpKCFMv7bfNvu_eA.png) + +Of course, you can use other targets too, like a cloud native storage. + +You can check out the +[How to use GoReleaser with Cloud Native Storage](/blog/cloud-native-storage) +post for more details on this subject + +### Release the kraken äh app! + +Head over to **tags** menu and create a new tag in the UI + +![](https://cdn-images-1.medium.com/max/2000/1*zIYaYhDk1rSpd5_si5mHIA.png) + +![](https://cdn-images-1.medium.com/max/4472/1*Zaq4EUjn3egC5_3VLVQA5Q.png) + +Your pipeline should immediately start to run: + +![](https://cdn-images-1.medium.com/max/5528/1*h5YYGAPjIXrcympI01H9yA.png) + +And both jobs should run: + +![](https://cdn-images-1.medium.com/max/5592/1*TawbQohuoGdG4sO9xo0YLw.png) + +![](https://cdn-images-1.medium.com/max/2000/0*GY5jcM6UErG39iF2.jpg) + +And this is pretty much all of it! As I promised, very easy and straight forward +we can implement **GoReleaser** in **Azure DevOps**, similar we would use it in +GitHub + +![](https://cdn-images-1.medium.com/max/2560/0*1ZhRSdH-Se88gOdj.jpg) + +### Caveat: + +- I use in cosign not the + [keyless](https://github.com/sigstore/cosign/blob/main/KEYLESS.md) approach, as + I am not sure that it will work for **Azure DevOps**. So I generated a keypair + and committed the public and private key into the repository. diff --git a/goreleaser/www/docs/blog/posts/2022-03-07-homebrew-gofish.md b/goreleaser/www/docs/blog/posts/2022-03-07-homebrew-gofish.md new file mode 100644 index 0000000..301d6cd --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-03-07-homebrew-gofish.md @@ -0,0 +1,133 @@ +--- +date: 2022-03-07 +slug: homebrew-gofish +categories: + - tutorials +authors: + - dirien +--- + +# GoReleaser: How To Distribute Your Binaries With Homebrew Or GoFish + +This article is going to be a quick bite (or drink)! We going to discover, how +fast we can create a **Homebrew** or **GoFish** deployment of our binaries with +the help of **GoReleaser**. + + + +But first, let us take a look into the concepts of the two package managers: + +### **Homebrew **🍺 + +> The Missing Package Manager for macOS (or Linux) + +This statement is not from me, but from the official +[Homebrew](https://brew.sh/) website. **Homebrew** is similar to other package +managers, like [apt-get](https://wiki.debian.org/apt-get), +[aptitude](https://wiki.debian.org/Aptitude), or +[dpkg](https://wiki.debian.org/dpkg). I will not go in this article into the +details about **Homebrew**, but some terms are important to understand, as we +going to use them in our `.goreleaser.yaml` file: + +**Tap:** A Git repository of packages. + +**Formula**: A software package. When we want to install new programs or +libraries, we install a formula. + +### GoFish 🐠 + +> GoFish, the Package Manager 🐠 + +[GoFish](https://gofi.sh/) is a cross-platform systems package manager, bringing +the ease of use of Homebrew to Linux and Windows. Same as with **Homebrew**, I +am not going into detail of **GoFish** but we need also here some understanding +of the **GoFish** terminology: + +**Rig:** A git repository containing fish food. + +**Food:** The package definition + +### The example code + +For each package manager, you should create its own GitHub repository. You can +name it as you please, but i prefer to add the meaning of the repository. + +- **goreleaser-rig** for GoFish +- **goreleaser-tap** for Homebrew + +Add following snippet for **GoFish** support, to your existing +`.goreleaser.yaml`: + +```yaml +rigs: + - rig: + owner: dirien + name: goreleaser-rig + homepage: "https://github.com/dirien/quick-bites" + description: "Different type of projects, not big enough to warrant a separate repo." + license: "Apache License 2.0" +``` + +And for **Homebrew**, add this little snippet: + +```yaml +brews: + - tap: + owner: dirien + name: goreleaser-tap + folder: Formula + homepage: "https://github.com/dirien/quick-bites" + description: "Different type of projects, not big enough to warrant a separate repo." + license: "Apache License 2.0" +``` + +That’s all for now, and as usual with GoReleaser you can head over to the great +documentation for more advanced settings: + +> [https://goreleaser.com](https://goreleaser.com/intro/) + +Now run the release process and you will see this in your logs: + +``` + • homebrew tap formula + • pushing formula=Formula/goreleaser-brew-fish.rb repo=dirien/goreleaser-tap + • gofish fish food cookbook + • pushing food=Food/goreleaser-brew-fish.lua repo=dirien/goreleaser-rig +``` + +Perfect! Everything works as expected. + +We can check the content on the GitHub UI. + +![](https://cdn-images-1.medium.com/max/5964/1*O2zfXri4yrmo_GN3clczow.png) + +![](https://cdn-images-1.medium.com/max/6020/1*1TVV84tYM1staeDcifH7tw.png) + +### Installation + +Now we can add the tap and the rig on our clients + +**Homebrew** + +```bash +brew tap dirien/goreleaser-tap +brew install goreleaser-brew-fish +``` + +**GoFish** + +```bash +gofish rig add https://github.com/dirien/goreleaser-rig +gofish install github.com/dirien/goreleaser-rig/goreleaser-brew-fish +``` + +### The End + +Now you can distribute this tap or rig repositories and everybody can install your projects via this package manager. + +![](https://cdn-images-1.medium.com/max/2560/0*prjIhehAsUYTBaLx.jpg) + +### The Code + +You can find the demo code in my repository, to see some more details: +[dirien/quick-bites](https://github.com/dirien/quick-bites/tree/main/goreleaser-brew-fish). diff --git a/goreleaser/www/docs/blog/posts/2022-03-26-reproducible-builds.md b/goreleaser/www/docs/blog/posts/2022-03-26-reproducible-builds.md new file mode 100644 index 0000000..2143948 --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-03-26-reproducible-builds.md @@ -0,0 +1,68 @@ +--- +date: 2022-03-26 +slug: reproducible-builds +categories: + - tutorials +authors: + - caarlos0 +--- + +# Reproducible Builds + +GoReleaser can help you, to some extent, to have reproducible builds. + +![](https://carlosbecker.com/posts/goreleaser-reproducible-buids/c4824165-c6e2-40df-b4b5-8abe443195ce.png) + + + +## **What are reproducible builds?** + +According to [Reproducible-Builds.org](https://reproducible-builds.org/docs/definition/): + +> A build is reproducible if given the same source code, build environment and build instructions, any party can recreate bit-by-bit identical copies of all specified artifacts. + +So, things we need to pay attention here are: + +- the source is the same +- the dependencies are the same, in the same versions +- `chtimes` are the same +- build path is the same +- any other tools needed to compile must be the same, in the same versions + +While this might sound complicated, rest assured GoReleaser can help you with most of these items! + +## **Reproducible Builds with GoReleaser** + +GoReleaser will by default inject a `ldflag` with the current timestamp as `main.date`, which you can use to display build time information. We will want to change that to use some fixed date, for instance, the date of the commit being built. + +To avoid changes from one machine to another, we will also want to use `-trimpath`. + +Finally, we'll want to make sure the repo code haven't changed, e.g., when building a tag, we want to make sure it wasn't deleted and pushed again (i.e., moved). + +We can achieve that with a config that looks like this: + +```yaml +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + goarch: + - amd64 + - arm64 + mod_timestamp: "{{ .CommitTimestamp }}" + flags: + - -trimpath + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} + +gomod: + proxy: true +``` + +From now on, we basically only need to ensure the Go version is the same. + +That's out of the scope of GoReleaser's scope, but easy enough to do in GitHub Actions by pinning to a specific version of Go. + +So, there you have it: reproducible Go binary builds with GoReleaser! diff --git a/goreleaser/www/docs/blog/posts/2022-03-28-supply-chain-sec.md b/goreleaser/www/docs/blog/posts/2022-03-28-supply-chain-sec.md new file mode 100644 index 0000000..5943a99 --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-03-28-supply-chain-sec.md @@ -0,0 +1,189 @@ +--- +date: 2022-03-28 +slug: supply-chain-security +categories: + - tutorials +authors: + - developerguy +--- + +# GoReleaser And Software Supply Chain Security + +Before talking about the security of the software supply chains, we should mention what should come to our minds first when we are talking about software supply chains. +In most basic terms, you can think of **software supply chains are anything that's needed to deliver your product — including all the components you use**, for example, **your codebase**, **packages**, ** libs, your CI/CD pipeline**, **third-party services you use**, **anything that goes into or affects your code from development to gets deployed into production systems.** + + + +![[https://security.googleblog.com/2021/06/introducing-slsa-end-to-end-framework.html](https://security.googleblog.com/2021/06/introducing-slsa-end-to-end-framework.html)](https://cdn-images-1.medium.com/max/2000/1*fYWJfKAY5tdAvTMJnbsQPQ.png)[https://security.googleblog.com/2021/06/introducing-slsa-end-to-end-framework.html](https://security.googleblog.com/2021/06/introducing-slsa-end-to-end-framework.html) + +The picture above, taken from [SLSA (Supply Chain Levels for Software +Artifacts)](https://slsa.dev), **is a security framework**, **a check-list of +standards and controls** to **prevent tampering**, **improve the integrity**, +and secure packages and infrastructure in your projects, businesses, or enterprises, shows us the importance of protecting our workflows that delivers software we built to the customer because there are many places that attackers can attack and gain access to our system. + +Unfortunately, the **new threats** in software development are not only related to the specific company itself. Thanks to [CNCF Security Technical Advisory Group](https://github.com/cncf/tag-security), they made a repository to list all the companies' compromises against supply chain attacks. Trends show that [supply chain attacks are increasing](https://www.sonatype.com/hubfs/Q3%202021-State%20of%20the%20Software%20Supply%20Chain-Report/SSSC-Report-2021_0913_PM_2.pdf?hsLang=en-us) at an **exponential rate of 4–5x per year**, with several thousand last year, the most common being related to dependency confusion or [typosquatting](https://sysdig.com/blog/malicious-python-libraries-jeilyfish-dateutil/), followed by **malicious source code injection**, so, with the rise of software supply chain attacks, it becomes more critical to secure our software supply chains. + +![[https://www.memesmonkey.com/images/memesmonkey/43/43b3e5ab9f90a6266a163278c025cba5.jpeg](https://www.memesmonkey.com/images/memesmonkey/43/43b3e5ab9f90a6266a163278c025cba5.jpeg)](https://cdn-images-1.medium.com/max/2000/1*tqXzGy9XAM90BUN7cilkiw.jpeg)[https://www.memesmonkey.com/images/memesmonkey/43/43b3e5ab9f90a6266a163278c025cba5.jpeg](https://www.memesmonkey.com/images/memesmonkey/43/43b3e5ab9f90a6266a163278c025cba5.jpeg) + +Securing the software supply chain is not an easy task. +So many people and organizations have already working on this specific problem, but luckily we have some tools to make that process a bit easier to deal with for us. + +Today, we'll be talking about the GoReleaser project and its features that can help us mitigate the risk of compromises in software supply chains. Then, at the end of this guide, we'll be demoing everything we talked about to give more practical information about how you can make the supply chain more secure for your Go projects by using GoReleaser. + +[GoReleaser](https://goreleaser.com/intro/) is a release automation tool for Go projects. +The goal is to simplify the build, release, and publish steps while providing variant customization options for all steps. **Although GoReleaser is built with CI tools in mind**, you only need to download and execute it in your build script. But, of course, you can still install it locally if you want. This is because many projects have already been using GoReleaser for a long time in the open-source world. Also, with the announcement [GitHub Actions](https://github.com/features/actions) platform, GoReleaser's popularity increased, so it takes firm steps towards becoming a defacto standard for releasing Go projects, especially in the GitHub ecosystem. + +**The first step in securing your supply chain is to create an inventory of the software and libraries being used during your build and deployment cycle.** + +This is where an [SBOM](https://www.linuxfoundation.org/blog/what-is-an-sbom/) comes into the picture. + +**More technically**, An SBOM is a structured list of components, modules, and libraries that are included in a given piece of software. However, there are many different meanings of an SBOM in the ecosystem. In the most basic form, think of them as a list of ingredients that evolves throughout the software development lifecycle as you add new code or components. Knowing about our software's dependencies, we can first determine if we are impacted when a new security vulnerability is found. If so, we can apply security patches to mitigate the risk of that vulnerability before affecting our software. + +Organizations can and do create and publish a software bill of materials in several different formats. In addition to these common formats, several methods are explicitly designed for delivering SBOMs, including [SPDX (Software Package Data Exchange)](https://spdx.dev), [Software Identification (SWID) Tags](https://csrc.nist.gov/projects/Software-Identification-SWID), and [Cyclone DX](https://cyclonedx.org), many open-source tools exist, such as [Syft](https://github.com/anchore/syft) from [Anchore](https://anchore.com), which is what we are going to talk about in this blog post, [kubernetes-sigs/bom](https://github.com/kubernetes-sigs/bom) from [Kubernetes SIG Release](https://github.com/kubernetes/sig-release), [cyclonedx-cli](https://github.com/CycloneDX/cyclonedx-cli) from [CycloneDX](https://cyclonedx.org), [spdx-sbom-generator](https://github.com/opensbom-generator/spdx-sbom-generator), [Tern](https://github.com/tern-tools/tern), and many more... + +Let's look at what we have to do successfully to generate an SBOM in GoReleaser using Syft. We'll be setting up the demo on the GitHub Actions platform so that some examples might be specific to that platform. + +> 🚨 **TLDR**; you can find all the source code what we are going to show you as an example on GitHub [here](https://github.com/goreleaser/supply-chain-example). + +**Since GoReleaser uses Syft by calling it's binary**, we ensure that Syft binary exists before running GoReleaser. We can download the binary and move it to the executable's path while running the job, but there is a better way of doing this, [anchore/sbom-action](https://github.com/anchore/sbom-action). A sbom-action is a GitHub Action for creating a software bill of materials using Syft, but we can use its sub-action called [anchore/sbom-action/download-syft](https://github.com/anchore/sbom-action/blob/main/download-syft/action.yml) to download the executable only. + +To install Syft, you need to add the following line to our GitHub Action workflow. + +```yaml +- uses: anchore/sbom-action/download-syft@v0.7.0 # installs syft +``` + +Next, we need to add a [setting](https://goreleaser.com/customization/sbom/) +specific to configure SBOM generation to the GoReleaser configuration file +`.goreleaser.yml`. +I said configure because GoReleaser's SBOM generation support is highly configurable. +After all, it accepts commands to be run to generate an SBOM and arguments that will pass to the command, which makes GoReleaser can work with any SBOM generation tool, as we mentioned earlier, seamlessly. + +```yaml +# creates SBOMs of all archives and the source tarball using syft +# https://goreleaser.com/customization/sbom +# Two different sbom configurations need two different IDs +sboms: + - id: archive + artifacts: archive + - id: source + artifacts: source +``` + +When you do not specify any command, it will use syftas a command by default, as you can see [here](https://github.com/goreleaser/goreleaser/blob/7671dab291483b2733e871abff379d07e74dfc6c/internal/pipe/sbom/sbom.go#L64-L73). + +GoReleaser lets you cross-compile your Go binaries and package them in various formats, including container images or tarballs. +Then, using some public services such as GitHub Releases and DockerHub to distribute them to customers or production systems +With the rise of software supply chain attacks, ensuring the integrity between the artifacts (container images, blobs, etc.) we produce and consume becomes more critical. +**Integrity** means ensuring an artifact is what it says it is. +It also indicates the artifact we consume has not been tampered with since it was created and comes from a valid source, a trusted identity (a public key, a person, a company, or some other entity). +Leveraging this workflow gives your users confidence that the container images from their container registry were the trusted code you built and published. +One of the best ways of checking the integrity of an artifact and ensuring that if the artifact has been tampered with is to use a utility called [cosign](https://github.com/sigstore/cosign) from [Sigstore](https://sigstore.dev). + +Sigstore is an open-source security project now sponsored by the [OpenSSF](https://openssf.org), **the Open Software Security Foundation**, allowing developers to build, distribute, and verify signed software artifacts securely. +**Sigstore** provides a cosign tool, enabling developers to build, distribute, +and verify signed software artifacts securely. + +Cosign supports **several types of signing keys**, such as **text-based keys**, **cloud KMS-based keys** or **even keys generated on hardware tokens**, and **Kubernetes Secrets**, which can all be generated directly with the tool itself, and also supports adding **key-value annotations** to the signature. + +Luckily, GoReleaser has built-in support for signing blobs, container images by using cosign. +The same rule for Syft applies here, too. +GoReleaser uses cosign by calling it's binary, which means that we should ensure that cosign binary exists before running GoReleaser. +Thanks to the [cosign-installer](https://github.com/sigstore/cosign-installer), a GitHub Action lets you download cosign binary. + +To install cosign, you need to add the following line to our GitHub Action workflow. + +```yaml +- uses: sigstore/cosign-installer@v2.1.0 # installs cosign +``` + +> To install cosign into your environment, please follow the installation link +> from [official website](https://docs.sigstore.dev/cosign/installation/). +> But if you are Mac user, you can start installing cosign via HomeBrew 👇 +> +> ```bash +> $ brew install cosign +> ``` + +You can start signing your artifacts by creating public/private key pairs with the **generate-key-pair** command. Then, you need to run the **sign** command with the private key you generated. But in today's blog post, we'll be talking about a unique concept in cosign called [Keyless Signing](https://github.com/sigstore/cosign/blob/main/KEYLESS.md), which means that we no longer need to generate public/private key pairs. + +> For more background on **"keyless signing"**, see blog posts on the Chainguard blog on [Fulcio](https://chainguard.dev/posts/2021-11-12-fulcio-deep-dive) and [keyless signing with EKS](https://chainguard.dev/posts/2021-11-03-zero-friction-keyless-signing). + +It's important to note that another part of sigstore is [Fulcio](https://github.com/sigstore/fulcio), +a root CA that issues signing certificates from OIDC tokens, and [Rekor](https://github.com/sigstore/rekor), +a transparency log for certificates issued by Fulcio. In October, we announced that +[Actions runs can get OIDC tokens from GitHub for use with cloud providers](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/), including the public Fulcio and Rekor servers run by the sigstore project. You can sign your container images with the GitHub-provided OIDC token in Actions without provisioning or managing your private key. +This is critically what makes signing so easy. + +> [https://github.blog/2021-12-06-safeguard-container-signing-capability-actions/](https://github.blog/2021-12-06-safeguard-container-signing-capability-actions/) + +To enable signing container images in GoReleaser, all you need to do is add these lines below. + +> Keyless signing is still an experimental feature in cosign, so, we should use a special environment variable to enable that support named `COSIGN_EXPERIMENTAL`. + +```yaml +# signs our docker image +# https://goreleaser.com/customization/docker_sign +docker_signs: + - cmd: cosign + env: + - COSIGN_EXPERIMENTAL=1 + artifacts: images + output: true + args: + - "sign" + - "${artifact}" +``` + +On the other hand, you must add these lines below to enable signing container images in GoReleaser. + +```yaml +# signs the checksum file +# all files (including the sboms) are included in the checksum, so we don't need to sign each one if we don't want to +# https://goreleaser.com/customization/sign +signs: + - cmd: cosign + env: + - COSIGN_EXPERIMENTAL=1 + certificate: "${artifact}.pem" + args: + - sign-blob + - "--output-certificate=${certificate}" + - "--output-signature=${signature}" + - "${artifact}" + artifacts: checksum + output: true +``` + +Once you have all of these, you will end up having something like the following picture for your release: + +![](https://cdn-images-1.medium.com/max/2004/1*cXC_RXowFPRJEIW41olNlg.png) + +Also, a successful release pipeline: + +![[https://github.com/goreleaser/supply-chain-example/runs/4618694011?check_suite_focus=true](https://github.com/goreleaser/supply-chain-example/runs/4618694011?check_suite_focus=true)](https://cdn-images-1.medium.com/max/5084/1*LUmE7iOj-HLkYT-yGoJMnQ.png)[https://github.com/goreleaser/supply-chain-example/runs/4618694011?check_suite_focus=true](https://github.com/goreleaser/supply-chain-example/runs/4618694011?check_suite_focus=true) + +If you verify the container image you pushed to the ghcr.io, a **verify** command of cosign might help you verify the image's signature. + +```bash +$ COSIGN_EXPERIMENTAL=1 cosign verify ghcr.io/goreleaser/supply-chain-example:v1.2.0 +``` + +If you verify the blob, checksums.txt, in this case, you need to download the signature, the certificate, and checksums.txt itself first. + +```bash +$ COSIGN_EXPERIMENTAL=1 cosign verify-blob \ + --cert checksums.txt.pem \ + --signature checksums.txt.sig + checksums.txt \ +tlog entry verified with uuid: "e42743bbbc1d06058ff7705a00bdf5046d920ede73e1fec7f313d19f5f3513b8" index: 977012 +Verified OK +``` + +## Conclusion + +GoReleaser always cares about the security of the artifacts it produces this is why it integrates with tools like cosign, Syft, etc., to mitigate the risks happening in software supply chains. As you can see from the examples we gave, it does that effortlessly by simply adding a bunch of new settings to your GoReleaser configuration file, which all happens behind the scenes without making it even more complex. + +> 🍭 BONUS: Another important topic that gives you a confidence about the software’s integrity is [Reproducible Builds](http://reproducible-builds.org), are a set of software development practices that create an independently-verifiable path from source to binary code, thanks to [Carlos A. Becker](undefined), wrote a blogpost to explain it in detail, so, please do not forget to checkout it his blogpost to learn more about how GoReleaser can help you to achieve reproducibility👇 +> +> [Here's the link](https://medium.com/goreleaser/reproducible-build-with-goreleaser-6de2763458a5). diff --git a/goreleaser/www/docs/blog/posts/2022-05-22-nightly-actions.md b/goreleaser/www/docs/blog/posts/2022-05-22-nightly-actions.md new file mode 100644 index 0000000..af8c035 --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2022-05-22-nightly-actions.md @@ -0,0 +1,98 @@ +--- +date: 2022-05-22 +slug: nightly-actions +categories: + - tutorials +authors: + - hariso +--- + +# Nightly builds with GoReleaser and GitHub Actions + +![](https://miro.medium.com/v2/resize:fit:4800/format:webp/1*MKGwITFSobVveZhnemzKcA.png) +Our flow for nightly builds + + + +Nightly builds offer other benefits like insight into a project’s activity. They also help to highlight the continuous delivery process. In this blog, I’ll go over how my team and I set up nightly builds using [GoReleaser](https://goreleaser.com) and [GitHub](https://github.com). I’ll explain it using a bottom-up approach, so you can better understand what drove our decision and the design of the release procedure. + +Before we dive in here’s a quick overview of how the [Conduit](https://github.com/ConduitIO/conduit) team actually performs releases. A release consists of: + +1. a GitHub release containing binaries for different platforms and a changelog amongst other artifacts. +1. a [Docker](https://www.docker.com) image (pushed to GitHub’s Container Registry) + +## Requirements + +One of Conduit’s primary drivers is being developer-friendly, which also means that we want developers (and Conduit users generally) to be able to try out all the latest features and fixes in any way they want: be it a binary they run directly or a Docker image. We also want to be very precise about what exactly is new in a build. + +The above means that nightly builds and regular builds should have the same structure. For example, if our regular release contains a changelog, a binary for Linux and a Docker image, then a nightly release should also contain a changelog, a binary for Linux and a Docker image. + +Ideally, any change in the release structure should be automatically reflected in both, the regular builds and the nightly builds. Continuing the previous example: if we decide to start supporting Plan9, we ideally change the configuration in one place, and see the change in regular and nightly builds alike. The release structure is defined through a GoReleaser configuration, so for that reason we would like to use a single GoReleaser configuration for both types of builds. + +We have a new contribution almost every (work)day, so we want the nightly builds to be scheduled around them. We may get dependency upgrades on weekends, but we’re fine not having a nightly build only for those. And, of course, we want the older releases to be cleaned up. We keep the builds for at most 7 days, so our full list of requirements is as follows: + +1. Nightly builds are “full releases” (i.e. include everything a “normal” release includes) +1. The existing GoReleaser configuration is used. +1. Nightly builds are scheduled on each working day +1. Nightly builds older than 7 days are removed. + +## Our Process Before Nightly Releases + +We chose GoReleaser to automate building the binaries, create a GitHub release, etc. To build the Docker image we use Docker’s GitHub actions and not GoReleaser, because Conduit comes with a built-in UI. This allows for multi-stage Docker builds, while GoRelease only supports single-stage builds. + +The two parts we had prior to nightly builds were: + +1. A GoReleaser config: [.goreleaser.yml](https://github.com/ConduitIO/conduit/blob/main/.goreleaser.yml) +1. A trigger for the release, in a GitHub workflow, [workflows/release.yml](https://github.com/ConduitIO/conduit/blob/main/.github/workflows/release.yml#L3-L6). The trigger is a tag push. + +What we have works well for major, minor and patch releases. What this process clearly doesn’t have is scheduling nightly builds nor a cleanup. + +## Implementing Nightly Builds + +Now we come to the design of the nightly build process: A scheduled GitHub action is pushing a nightly tag: + +```yaml +on: + schedule: + # * is a special character in YAML, so you have to quote this string + # doing builds Tue-Sat, so we have changes from Fri + # available already on Sat + - cron: "0 0 * * 2-6" +``` + +That will trigger the full release. Then, we use a GitHub action to clean up older GitHub releases, and also a GitHub action to clean up older Docker images. All of that together can be found in [workflows/trigger-nightly.yml](https://github.com/ConduitIO/conduit/blob/main/.github/workflows/trigger-nightly.yml). Here’s the big picture of everything together: + +1. To create a release, GoReleaser and Docker actions are used. +1. A release is triggered by a tag push. +1. “Normal” (major, minor, patch) releases are triggered by manually pushing a tag. +1. Nightly builds (releases) are triggered by pushing a “nightly tag” +1. A workflow is responsible for pushing the nightly tag and also for the cleanup. + +## Don’t forget to clean up + +Nightly builds will accumulate over time, but we don’t want to keep all of them. In the end, those are not stable releases and relying on them for a longer period of time is not recommended anyway. + +We need to clean up older GitHub releases as well as Docker images. Here’s the relevant code snippet from [workflows/trigger-nightly.yml](https://github.com/ConduitIO/conduit/blob/main/.github/workflows/trigger-nightly.yml): + +```yaml +- name: "Clean up nightly releases" + uses: dev-drprasad/delete-older-releases@v0.2.0 + with: + keep_latest: 5 + delete_tags: true + delete_tag_pattern: nightly + env: + GITHUB_TOKEN: ${{ secrets.NIGHTLY_BUILD_GH_TOKEN }} +- name: "Delete nightly containers older than a week" + uses: snok/container-retention-policy@v1 + with: + image-names: conduit + cut-off: 1 week ago UTC + account-type: org + org-name: ConduitIO + keep-at-least: 5 + token: ${{ secrets.NIGHTLY_BUILD_GH_TOKEN }} + filter-tags: "*-nightly*" +``` + +We’ve been running this for a few weeks now (and also started using in [another repository](https://github.com/meroxa/cli)) and it’s been working fine. One of the improvements we’ve identified so far is to announce the nightly release by using GoReleaser. diff --git a/goreleaser/www/docs/blog/posts/2023-01-10-azure-devops.md b/goreleaser/www/docs/blog/posts/2023-01-10-azure-devops.md new file mode 100644 index 0000000..bc8f14e --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2023-01-10-azure-devops.md @@ -0,0 +1,316 @@ +--- +date: 2023-01-10 +slug: azure-devops +categories: + - tutorials +authors: + - dirien +--- + +# Releasing multi-platform container images with GoReleaser in Azure DevOps + + + +## Introduction + +In this article, we learn how to use [GoReleaser](https://goreleaser.com/) to build and release a multi-platform container image to [Azure Container Registry](https://azure.microsoft.com/en-us/services/container-registry/) in [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/). + +This is particularly interesting for teams, who are using mainly Azure and Azure DevOps for their projects and want to build and release container images to Azure Container Registry. + +I try to follow the great article on how to create multi-platform container +images using GitHub actions written by Carlos, the core maintainer of +GoReleaser. If you had no chance to read his blog, [here](https://carlosbecker.com/posts/multi-platform-docker-images-goreleaser-gh-actions/) is the link to it. + +Before we start, let’s take a look on the prerequisites. + +## Prerequisites + +- [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) account. +- [The GoReleaser Azure DevOps Extension](https://marketplace.visualstudio.com/items?itemName=GoReleaser.goreleaser) installed. +- [Azure](https://azure.microsoft.com/en-us/) account. +- [GoReleaser](https://goreleaser.com/install/) installed on your local machine. + +## The sample application + +Before we can start to set up our pipeline and infrastructure components, lets have a look at the sample application we are going to use in this demo. To keep things simple, I created basic Hello World server using mux library from the Gorilla Web Toolkit. + +Add the library to the `go.mod` file: + +```gomod +module dev.azure.com/goreleaser-container-example + +go 1.19 + +require github.com/gorilla/mux v1.8.0 +``` + +After adding the library, we can move over to implement the basic logic of the application. The server should return a Hello World! string, when we curl the root path of the server. + +In mux this is done, with adding a new route to the router and adding a handler function to it. In my case called HelloWorldHandler. + +Then we can start the server and listen on port 8080. + +```go +package main + +import ( + "log" + "net/http" + "os" + "strings" + + "github.com/gorilla/mux" +) + +const ( + // Port is the port the server will listen on + Port = "8080" +) + +func HelloWorldHandler(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("Hello World!")) +} + +func main() { + r := mux.NewRouter() + r.HandleFunc("/", HelloWorldHandler) + port := os.Getenv("PORT") + if port == "" { + port = Port + } + for _, env := range os.Environ() { + if strings.HasPrefix(env, "TEST") { + log.Printf("%s", env) + } + } + log.Println("Listening on port " + port) + log.Fatal(http.ListenAndServe(":"+port, r)) +} +``` + +As we want to create a container image, we need to add a Dockerfile. GoReleaser will then build our container image by copying the previously built binary into the container image. Remember: We don't want to rebuild the binary. So no multi-stage Dockerfile. This way we are sure, that the same binary is used for all distribution methods GoReleaser is offering, and we intended to use. + +```Dockerfile +# Dockerfile +FROM cgr.dev/chainguard/static@sha256:bddbb08d380457157e9b12b8d0985c45ac1072a1f901783a4b7c852e494967d8 +COPY goreleaser-container-example \ + /usr/bin/goreleaser-container-example +ENTRYPOINT ["/usr/bin/goreleaser-container-example"] +``` + +![Chainguard logo](https://cdn-images-1.medium.com/max/2000/0*3X76j809VWDnCLxY) + +You may spot that I use a static container image as base image from Chainguard. Chainguard images are designed for minimalism and security in mind. Many of the images provided by Chainguard are distroless, which means they do not contain a package manager or any other programs that are not required for the specific purpose of the image. Chainguard images are also scanned for vulnerabilities and are regularly updated. You can find more information about Chainguard images here: +[**Chainguard Images** +*Chainguard Images are security-first container base images that are secure by default, signed by Sigstore, and include…*www.chainguard.dev](https://www.chainguard.dev/chainguard-images) + +Let’s pause a minute here and test that everything is working as expected. We can test the application by running it locally: + +```bash +GOOS=linux GOARCH=amd64 go build -o goreleaser-container-example . +docker buildx build --platform linux/amd64 -t goreleaser-container-example . +docker run -p 8080:8080 goreleaser-container-example +``` + +After spinning up the container, you should see the following output: + +```bash +2023/01/10 10:49:31 Listening on port 8080 +``` + +And if we run a curl command in another terminal, we should see the following output: + +```bash +curl localhost:8080 +Hello World! +``` + +Perfect! Everything works as we expected it. Now we can start working on the GoReleaser parts. + +## GoReleaser config file + +We need to provide a goreleaser.yaml config file in the root of our project to tell GoReleaser what to do during the release process. In our case to let GoReleaser to build our container image. To create the goreleaser.yaml we can run following command: + +```bash +goreleaser init +``` + +This should generate the config file for us: + +```bash + • Generating .goreleaser.yaml file + • config created; please edit accordingly to your needs file=.goreleaser.yaml +``` + +The good part when using the init command is, that the goreleaser.yaml comes with some default values. We need to change content as we not need everything GoReleaser is doing by default. Here is the content of the goreleaser.yaml for this demo: + +```yaml +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin +``` + +Later we add the part needed to create the multi-platform container images but for now we dry-run the release process with following GoReleaser command: + +```bash +goreleaser release --snapshot --rm-dist +``` + +Next to the logs of GoReleaser release process, you should also have a dist folder with all the binaries in it. + +> _Exclude this folder in your .gitignore file, to prevent accidentally committing the binaries to your repository._ + +## Azure Container Registry + +> _If you already have an Azure Container Registry you can skip the parts of the creation of the Azure Container Registry._ + +There are several ways, you can create a container registry: You can use the Azure Portal, the Azure CLI, the Azure PowerShell or your favorite Infrastructure as Code tool of choice. + +In this demo, I will use the Azure CLI to create the container registry. You can +find more information about the Azure CLI +[here](https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest). + +First log into the Azure account with the Azure CLI: + +```bash +az login +``` + +We then need to create the resource group and then the container registry service with following commands: + +```bash +# create a resource group in WestEurope datacenter +az group create --name goreleaser-rg --location westeurope +# create the Azure Container registry +az acr create --resource-group goreleaser-rg --name mygoreleaserregistry --sku Basic +``` + +When the container registry is up and running, we can add the dockers configuration to our goreleaser.yaml. But we need to name of our container registry beforehand. + +Use following command to retrieve the name: + +```bash +az acr show --resource-group goreleaser-rg --name mygoreleaserregistry --query loginServer --output tsv +``` + +This is the new part we need to add to our `goreleaser.yaml,` to activate the build of the container image and manifest. + +If you want to know more about the manifest files, I wrote an article about it +[here](/blog/docker-manifests). + +```yaml +--- +dockers: + - image_templates: + [ + "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}-amd64", + ] + goarch: amd64 + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - --platform=linux/amd64 + - image_templates: + [ + "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}-arm64", + ] + goarch: arm64 + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - --platform=linux/arm64/v8 +docker_manifests: + - name_template: "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}" + image_templates: + - "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}-amd64" + - "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}-arm64" + - name_template: "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:latest" + image_templates: + - "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}-amd64" + - "mygoreleaserregistry.azurecr.io/{{ .ProjectName }}:{{ .Version }}-arm64" +``` + +## Azure DevOps + +With the infrastructure done and GoReleaser config finished, we can set up Azure DevOps Service. + +![Switch to the Service Connections screen](https://cdn-images-1.medium.com/max/4060/1*4n5ZoSZ6HMNp0kL--zYFPA.png)_Switch to the Service Connections screen_ + +![Click on the New service connection button](https://cdn-images-1.medium.com/max/4060/1*WBYOMjBmxl_LAEhnUcBSDg.png)_Click on the New service connection button_ + +![Select Azure Container Registry and connect your Azure subscription to it](https://cdn-images-1.medium.com/max/4060/1*kGcBwOXxuKwQsnkwo2870A.png)_Select Azure Container Registry and connect your Azure subscription to it_ + +Time for the last part of our demo: Setting up the Azure DevOps pipeline. I will not go too much into detail about the pipeline, as this is not the focus of this demo. But I will show you the important parts of the pipeline. + +First notable part is the multi-platform command task. I simply followed the instructions from this [article](https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/containers/build-image?view=azure-devops#how-do-i-build-linux-container-images-for-architectures-other-than-x64) on how to setup the task to build multiarch images. + +Next section in the pipeline is the GoReleaser task. This task is using the +GoReleaser extension from the Azure DevOps Marketplace. You can find more +information about the extension [here](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.goreleaser-task). + +I just added the args field and set the value to release `--rm-dist` and defined a condition to only run the task on a tag as GoReleaser will not release on a "dirty" git state. + +This is the complete pipeline: + +```yaml +trigger: + branches: + include: + - main + - refs/tags/* +variables: + GO_VERSION: "1.19.4" + DOCKER_BUILDKIT: 1 +pool: + vmImage: ubuntu-latest +jobs: + - job: Release + steps: + - task: GoTool@0 + inputs: + version: "$(GO_VERSION)" + displayName: Install Go + - task: Docker@2 + inputs: + containerRegistry: "goreleaser" + command: "login" + addPipelineData: false + addBaseImageData: false + - task: CmdLine@2 + displayName: "Install multiarch/qemu-user-static" + inputs: + script: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - task: goreleaser@0 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + inputs: + version: "latest" + distribution: "goreleaser" + workdir: "$(Build.SourcesDirectory)" + args: "release --rm-dist" +``` + +To run a release, you need to create a tag in Azure to get the release process started. + +![Logs produced during the release process](https://cdn-images-1.medium.com/max/4060/1*rawcazzmdDWXUzeo-YAIlQ.png)_Logs produced during the release process_ + +And you should see in the Repository tab of your Azure Container Registry service in the Azure Portal UI the multi-platform container images. + +![List of all produced multi-platform container images](https://cdn-images-1.medium.com/max/7184/1*Z8mRJwHIv3o9jWlubU_hhQ.png)_List of all produced multi-platform container images_ + +## Conclusion + +In this demo, I showed you how to create a multi-platform container image using GoReleaser and Azure DevOps and store this image in Azure Container Registry for further usage in your Container based Azure services. + +Setting up all the parts was pretty straight forward where GoReleaser is doing the heavy lifting for us. + +Go ahead and give it a try and let me know what you think about it. diff --git a/goreleaser/www/docs/blog/posts/2023-01-30-goreleaser-ko.md b/goreleaser/www/docs/blog/posts/2023-01-30-goreleaser-ko.md new file mode 100644 index 0000000..994fe1f --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2023-01-30-goreleaser-ko.md @@ -0,0 +1,193 @@ +--- +date: 2023-01-30 +slug: goreleaser-ko +categories: + - tutorials +authors: + - developerguy +--- + +# Fast and Furious Building OCI compatible Container Images with GoReleaser and ko + +GoReleaser and [ko][] are popular open-source, well-recognized projects, especially in the containerization and open-source ecosystem for Go applications. +Many people use these projects for their Go applications because they are pretty straightforward and CI-friendly tools that make your releasing artifacts (binary and container image) process super elegant, which also helps you focus more on developing the business logic rather than planning to release software type of works. + + + +I’m so glad to announce that we finally [integrated these fantastic projects](/customization/ko)! + +> If you are interested in learning more about the development process of that +> feature, here is the [PR](https://github.com/goreleaser/goreleaser/pull/3653/) you can take a look. + +As a result, starting from [GoReleaser v1.15](https://github.com/goreleaser/goreleaser/milestone/17), you can build container images by setting configuration options for ko in GoReleaser without having ko installed on your environment. + +This post will be a quick walkthrough to guide people about how things work. + +Before diving into that, let’s refresh our minds about these projects with a quick recap. + +GoReleaser is a tool for creating and releasing Go projects. It automates the +process of building, packaging, and publishing Go binaries and container images, +basically the [fanciest way of releasing Go projects](https://medium.com/trendyol-tech/the-fanciest-way-of-releasing-go-binaries-with-goreleaser-dbbd3d44c7fb). +It is a super user-friendly, easy-to-use, go-to CLI tool and also provides +[GitHub Actions](https://github.com/goreleaser/goreleaser-action) to be +CI-friendly. It also includes a bunch of features for mitigating the risks of +the software supply chain attacks, such as [generating +SBOMs](/customization/sbom), [signing the artifacts](/customization/sign), and +many others. +To get more detail, here is the [blog post](/blog/supply-chain-security) for +you. + +On the other hand, [ko][] is specifically designed for building and publishing +container images for Go projects. But the utmost vital features in ko are that +it doesn’t require you to run any Docker daemon or write well-designed +Dockerfiles to make the build process cache-efficient, fast and secure. The good +news is that ko will consider all these and build OCI-compatible container +images with all the security options enabled by default, [such as using build +arguments while making Go binaries for +reproducibility](https://ko.build/configuration/#overriding-go-build-settings), +[generating SBOMs, and uploading them to the OCI registry](https://ko.build/features/sboms/), +using the +[smallest and CVE-less base +image](https://github.com/ko-build/ko/blob/453bf803e379696a0b9142c772402ba4599cff34/pkg/commands/options/build.go#L35) +from [Chainguard images](https://github.com/chainguard-images/images) and +providing base information using OCI [base image +annotations](https://github.com/opencontainers/image-spec/blob/main/annotations.md) +and also it [makes easier multi-platform +builds](https://ko.build/features/multi-platform/) by using the +cross-compilation in Go. To get more detail, here is the [blog post](https://blog.kubesimplify.com/getting-started-with-ko-a-fast-container-image-builder-for-your-go-applications) for you. + +It is worth mentioning that [ko applied to become a CNCF sandbox project the last year](https://opensource.googleblog.com/2022/10/ko-applies-to-become-a-cncf-sandbox-project.html), +and glad to see that this application [got accepted by the CNCF](https://lists.cncf.io/g/cncf-toc/message/7743), +which means that ko is now officially a CNCF Sandbox project. + +Without further ado, let’s dive into the details of the integration by showing it in a real-world example. + +> You will find all the source code in GitHub repository, +> [here](https://github.com/developer-guy/goreleaser-with-ko). + +Let’s start with creating a proper directory to host the source code: + +```bash +$ mkdir -p goreleaser-with-ko +$ cd goreleaser-with-ko +``` + +Next, initialize the project: + +```bash +go mod init github.com//goreleaser-with-ko +cat < main.go +package main + +import ( + "fmt" + "os" +) +var ( + // Version is the current version of the application. + Version = "main" +) +func main() { + fmt.Fprintf(os.Stdout, "GoReleaser supports ko! Version: %s", Version) +} +EOF +``` + +It is time to create the configuration file for GoReleaser, which is +[.goreleaser.yml](/customization). + +The easiest way of creating that file is run: `goreleaser init`, which requires +GoReleaser CLI to be installed on your environment; please refer to the +installation page [here](/install) to install it. + +```bash +# it will create the .goreleaser.yml configuration file +# with bunch of default configuration options. +$ goreleaser init +• Generating .goreleaser.yaml file +• config created; please edit accordingly to your needs file=.goreleaser.yaml +``` + +Next, set ko configuration options into .goreleaser.yml. Fortunately, we have +good documentation explaining how we can do this [here](/customization/ko). + +```bash +$ cat <> .goreleaser.yml +kos: + - id: goreleaser-with-ko + platforms: + - linux/amd64 + - linux/arm64 + tags: + - latest + - '{{.Tag}}' + bare: true + flags: + - -trimpath + ldflags: + - -s -w + - -extldflags "-static" + - -X main.Version={{.Tag}} +EOF +``` + +Finally, we’ll automate this workflow on the GitHub Actions platform. +To do this, we need to create a proper folder structure, `.github/workflows` and +put the workflow file into it: + +```bash +$ mkdir -p .github/workflows +$ cat < .github/workflows/release.yaml +name: Releasing artifacts with GoReleaser and ko +on: + push: + tags: + - 'v*' +permissions: + contents: write # needed to write releases + packages: write # needed for ghcr access +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags) + - uses: actions/setup-go@v3 + with: + go-version: 1.19 + cache: true + - uses: goreleaser/goreleaser-action@v4 # run goreleaser + with: + version: latest + args: release --rm-dist + env: + KO_DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/goreleaser-with-ko + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +EOF +``` + +As you saw from the file above, we didn’t do anything special about ko +installation, but in case you need to install it into your workflow, you can use +the [setup-ko](https://github.com/ko-build/setup-ko) GitHub Action for that. But how? + +Since ko’s core packages that provide such building and publishing capabilities +are exported functions, you can use them in your own Go projects to get more +detail [here](https://ko.build/advanced/go-packages/). +The following projects are great examples of that: + +- [terraform-provider-ko](https://github.com/ko-build/terraform-provider-ko/blob/main/internal/provider/resource_ko_image.go) +- [miniko](https://github.com/imjasonh/miniko) +- And now, [GoReleaser](https://github.com/goreleaser/goreleaser/blob/main/internal/pipe/ko/ko.go) + +And that’s it. All you need to do at that point is give a tag to your project and wait for the GitHub workflow to be completed to release your software. + +```bash +$ git commit -m"initial commit" -s +$ git tag v0.1.0 -m"first release" +$ git push origin v0.1.0 +``` + +One last note: please remember to use this feature and provide feedback to help us improve this process. Thanks for reading; I hope you enjoyed it; see you in the next blog posts. + +[ko]: https://ko.build/ diff --git a/goreleaser/www/docs/blog/posts/2023-10-08-slsa-generation-for-your-artifacts.md b/goreleaser/www/docs/blog/posts/2023-10-08-slsa-generation-for-your-artifacts.md index 621490c..3e661d7 100644 --- a/goreleaser/www/docs/blog/posts/2023-10-08-slsa-generation-for-your-artifacts.md +++ b/goreleaser/www/docs/blog/posts/2023-10-08-slsa-generation-for-your-artifacts.md @@ -22,7 +22,7 @@ Together, they provide a robust defense against the growing threats posed by mal GoReleaser takes the ever-growing risks in the realm of software supply chain security incredibly seriously. From the onset of this era of heightened security concerns, GoReleaser has been at the forefront, continuously adding features to safeguard your artifacts against potential software supply chain attacks such as [generating an SBOMs](https://goreleaser.com/customization/sbom/), [signing your artifacts](https://goreleaser.com/customization/docker_sign/), and more. -> _If you want to learn more about the general software supply chain security features supported by GoReleaser, check out our [blog post](https://blog.goreleaser.com/goreleaser-and-software-supply-chain-security-e8917b26924b/) on the topic._ +> _If you want to learn more about the general software supply chain security features supported by GoReleaser, check out our [blog post](/blog/supply-chain-security/) on the topic._ In this blog post, we will explore how GoReleaser can help you generate SLSA provenance for your artifacts and how you can leverage the slsa-github-generator to automate the process. @@ -55,7 +55,6 @@ We said artifacts a lot, but what are artifacts really? In the context of this b Let's take a look at the `.goreleaser.yml` file of our demo project: ```yaml - --- builds: - env: @@ -100,7 +99,6 @@ It's important to understand reusable workflows since the slsa-github-generator Let's have a first look at the GitHub workflow file that we will use to generate SLSA provenance for our artifacts: ```yaml - --- binary-provenance: needs: [goreleaser] diff --git a/goreleaser/www/docs/blog/posts/2023-12-26-goreleaser-v1.23.md b/goreleaser/www/docs/blog/posts/2023-12-26-goreleaser-v1.23.md new file mode 100644 index 0000000..d0bf400 --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2023-12-26-goreleaser-v1.23.md @@ -0,0 +1,54 @@ +--- +date: 2023-12-26 +slug: goreleaser-v1.23 +categories: [announcements] +authors: [caarlos0] +--- + +# Announcing GoReleaser v1.23 - the last of 2023 + +The yearly Christmas edition, and the last release of 2023. +This release contains mostly small improvements and bug fixes. + + + +## Highlights + +- nix: validate license to prevent generating invalid derivations +- nix: make sure zip is included if one of the archives is a zip file +- winget: support `archives.format: binary` +- homebrew: `dependencies` can be added to specific OSes +- homebrew: support `tar.xz` +- aur: support `archives.wrap_in_directory` +- aur: support multiple packages in the same repository +- `--single-target` is now more consistent +- error handling improvements in several places + +As always, bug fixes, dependency updates, housekeeping, and documentation +updates are included in this release as well. + +## Other news + +- GoReleaser now has ~12.4k stars and 366 contributors! Thanks, everyone! +- We eventually discuss new features in our Discord server.  + [Join the conversation][discord]! +- nFPM had new releases as well,  + [check it out](https://github.com/goreleaser/nfpm/releases). + +## Download + +You can [install][] or upgrade using your favorite package manager, or see the +full release notes and download the pre-compiled binaries [here][oss-rel] and +[here (for Pro)][pro-rel]. + +## Helping out + +You can help by contributing features and bug fixes, or by donating. +You may also be interested in buying a GoReleaser Pro license. + +You can find out more [here](https://goreleaser.com/sponsors/). + +[install]: https://goreleaser.com/install +[pro-rel]: https://github.com/goreleaser/goreleaser-pro/releases/tag/v1.23.0-pro +[oss-rel]: https://github.com/goreleaser/goreleaser/releases/tag/v1.23.0 +[discord]: https://goreleaser.com/discord diff --git a/goreleaser/www/docs/blog/posts/2024-02-05-goreleaser-v1.24.md b/goreleaser/www/docs/blog/posts/2024-02-05-goreleaser-v1.24.md new file mode 100644 index 0000000..616d4f7 --- /dev/null +++ b/goreleaser/www/docs/blog/posts/2024-02-05-goreleaser-v1.24.md @@ -0,0 +1,63 @@ +--- +date: 2024-02-05 +slug: goreleaser-v1.24 +categories: [announcements] +authors: [caarlos0] +--- + +# Announcing GoReleaser v1.24 - the first of 2024 + +Happy new year! +The first release of 2024 is here! + + + +## Highlights + +- **security**: goreleaser would log environment variables in some + configurations when run with `--verbose`. Note that we only recommend using + the `--verbose` flag locally, to debug possible issues. + [CVE-2024-23840](https://nvd.nist.gov/vuln/detail/CVE-2024-23840) +- **new**: create DMG images (with `hdutil`/`mkisofs`) (only on [Pro][pro]) +- **new**: create MSI installers (with `wix`/`msitools`) (only on [Pro][pro]) +- **blog**: we fully migrated our blog from Medium to [mkdocs](/blog) +- **git**: options to ignore tag prefixes (only on [Pro][pro]) +- **blob**: ACLs, cache control, and content disposition +- **nfpm**: add libraries to packages +- **artifactory**: allow to publish source archives +- **brew**: improve handling of single OS +- **nix**: improved generated derivations, use `stdenvNoCC` by default +- **jsonschema**: we now validate our jsonschema every time it changes to make + sure it is still valid +- **deprecations**: we deprecated some options in the `changelog` and `blobs` + sections. [Details](/deprecations) + +As always, bug fixes, dependency updates, housekeeping, and documentation +updates are included in this release as well. + +## Other news + +- GoReleaser now has ~12.6k stars and 370 contributors! Thanks, everyone! +- We eventually discuss new features in our Discord server.  + [Join the conversation][discord]! +- nFPM had new releases as well,  + [check it out](https://github.com/goreleaser/nfpm/releases). + +## Download + +You can [install][] or upgrade using your favorite package manager, or see the +full release notes and download the pre-compiled binaries [here][oss-rel] and +[here (for Pro)][pro-rel]. + +## Helping out + +You can help by reporting issues, contributing features, documentation +improvements, and bug fixes. +You can also [sponsor the project](/sponsor), or get a +[GoReleaser Pro licence][pro]. + +[pro]: /pro +[install]: https://goreleaser.com/install +[pro-rel]: https://github.com/goreleaser/goreleaser-pro/releases/tag/v1.24.0-pro +[oss-rel]: https://github.com/goreleaser/goreleaser/releases/tag/v1.24.0 +[discord]: https://goreleaser.com/discord diff --git a/goreleaser/www/docs/ci/actions.md b/goreleaser/www/docs/ci/actions.md index 36e3b72..5292442 100644 --- a/goreleaser/www/docs/ci/actions.md +++ b/goreleaser/www/docs/ci/actions.md @@ -17,6 +17,7 @@ Below is a simple snippet to use this action in your workflow: name: goreleaser on: + pull_request: push: # run only against tags tags: @@ -31,25 +32,26 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - run: git fetch --force --tags - - uses: actions/setup-go@v4 + - name: Set up Go + uses: actions/setup-go@v4 with: go-version: stable # More assembly might be required: Docker logins, GPG, etc. # It all depends on your needs. - - uses: goreleaser/goreleaser-action@v5 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 with: - # either 'goreleaser' (default) or 'goreleaser-pro': + # either 'goreleaser' (default) or 'goreleaser-pro' distribution: goreleaser version: latest args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' - # distribution: + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} ``` diff --git a/goreleaser/www/docs/ci/gitlab.md b/goreleaser/www/docs/ci/gitlab.md index d19c245..99c59a9 100644 --- a/goreleaser/www/docs/ci/gitlab.md +++ b/goreleaser/www/docs/ci/gitlab.md @@ -14,10 +14,12 @@ variable should be masked and optionally protected if the job will only run on protected branches and tags. !!! warning + If you use a project access token, make sure to set `use_package_registry` to `true` as well, otherwise it might not work. !!! warning + If you are using a [protected variable](https://docs.gitlab.com/ee/ci/variables/#protected-cicd-variables) to store any of the values needed by goreleaser, ensure that you are protecting the tags as CI jobs in Gitlab only may access protected variables if the job is run for protected refs @@ -37,7 +39,7 @@ release: stage: release image: name: goreleaser/goreleaser - entrypoint: [''] + entrypoint: [""] only: - tags variables: @@ -92,13 +94,17 @@ release: script: | # GITLAB_TOKEN is needed to create GitLab releases. + # CI_JOB_TOKEN is needed if use_job_token is set. # DOCKER_* are needed to push Docker images. docker run --rm --privileged \ -v $PWD:/go/src/gitlab.com/YourGitLabUser/YourGitLabRepo \ -w /go/src/gitlab.com/YourGitLabUser/YourGitLabRepo \ -v /var/run/docker.sock:/var/run/docker.sock \ - -e DOCKER_USERNAME -e DOCKER_PASSWORD -e DOCKER_REGISTRY \ + -e DOCKER_USERNAME \ + -e DOCKER_PASSWORD \ + -e DOCKER_REGISTRY \ -e GITLAB_TOKEN \ + -e CI_JOB_TOKEN \ goreleaser/goreleaser release --clean ``` @@ -134,12 +140,11 @@ Example: ```yaml dockers: -- - goos: linux - goarch: amd64 - image_templates: - - 'registry.gitlab.com/Group/Project:{{ .Tag }}' - - 'registry.gitlab.com/Group/Project:latest' + - goos: linux + goarch: amd64 + image_templates: + - "registry.gitlab.com/Group/Project:{{ .Tag }}" + - "registry.gitlab.com/Group/Project:latest" ``` ## Example Repository diff --git a/goreleaser/www/docs/cmd/goreleaser_announce.md b/goreleaser/www/docs/cmd/goreleaser_announce.md index 88873b4..8bd9003 100644 --- a/goreleaser/www/docs/cmd/goreleaser_announce.md +++ b/goreleaser/www/docs/cmd/goreleaser_announce.md @@ -13,6 +13,10 @@ finally, announce it to your users. Environment variables will be re-evaluated here, so make sure they are available to the announce command as well. +On the other hand, the GoReleaser configuration file will not be parsed again, +which means you might need to specify the dist folder path if it is different +than the default. + !!! success "GoReleaser Pro" This subcommand is a [GoReleaser Pro feature](https://goreleaser.com/pro/). diff --git a/goreleaser/www/docs/cmd/goreleaser_release.md b/goreleaser/www/docs/cmd/goreleaser_release.md index 69297be..1dedc07 100644 --- a/goreleaser/www/docs/cmd/goreleaser_release.md +++ b/goreleaser/www/docs/cmd/goreleaser_release.md @@ -26,7 +26,7 @@ goreleaser release [flags] --release-notes string Load custom release notes from a markdown file (will skip GoReleaser changelog generation) --release-notes-tmpl string Load custom release notes from a templated markdown file (overrides --release-notes) --single-target Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file (implies --skip-publish) (Pro only) - --skip strings Skip the given options (valid options are: after, announce, aur, before, docker, fury, homebrew, ko, nix, publish, sbom, scoop, sign, snapcraft, validate, winget) + --skip strings Skip the given options (valid options are: after, announce, aur, before, chocolatey, dmg, docker, fury, homebrew, ko, msi, nfpm, nix, publish, sbom, scoop, sign, snapcraft, validate, winget) --snapshot Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip=announce,publish,validate) --split Split the build so it can be merged and published later (implies --prepare) (Pro only) --timeout duration Timeout to the entire release process (default 30m0s) diff --git a/goreleaser/www/docs/customization/aur.md b/goreleaser/www/docs/customization/aur.md index 915f7a6..3b40237 100644 --- a/goreleaser/www/docs/customization/aur.md +++ b/goreleaser/www/docs/customization/aur.md @@ -161,8 +161,8 @@ aurs: # # Default: . # Templates: allowed - # Since: v1.23. - url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" + # Since: v1.23 + directory: "." ``` !!! tip diff --git a/goreleaser/www/docs/customization/blob.md b/goreleaser/www/docs/customization/blob.md index f22232e..f918250 100644 --- a/goreleaser/www/docs/customization/blob.md +++ b/goreleaser/www/docs/customization/blob.md @@ -33,7 +33,7 @@ blobs: # Disables SSL # Requires provider to be `s3` - disableSSL: true + disable_ssl: true # Bucket name. # @@ -80,6 +80,44 @@ blobs: - src: LICENSE.tpl dst: LICENSE.txt + # Allow to disable `s3ForcePathStyle`. + # + # Default: true + # Since: v1.24 + s3_force_path_style: false + + # ACL to be applied to all files in this configuration. + # + # If you need different ACLs for different files, create multiple `blobs` + # configurations. + # + # Only available when `provider` is S3. + # + # Default: empty + # Since: v1.24 + acl: foo + + # Cache control options. + # + # If you need different `cache_control` options for different files, + # create multiple `blobs` configurations. + # + # Default: empty + # Since: v1.24 + cache_control: + - max-age=9999 + - public + + # Allows to set the content disposition of the file. + # + # If you need different `content_disposition` options for different files, + # create multiple `blobs` configurations. + # + # Default: attachment;filename={{.Filename}} + # Templates: allowed + # Since: v1.24 + content_disposition: "inline" + - provider: gs bucket: goreleaser-bucket folder: "foo/bar/{{.Version}}" @@ -117,6 +155,7 @@ blobs: Storage account is set over URL param `storage_account` in `bucket` or in environment variable `AZURE_STORAGE_ACCOUNT` It supports authentication with + - [environment variables](https://docs.microsoft.com/en-us/azure/storage/common/storage-azure-cli#set-default-azure-storage-account-environment-variables): - `AZURE_STORAGE_KEY` or `AZURE_STORAGE_SAS_TOKEN` - [default Azure credential](https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication-service-principal) diff --git a/goreleaser/www/docs/customization/builds.md b/goreleaser/www/docs/customization/builds.md index d6ad6b7..e7920a0 100644 --- a/goreleaser/www/docs/customization/builds.md +++ b/goreleaser/www/docs/customization/builds.md @@ -182,8 +182,8 @@ builds: command: test # Set the modified timestamp on the output binary, typically - # you would do this to ensure a build was reproducible. Pass - # empty string to skip modifying the output. + # you would do this to ensure a build was reproducible. + # Pass an empty string to skip modifying the output. # # Templates: allowed. mod_timestamp: "{{ .CommitTimestamp }}" diff --git a/goreleaser/www/docs/customization/changelog.md b/goreleaser/www/docs/customization/changelog.md index f6ef221..8b1e679 100644 --- a/goreleaser/www/docs/customization/changelog.md +++ b/goreleaser/www/docs/customization/changelog.md @@ -13,7 +13,7 @@ changelog: # This may result in an empty release notes on GitHub/GitLab/Gitea. # # Templates: allowed - skip: "{{ .Env.CREATE_CHANGELOG }}" + disable: "{{ .Env.CREATE_CHANGELOG }}" # Changelog generation implementation to use. # @@ -127,5 +127,6 @@ changelog: * The `github-native` changelog does not support `sort` and `filter`. * When releasing a [nightly][], `use` will fallback to `git`. + * The `github` changelog will only work if both tags exist in GitHub. [nightly]: ./nightlies.md diff --git a/goreleaser/www/docs/customization/chocolatey.md b/goreleaser/www/docs/customization/chocolatey.md index d5f9219..980baed 100644 --- a/goreleaser/www/docs/customization/chocolatey.md +++ b/goreleaser/www/docs/customization/chocolatey.md @@ -45,6 +45,16 @@ chocolateys: # It is a required field. project_url: https://example.com/ + # Which format to use. + # + # Valid options are: + # - 'msi': msi installers (requires the MSI pipe configured, Pro only) + # - 'archive': archives (only if format is zip), + # + # Default: 'archive' + # Since: v1.24 (pro) + use: msi + # URL which is determined by the given Token (github, # gitlab or gitea). # diff --git a/goreleaser/www/docs/customization/dist.md b/goreleaser/www/docs/customization/dist.md index 6a3a985..9ddec29 100644 --- a/goreleaser/www/docs/customization/dist.md +++ b/goreleaser/www/docs/customization/dist.md @@ -11,3 +11,9 @@ dist: another-folder-that-is-not-dist ``` More often than not, you won't need to change this. + +!!! warning + + If you change this value, and use + [`goreleaser continue`](/cmd/goreleaser_continue/), + you'll need to specify `--dist` when running it. diff --git a/goreleaser/www/docs/customization/dmg.md b/goreleaser/www/docs/customization/dmg.md new file mode 100644 index 0000000..219993d --- /dev/null +++ b/goreleaser/www/docs/customization/dmg.md @@ -0,0 +1,65 @@ +# DMG + +> Since: v1.24 pro + +!!! success "GoReleaser Pro" + + The dmg feature is available only in [GoReleaser Pro feature](/pro/). + +GoReleaser can create DMG images for macOS using `mkisofs` or `hdiutil`. + +The `dmg` section specifies how the images should be created: + +```yaml +# .goreleaser.yaml +dmg: + - # ID of the resulting image. + # + # Default: the project name + id: foo + + # Filename of the image (without the extension). + # + # Default: '{{.ProjectName}}_{{.Arch}}' + # Templates: allowed + name: "myproject-{{.Arch}}" + + # IDs of the archives to use. + # Empty means all IDs. + ids: + - foo + - bar + + # GOAMD64 to specify which amd64 version to use if there are multiple + # versions from the build section. + # + # Default: v1 + goamd64: v1 + + # More files that will be available in the context in which the image + # will be built. + extra_files: + - logo.ico + + # Whether to remove the archives from the artifact list. + # If left as false, your end release will have both the archives and the + # dmg files. + replace: true + + # Set the modified timestamp on the output image, typically + # you would do this to ensure a build was reproducible. Pass an + # empty string to skip modifying the output. + # + # Templates: allowed. + mod_timestamp: "{{ .CommitTimestamp }}" +``` + +## Limitations + +1. Due to the way symbolic links are handled on Windows, the `/Applications` + link inside the image might not work if the image was built on Windows. +1. If running outside macOS, make sure to have `mkisofs` installed. + +!!! tip + + Learn more about the [name template engine](/customization/templates/). diff --git a/goreleaser/www/docs/customization/fury.md b/goreleaser/www/docs/customization/fury.md index da1338b..15d8ce8 100644 --- a/goreleaser/www/docs/customization/fury.md +++ b/goreleaser/www/docs/customization/fury.md @@ -1,9 +1,8 @@ # Fury.io (apt and rpm repositories) !!! success "GoReleaser Pro" - The fury.io publisher is a [GoReleaser Pro feature](/pro/). You might be - able to reproduce some of its behavior on GoReleaser OSS using - [custom publishers](/customization/publishers/). + + The fury.io publisher is available only in [GoReleaser Pro feature](/pro/). You can easily create `deb` and `yum` repositories on [fury.io][fury] using GoReleaser. @@ -17,7 +16,7 @@ as an environment variable named `FURY_TOKEN`: ```yaml # .goreleaser.yaml furies: -- account: myaccount + - account: myaccount ``` This will automatically upload all your `deb` and `rpm` files. @@ -30,8 +29,7 @@ You can also have plenty of customization options: # goreleaser.yaml furies: - - - # fury.io account. + - # fury.io account. # Config is skipped if empty account: "{{ .Env.FURY_ACCOUNT }}" @@ -64,6 +62,6 @@ furies: [fury]: https://gemfury.com - !!! tip + Learn more about the [name template engine](/customization/templates/). diff --git a/goreleaser/www/docs/customization/git.md b/goreleaser/www/docs/customization/git.md index c71f1d5..1a3797c 100644 --- a/goreleaser/www/docs/customization/git.md +++ b/goreleaser/www/docs/customization/git.md @@ -24,10 +24,19 @@ git: # provided values as either previous or current tags. # # Templates: allowed. - # Since: v1.21. + # Since: v1.21 ignore_tags: - nightly - "{{.Env.IGNORE_TAG}}" + + # Tags that begin with these prefixes will be ignored. + # + # Templates: allowed. + # This feature is only available in GoReleaser Pro. + # Since: v1.24 (pro) + ignore_tag_prefixes: + - foo/ + - "{{.Env.IGNORE_TAG_PREFIX}}/bar" ``` ## Semver sorting diff --git a/goreleaser/www/docs/customization/homebrew.md b/goreleaser/www/docs/customization/homebrew.md index f2fee0d..de5d3c6 100644 --- a/goreleaser/www/docs/customization/homebrew.md +++ b/goreleaser/www/docs/customization/homebrew.md @@ -37,6 +37,11 @@ brews: - foo - bar + # Sets the app file within a DMG. + # + # Since: 1.24 (pro) + app: MyApp.app + # GOARM to specify which 32-bit arm version to use if there are multiple # versions from the build section. Brew formulas support only one 32-bit # version. @@ -167,7 +172,7 @@ brews: # Additional install instructions so you don't need to override `install`. # # Template: allowed - # Since: v1.20. + # Since: v1.20 extra_install: | bash_completion.install "completions/foo.bash" => "foo" man1.install "man/foo.1.gz" diff --git a/goreleaser/www/docs/customization/msi.md b/goreleaser/www/docs/customization/msi.md new file mode 100644 index 0000000..7707098 --- /dev/null +++ b/goreleaser/www/docs/customization/msi.md @@ -0,0 +1,143 @@ +# MSI + +> Since: v1.24 pro + +!!! success "GoReleaser Pro" + + The msi feature is available only in [GoReleaser Pro feature](/pro/). + +GoReleaser can create MSI installers for windows binaries using [msitools][]. + +The `msi` section specifies how the **installers** should be created: + +```yaml +# .goreleaser.yaml +msi: + - # ID of the resulting installer. + # + # Default: the project name + id: foo + + # Filename of the installer (without the extension). + # + # Default: '{{.ProjectName}}_{{.MsiArch}}' + # Templates: allowed + name: "myproject-{{.MsiArch}}" + + # The WXS file used to create the installers. + # The file contents go through the templating engine, so you can do things + # like `{{.Version}}` inside of it. + # + # Templates: allowed + # Required. + wxs: ./windows/app.wsx + + # IDs of the archives to use. + # Empty means all IDs. + ids: + - foo + - bar + + # GOAMD64 to specify which amd64 version to use if there are multiple + # versions from the build section. + # + # Default: v1 + goamd64: v1 + + # More files that will be available in the context in which the installer + # will be built. + extra_files: + - logo.ico + + # Whether to remove the archives from the artifact list. + # If left as false, your end release will have both the zip and the msi + # files. + replace: true + + # Set the modified timestamp on the output installer, typically + # you would do this to ensure a build was reproducible. + # Pass an empty string to skip modifying the output. + # + # Templates: allowed. + mod_timestamp: "{{ .CommitTimestamp }}" +``` + +On Windows, it'll try to use the `candle` and `light` binaries from the +[Wix Toolkit][wix] instead. + +Here's an example `wsx` file that you can build upon: + +```xml + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +## Limitations + +1. Some options available in the [Wix Toolset][wix] won't work with + [msitools][], run a snapshot build and verify the generated installers. +1. Only `amd64` and `386` are supported. + +!!! tip + + Learn more about the [name template engine](/customization/templates/). + +[msitools]: https://wiki.gnome.org/msitools +[wix]: https://wixtoolset.org diff --git a/goreleaser/www/docs/customization/nfpm.md b/goreleaser/www/docs/customization/nfpm.md index 62ff9bd..5b02917 100644 --- a/goreleaser/www/docs/customization/nfpm.md +++ b/goreleaser/www/docs/customization/nfpm.md @@ -94,9 +94,27 @@ nfpms: - fish # Path that the binaries should be installed. + # # Default: '/usr/bin' bindir: /usr/bin + # Paths to the directories where to put specific types of libraries that + # GoReleaser built. + # + # This should be used together with `builds.buildmode` + # + # Since: v1.24. + # Templates: allowed + libdirs: + # Default: '/usr/include' + headers: /usr/include/something + + # Default: '/usr/lib' + cshared: /usr/lib/foo + + # Default: '/usr/lib' + carchive: /usr/lib/foobar + # Version Epoch. # Default: extracted from `version` if it is semver compatible epoch: 2 @@ -330,7 +348,7 @@ nfpms: # Prefixes for relocatable packages. # - # Since: v1.20. + # Since: v1.20 prefixes: - /usr/bin @@ -469,8 +487,7 @@ You can go around that with something like this: ```yaml # .goreleaser.yaml nfpms: - - - # ... + - # ... file_name_template: >- {{- trimsuffix .ConventionalFileName .ConventionalExtension -}} {{- if and (eq .Arm "6") (eq .ConventionalExtension ".deb") }}6{{ end -}} diff --git a/goreleaser/www/docs/customization/nix.md b/goreleaser/www/docs/customization/nix.md index b00c5c7..83e83c2 100644 --- a/goreleaser/www/docs/customization/nix.md +++ b/goreleaser/www/docs/customization/nix.md @@ -76,7 +76,7 @@ nix: # Runtime dependencies of the package. # - # Since: v1.20. + # Since: v1.20 dependencies: - zsh - chromium diff --git a/goreleaser/www/docs/customization/release.md b/goreleaser/www/docs/customization/release.md index 0a4a275..4c5dbd3 100644 --- a/goreleaser/www/docs/customization/release.md +++ b/goreleaser/www/docs/customization/release.md @@ -79,7 +79,7 @@ release: # Available only for GitHub. # # Default is true. - # Since: v1.20. + # Since: v1.20 make_latest: true # What to do with the release notes in case there the release already exists. diff --git a/goreleaser/www/docs/customization/sbom.md b/goreleaser/www/docs/customization/sbom.md index 36741ed..12aecdf 100644 --- a/goreleaser/www/docs/customization/sbom.md +++ b/goreleaser/www/docs/customization/sbom.md @@ -27,8 +27,7 @@ To customize the artifact cataloging pipeline you can use the following options: ```yaml # .goreleaser.yml sboms: - - - # ID of the sbom config, must be unique. + - # ID of the sbom config, must be unique. # # Default: 'default' id: foo @@ -75,14 +74,17 @@ sboms: - FOO=bar - HONK=honkhonk - # Which artifacts to catalog + # Which artifacts to catalog. # - # any: let the SBOM tool decide what artifacts available in the cwd - # should be cataloged - # source: source archive - # package: linux packages (deb, rpm, apk) - # archive: archives from archive pipe - # binary: binaries output from the build stage + # Valid options are: + # - any: let the SBOM tool decide which artifacts available in + # the cwd should be cataloged + # - source: source archive + # - package: Linux packages (deb, rpm, apk, etc) + # - installer: Windows MSI installers (Pro only) + # - diskimage: macOS DMG disk images (Pro only) + # - archive: archives from archive pipe + # - binary: binaries output from the build stage # # Default: 'archive' artifacts: archive @@ -104,7 +106,7 @@ templates: "artifacts" config item is "any") - `${artifactID}`: the ID of the artifact that will be cataloged (unless "artifacts" config item is "any") -- `${document}`: the SBOM filename generated (corresponds to `${document0}` if +- `${document}`: the SBOM filename generated (corresponds to `${document0}` if the "artifacts" config item is "any") - `${document#}`: the SBOM filenames generated, where `#` corresponds to the list index under the "documents" config item (e.g. `${document0}`) @@ -113,4 +115,3 @@ templates: Container images generated by GoReleaser are not available to be cataloged by the SBOM tool. - diff --git a/goreleaser/www/docs/customization/scoop.md b/goreleaser/www/docs/customization/scoop.md index c9c3bf6..ee4c0d4 100644 --- a/goreleaser/www/docs/customization/scoop.md +++ b/goreleaser/www/docs/customization/scoop.md @@ -33,6 +33,16 @@ scoops: # In short, it's generally better to leave this empty. folder: Scoops + # Which format to use. + # + # Valid options are: + # - 'msi': msi installers (requires the MSI pipe configured, Pro only) + # - 'archive': archives (only if format is zip), + # + # Default: 'archive' + # Since: v1.24 (pro) + use: msi + # Git author used to commit to the repository. commit_author: name: goreleaserbot @@ -77,13 +87,13 @@ scoops: # An array of dependencies. # - # Since GoReleaser v1.16 + # Since: v1.16 depends: ["git", "foo"] # A two-dimensional array of string, specifies the shortcut values to make available in the startmenu. # The array has to contain an executable/label pair. The third and fourth element are optional. # - # Since GoReleaser v1.17.0. + # Since: v1.17 shortcuts: [["drumroll.exe", "drumroll"]] # GOAMD64 to specify which amd64 version to use if there are multiple versions diff --git a/goreleaser/www/docs/customization/sign.md b/goreleaser/www/docs/customization/sign.md index ac3a0fe..1a402e3 100644 --- a/goreleaser/www/docs/customization/sign.md +++ b/goreleaser/www/docs/customization/sign.md @@ -54,14 +54,17 @@ signs: # Which artifacts to sign # - # all: all artifacts - # none: no signing - # checksum: only checksum file(s) - # source: source archive - # package: linux packages (deb, rpm, apk) - # archive: archives from archive pipe - # binary: binaries if archiving format is set to binary - # sbom: any Software Bill of Materials generated for other artifacts + # Valid options are: + # - none no signing + # - all: all artifacts + # - checksum: checksum files + # - source: source archive + # - package: Linux packages (deb, rpm, apk, etc) + # - installer: Windows MSI installers (Pro only) + # - diskimage: macOS DMG disk images (Pro only) + # - archive: archives from archive pipe + # - binary: binaries output from the build stage + # - sbom: any SBOMs generated for other artifacts # # Default: 'none' artifacts: all @@ -152,7 +155,12 @@ Executables can be signed after build using post hooks. ### With gon -For example, you can use [gon][] to create notarized macOS apps: +!!! notice + + [gon][] was discontinued by its maintainer, but it lives on in a + [fork][gon-fork], which we'll use here. + +For example, you can use [gon][gon-fork] to create notarized macOS apps: ```yaml # .goreleaser.yaml @@ -176,7 +184,7 @@ builds: post: gon gon.hcl ``` -and: +And: ```terraform # gon.hcl @@ -260,4 +268,5 @@ And it will work just fine. Just make sure to always use the `${signature}` template variable as the result file name and `${artifact}` as the origin file. [gon]: https://github.com/mitchellh/gon +[gon-fork]: https://github.com/Bearer/gon [cosign]: https://github.com/sigstore/cosign diff --git a/goreleaser/www/docs/customization/snapcraft.md b/goreleaser/www/docs/customization/snapcraft.md index f1404b8..01551c0 100644 --- a/goreleaser/www/docs/customization/snapcraft.md +++ b/goreleaser/www/docs/customization/snapcraft.md @@ -43,13 +43,13 @@ snapcrafts: # The canonical title of the application, displayed in the software # centre graphical frontends. # - # Since: v1.19. + # Since: v1.19 title: Drum Roll # Path to icon image that represents the snap in the snapcraft.io store # pages and other graphical store fronts. # - # Since: v1.19. + # Since: v1.19 icon: ./icon.png # Whether to publish the snap to the snapcraft store. @@ -119,14 +119,14 @@ snapcrafts: # A list of features that must be supported by the core in order for # this snap to install. # - # Since: v1.19. + # Since: v1.19 assumes: - snapd2.38 # his top-level keyword to define a hook with a plug to access more # privileges. # - # Since: v1.19. + # Since: v1.19 hooks: install: - network diff --git a/goreleaser/www/docs/customization/templates.md b/goreleaser/www/docs/customization/templates.md index 14c00d6..38c23ac 100644 --- a/goreleaser/www/docs/customization/templates.md +++ b/goreleaser/www/docs/customization/templates.md @@ -25,6 +25,8 @@ In fields that support templates, these fields are always available: | `.CommitDate` | the UTC commit date in RFC 3339 format | | `.CommitTimestamp` | the UTC commit date in Unix format | | `.GitURL` | the git remote url | +| `.GitTreeState` | either 'clean' or 'dirty'. Since v1.24 | +| `.IsGitClean` | whether or not current git state is clean. Since v1.24 | | `.IsGitDirty` | whether or not current git state is dirty. Since v1.19 | | `.Major` | the major part of the version[^tag-is-semver] | | `.Minor` | the minor part of the version[^tag-is-semver] | @@ -119,6 +121,7 @@ In the nFPM name template field, you can use those extra fields: | `.PackageName` | package the name. Same as `ProjectName` if not overridden. | | `.ConventionalFileName` | conventional package file name as provided by nFPM.[^arm-names] | | `.ConventionalExtension` | conventional package extension as provided by nFPM. Since v1.16 | +| `.Format` | package format. Since v1.24 | [^arm-names]: Please beware: some OSs might have the same names for different @@ -139,10 +142,11 @@ In the `release.body` field, you can use these extra fields: On all fields, you have these available functions: | Usage | Description | -|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `replace "v1.2" "v" ""` | replaces all matches. See [ReplaceAll](https://golang.org/pkg/strings/#ReplaceAll). | | `split "1.2" "."` | split string at separator. See [Split](https://golang.org/pkg/strings/#Split). Since v1.11 | | `time "01/02/2006"` | current UTC time in the specified format (this is not deterministic, a new time for every call). | +| `contains "foobar" "foo"` | checks whether the first string contains the second. See [ToLower](https://golang.org/pkg/strings/#Contains). Since 1.24 | | `tolower "V1.2"` | makes input string lowercase. See [ToLower](https://golang.org/pkg/strings/#ToLower). | | `toupper "v1.2"` | makes input string uppercase. See [ToUpper](https://golang.org/pkg/strings/#ToUpper). | | `trim " v1.2 "` | removes all leading and trailing white space. See [TrimSpace](https://golang.org/pkg/strings/#TrimSpace). | @@ -156,7 +160,7 @@ On all fields, you have these available functions: | `title "foo"` | "titlenize" the string using english as language. See [Title](https://pkg.go.dev/golang.org/x/text/cases#Title). Since v1.14 | | `mdv2escape "foo"` | escape characters according to MarkdownV2, especially useful in the Telegram integration. Since v1.19 | | `envOrDefault "NAME" "value"` | either gets the value of the given environment variable, or the given default. Since v1.19 | -| `$m := map "KEY" "VALUE"` | creates a map from a list of key and value pairs. Both keys and values must be of type `string`. Since v1.21 | +| `$m := map "KEY" "VALUE"` | creates a map from a list of key and value pairs. Both keys and values must be of type `string`. Since v1.21 | | `indexOrDefault $m "KEY" "value"` | either gets the value of the given key or the given default value from the given map. Since v1.21 | With all those fields, you may be able to compose the name of your artifacts diff --git a/goreleaser/www/docs/customization/universalbinaries.md b/goreleaser/www/docs/customization/universalbinaries.md index 783d793..1495255 100644 --- a/goreleaser/www/docs/customization/universalbinaries.md +++ b/goreleaser/www/docs/customization/universalbinaries.md @@ -9,7 +9,7 @@ Here's how to use it: ```yaml # .goreleaser.yaml universal_binaries: - - # ID of resulting universal binary. + - # ID of the resulting universal binary. # # Default: the project name id: foo @@ -31,16 +31,16 @@ universal_binaries: name_template: "{{.ProjectName}}_{{.Version}}" # Whether to remove the previous single-arch binaries from the artifact list. - # If left as false, your end release might have both several macOS archives: - # amd64, arm64 and all. + # If left as false, your end release might have as much as three + # archives for macOS: 'amd64', 'arm64' and 'all'. replace: true # Set the modified timestamp on the output binary, typically - # you would do this to ensure a build was reproducible. Pass - # empty string to skip modifying the output. + # you would do this to ensure a build was reproducible. + # Pass an empty string to skip modifying the output. # # Templates: allowed. - # Since: v1.20. + # Since: v1.20 mod_timestamp: "{{ .CommitTimestamp }}" # Hooks can be used to customize the final binary, diff --git a/goreleaser/www/docs/customization/winget.md b/goreleaser/www/docs/customization/winget.md index 6c8bd08..db73cfa 100644 --- a/goreleaser/www/docs/customization/winget.md +++ b/goreleaser/www/docs/customization/winget.md @@ -57,12 +57,31 @@ winget: - foo - bar + # Which format to use. + # + # Valid options are: + # - '': archives or binaries + # - 'msi': msi installers (requires the MSI pipe configured, Pro only) + # - 'archive': archives (only if format is zip), + # - 'binary': binaries + # + # Default: '' + # Since: v1.24 (pro) + use: msi + # GOAMD64 to specify which amd64 version to use if there are multiple # versions from the build section. # # Default: v1 goamd64: v1 + # Product code to be used. + # + # Usually needed when `use: msi`. + # + # Since: v1.24 (pro) + product_code: AAAA-BBB-CCC-DDD-EEEFFF + # URL which is determined by the given Token (github, gitlab or gitea). # # Default depends on the client. diff --git a/goreleaser/www/docs/deprecations.md b/goreleaser/www/docs/deprecations.md index 593cec1..00d042f 100644 --- a/goreleaser/www/docs/deprecations.md +++ b/goreleaser/www/docs/deprecations.md @@ -2,8 +2,10 @@ This page is used to list deprecation notices across GoReleaser. -Deprecated options will be removed after ~6 months from the time they were -deprecated. +Deprecated options are only removed on major versions of GoReleaser. + +Nevertheless, it's a good thing to keep your configuration up-to-date to prevent +any issues. You can check your use of deprecated configurations by running: @@ -25,18 +27,78 @@ Description. === "Before" - ``` yaml + ```yaml foo: bar ``` === "After" - ``` yaml + ```yaml foo: bar ``` --> +### changelog.skip + +> since 2024-01-14 + +Changed to `disable` to conform with all other pipes. + +=== "Before" + + ```yaml + changelog: + skip: true + ``` + +=== "After" + + ```yaml + changelog: + disable: true + ``` + +### blobs.kmskey + +> since 2024-01-07 + +Changed to `kms_key` to conform with all other options. + +=== "Before" + + ```yaml + blobs: + - kmskey: foo + ``` + +=== "After" + + ```yaml + blobs: + - kms_key: foo + ``` + +### blobs.disableSSL + +> since 2024-01-07 + +Changed to `disable_ssl` to conform with all other options. + +=== "Before" + + ```yaml + blobs: + - disableSSL: true + ``` + +=== "After" + + ```yaml + blobs: + - disable_ssl: true + ``` + ### `--skip` > since 2023-09-14 @@ -237,14 +299,14 @@ GoReleaser now allows many `scoop` configurations, so it should be pluralized === "Before" - ``` yaml + ```yaml scoop: # ... ``` === "After" - ``` yaml + ```yaml scoops: - # ... ``` @@ -261,14 +323,14 @@ Simply use the pluralized form, `builds`, according to the === "Before" - ``` yaml + ```yaml build: # ... ``` === "After" - ``` yaml + ```yaml builds: - # ... ``` @@ -338,7 +400,7 @@ enable this option and test it out with === "After" - ``` yaml + ```yaml archives: - rlcp: true @@ -352,7 +414,7 @@ Same as [`archives.rlcp`](#archivesrlcp). === "After" - ``` yaml + ```yaml source: rlcp: true ``` @@ -389,7 +451,7 @@ You can still get the same features by abusing the `name_template` property. === "Before" - ``` yaml + ```yaml archives: - id: foo name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' @@ -403,7 +465,7 @@ You can still get the same features by abusing the `name_template` property. === "After" - ``` yaml + ```yaml archives: - id: foo name_template: >- @@ -430,7 +492,7 @@ You can still get the same features by abusing the `file_name_template` property === "Before" - ``` yaml + ```yaml nfpms: - id: foo file_name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' @@ -444,7 +506,7 @@ You can still get the same features by abusing the `file_name_template` property === "After" - ``` yaml + ```yaml nfpms: - id: foo file_name_template: >- @@ -471,7 +533,7 @@ You can still get the same features by abusing the `name_template` property. === "Before" - ``` yaml + ```yaml snapcrafts: - id: foo name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' @@ -485,7 +547,7 @@ You can still get the same features by abusing the `name_template` property. === "After" - ``` yaml + ```yaml snapcrafts: - id: foo name_template: >- @@ -509,7 +571,7 @@ On [GoReleaser PRO](/pro/) custom variables should now be prefixed with `.Var`. === "Before" - ``` yaml + ```yaml variables: foo: bar some_template: 'lala-{{ .foo }}' @@ -517,7 +579,7 @@ On [GoReleaser PRO](/pro/) custom variables should now be prefixed with `.Var`. === "After" - ``` yaml + ```yaml variables: foo: bar some_template: 'lala-{{ .Var.foo }}' @@ -547,7 +609,7 @@ nFPM empty folders is now deprecated in favor of a `dir` content type: === "Before" - ``` yaml + ```yaml nfpms: - empty_folders: - /foo/bar @@ -555,7 +617,7 @@ nFPM empty folders is now deprecated in favor of a `dir` content type: === "After" - ``` yaml + ```yaml nfpms: - contents: - dst: /foo/bar @@ -936,14 +998,14 @@ so the name `puts` kind of lost its meaning. === "Before" - ``` yaml + ```yaml puts: - ... ``` === "After" - ``` yaml + ```yaml uploads: - ... ``` @@ -960,14 +1022,14 @@ The `name_template` field was deprecated in favor of a more clear one, === "Before" - ``` yaml + ```yaml nfpms: - name_template: foo ``` === "After" - ``` yaml + ```yaml nfpms: - file_name_template: foo ``` diff --git a/goreleaser/www/docs/includes/repository.md b/goreleaser/www/docs/includes/repository.md index 63b706d..c729f04 100644 --- a/goreleaser/www/docs/includes/repository.md +++ b/goreleaser/www/docs/includes/repository.md @@ -38,7 +38,7 @@ # If the pull request template has checkboxes, enabling this will # check all of them. # - # Since: v1.20 (pro). + # Since: v1.20 (pro) # This feature is only available in GoReleaser Pro. check_boxes: true diff --git a/goreleaser/www/docs/install.md b/goreleaser/www/docs/install.md index 10d9f97..3b8aef3 100644 --- a/goreleaser/www/docs/install.md +++ b/goreleaser/www/docs/install.md @@ -235,12 +235,23 @@ Use it for testing out new features only. #### manually +=== "OSS" + + Download the pre-compiled binaries from the [nightly release][nightly-releases] and copy them to the desired location. + === "Pro" - Download the pre-compiled binaries from the [nightly release][nighly-pro-releases] and copy them to the desired location. + Download the pre-compiled binaries from the [nightly release][nightly-pro-releases] and copy them to the desired location. ### bash script +=== "OSS" + + ```bash + curl -sfL https://goreleaser.com/static/run | + VERSION=nightly DISTRIBUTION=oss bash -s -- release --clean + ``` + === "Pro" ```bash @@ -250,9 +261,18 @@ Use it for testing out new features only. #### docker -=== "Pro" +Docker images are also available, look for tags with a `-nightly` suffix for +the last nightly of a specific release, or the `:nightly` tag, +which is always the latest nightly build available. + +=== "OSS" + + Registries: - Docker images are also available, look for tags with a `-nightly` suffix. + - [`goreleaser/goreleaser`](https://hub.docker.com/r/goreleaser/goreleaser) + - [`ghcr.io/goreleaser/goreleaser`](https://github.com/goreleaser/goreleaser/pkgs/container/goreleaser) + +=== "Pro" Registries: @@ -399,6 +419,7 @@ and iterate from that. [releases]: https://github.com/goreleaser/goreleaser/releases [pro-releases]: https://github.com/goreleaser/goreleaser-pro/releases [nightly-pro-releases]: https://github.com/goreleaser/goreleaser-pro/releases/nightly +[nightly-releases]: https://github.com/goreleaser/goreleaser/releases/nightly [cosign]: https://github.com/sigstore/cosign ## Packaging status diff --git a/goreleaser/www/docs/pro.md b/goreleaser/www/docs/pro.md index 1b0bfe7..5c90f7f 100644 --- a/goreleaser/www/docs/pro.md +++ b/goreleaser/www/docs/pro.md @@ -3,7 +3,9 @@ GoReleaser Pro is a paid, closed-source GoReleaser distribution with some additional features: -- [x] `goreleaser release --single-target` to build the whole pipeline for a +- [x] Create [macOS disk images (DMGs)](/customization/dmg); +- [x] Create [Windows installers](/customization/msi); +- [x] Use `goreleaser release --single-target` to build the whole pipeline for a single architecture locally; - [x] Check boxes in pull request templates; - [x] [Template entire files](/customization/templatefiles) and add them to the @@ -50,11 +52,9 @@ additional features: We don't have a properly organized public road map (_yet_), but these are some of the things we plan to work on, in one form or another: -- [x] `--single-target` & friends for `goreleaser release`; - [ ] `--dry-run` to test the release locally, possibly skipping the actual build of the binaries to focus on faster iteration of the other parts; - [ ] first-class macOS signing; -- [ ] create Windows installers; That said, your input is always welcome! Once you buy it, feel free to diff --git a/goreleaser/www/docs/static/latest b/goreleaser/www/docs/static/latest index 1f3000c..645dc7a 100644 --- a/goreleaser/www/docs/static/latest +++ b/goreleaser/www/docs/static/latest @@ -1 +1 @@ -v1.22.1 +v1.23.0 diff --git a/goreleaser/www/docs/static/latest-pro b/goreleaser/www/docs/static/latest-pro index e755bd5..025bbf4 100644 --- a/goreleaser/www/docs/static/latest-pro +++ b/goreleaser/www/docs/static/latest-pro @@ -1 +1 @@ -v1.22.1-pro +v1.23.0-pro diff --git a/goreleaser/www/docs/static/releases-pro.json b/goreleaser/www/docs/static/releases-pro.json index 0b2e4ac..90ef0fb 100644 --- a/goreleaser/www/docs/static/releases-pro.json +++ b/goreleaser/www/docs/static/releases-pro.json @@ -1,4 +1,7 @@ [ + { + "tag_name": "v1.23.0-pro" + }, { "tag_name": "v1.22.1-pro" }, diff --git a/goreleaser/www/docs/static/releases.json b/goreleaser/www/docs/static/releases.json index dee5b7a..3a9d771 100644 --- a/goreleaser/www/docs/static/releases.json +++ b/goreleaser/www/docs/static/releases.json @@ -1,12 +1,15 @@ [ { - "tag_name": "v1.22.1" + "tag_name": "v1.23.0" }, { - "tag_name": "v1.22.0" + "tag_name": "nightly" }, { - "tag_name": "nightly" + "tag_name": "v1.22.1" + }, + { + "tag_name": "v1.22.0" }, { "tag_name": "v1.21.2" diff --git a/goreleaser/www/docs/static/run b/goreleaser/www/docs/static/run index 7fea12b..73a6923 100755 --- a/goreleaser/www/docs/static/run +++ b/goreleaser/www/docs/static/run @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [[ "$VERSION" == *-pro ]]; then diff --git a/goreleaser/www/docs/static/schema-pro.json b/goreleaser/www/docs/static/schema-pro.json index fd77133..c448117 100644 --- a/goreleaser/www/docs/static/schema-pro.json +++ b/goreleaser/www/docs/static/schema-pro.json @@ -288,13 +288,13 @@ "region": { "type": "string" }, - "disableSSL": { + "disable_ssl": { "type": "boolean" }, "folder": { "type": "string" }, - "kmskey": { + "kms_key": { "type": "string" }, "ids": { @@ -322,6 +322,29 @@ } ] }, + "s3_force_path_style": { + "type": "boolean" + }, + "acl": { + "type": "string" + }, + "cache_control": { + "items": { + "type": "string" + }, + "type": "array" + }, + "content_disposition": { + "type": "string" + }, + "disableSSL": { + "type": "boolean", + "description": "use disable_ssl instead" + }, + "kmskey": { + "type": "string", + "description": "use kms_key instead" + }, "templated_extra_files": { "items": { "$ref": "#/$defs/TemplatedExtraFile" @@ -413,7 +436,13 @@ "type": "boolean" }, "buildmode": { - "type": "string" + "type": "string", + "enum": [ + "c-archive", + "c-shared", + "" + ], + "default": "" }, "ldflags": { "$ref": "#/$defs/StringArray" @@ -474,7 +503,13 @@ "type": "string" }, "buildmode": { - "type": "string" + "type": "string", + "enum": [ + "c-archive", + "c-shared", + "" + ], + "default": "" }, "ldflags": { "$ref": "#/$defs/StringArray" @@ -527,7 +562,7 @@ ], "default": "" }, - "skip": { + "disable": { "oneOf": [ { "type": "string" @@ -564,6 +599,17 @@ "type": "string" }, "type": "array" + }, + "skip": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "use disable instead" } }, "additionalProperties": false, @@ -717,6 +763,14 @@ }, "goamd64": { "type": "string" + }, + "use": { + "type": "string", + "enum": [ + "archive", + "msi" + ], + "default": "archive" } }, "additionalProperties": false, @@ -808,6 +862,42 @@ }, "type": "array" }, + "DMG": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "goamd64": { + "type": "string" + }, + "extra_files": { + "items": { + "type": "string" + }, + "type": "array" + }, + "replace": { + "type": "boolean" + }, + "mod_timestamp": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name" + ] + }, "Discord": { "properties": { "enabled": { @@ -1005,7 +1095,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/goreleaser/goreleaser/pkg/config/t", + "$id": "https://github.com/goreleaser/goreleaser/pkg/config/file-alias", "$defs": { "FileInfo": { "properties": { @@ -1170,6 +1260,12 @@ "type": "string" }, "type": "array" + }, + "ignore_tag_prefixes": { + "items": { + "type": "string" + }, + "type": "array" } }, "additionalProperties": false, @@ -1368,6 +1464,9 @@ }, "type": "array" }, + "app": { + "type": "string" + }, "tap": { "$ref": "#/$defs/RepoRef", "description": "use repository instead" @@ -1426,7 +1525,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/goreleaser/goreleaser/pkg/config/t", + "$id": "https://github.com/goreleaser/goreleaser/pkg/config/hook-alias", "properties": { "dir": { "type": "string" @@ -1720,6 +1819,21 @@ "additionalProperties": false, "type": "object" }, + "Libdirs": { + "properties": { + "header": { + "type": "string" + }, + "carchive": { + "type": "string" + }, + "cshared": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "LinkedIn": { "properties": { "enabled": { @@ -1732,6 +1846,46 @@ "additionalProperties": false, "type": "object" }, + "MSI": { + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "wxs": { + "type": "string" + }, + "ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "goamd64": { + "type": "string" + }, + "extra_files": { + "items": { + "type": "string" + }, + "type": "array" + }, + "replace": { + "type": "boolean" + }, + "mod_timestamp": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "name", + "wxs" + ] + }, "Mastodon": { "properties": { "enabled": { @@ -1947,6 +2101,9 @@ "bindir": { "type": "string" }, + "libdirs": { + "$ref": "#/$defs/Libdirs" + }, "changelog": { "type": "string" }, @@ -2361,7 +2518,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/goreleaser/goreleaser/pkg/config/t", + "$id": "https://github.com/goreleaser/goreleaser/pkg/config/nix-dependency-alias", "properties": { "name": { "type": "string" @@ -2468,6 +2625,18 @@ }, "type": "array" }, + "msi": { + "items": { + "$ref": "#/$defs/MSI" + }, + "type": "array" + }, + "dmg": { + "items": { + "$ref": "#/$defs/DMG" + }, + "type": "array" + }, "aurs": { "items": { "$ref": "#/$defs/AUR" @@ -2985,9 +3154,10 @@ "enum": [ "source", "package", + "diskimage", + "installer", "archive", "binary", - "any", "any" ], "default": "archive" @@ -3119,6 +3289,14 @@ "goamd64": { "type": "string" }, + "use": { + "type": "string", + "enum": [ + "archive", + "msi" + ], + "default": "archive" + }, "bucket": { "$ref": "#/$defs/RepoRef", "description": "use repository instead" @@ -3155,7 +3333,9 @@ "package", "archive", "binary", - "sbom" + "sbom", + "installer", + "diskimage" ] }, "ids": { @@ -3979,12 +4159,23 @@ "$ref": "#/$defs/WingetDependency" }, "type": "array" + }, + "product_code": { + "type": "string" + }, + "use": { + "type": "string", + "enum": [ + "archive", + "binary", + "msi" + ] } }, "additionalProperties": false, "type": "object", "required": [ - "package_identifier", + "name", "publisher", "repository", "short_description", diff --git a/goreleaser/www/docs/static/schema.json b/goreleaser/www/docs/static/schema.json index 87f5131..029f020 100644 --- a/goreleaser/www/docs/static/schema.json +++ b/goreleaser/www/docs/static/schema.json @@ -261,13 +261,13 @@ "region": { "type": "string" }, - "disableSSL": { + "disable_ssl": { "type": "boolean" }, "folder": { "type": "string" }, - "kmskey": { + "kms_key": { "type": "string" }, "ids": { @@ -294,6 +294,29 @@ "type": "boolean" } ] + }, + "s3_force_path_style": { + "type": "boolean" + }, + "acl": { + "type": "string" + }, + "cache_control": { + "items": { + "type": "string" + }, + "type": "array" + }, + "content_disposition": { + "type": "string" + }, + "disableSSL": { + "type": "boolean", + "description": "use disable_ssl instead" + }, + "kmskey": { + "type": "string", + "description": "use kms_key instead" } }, "additionalProperties": false, @@ -380,7 +403,13 @@ "type": "boolean" }, "buildmode": { - "type": "string" + "type": "string", + "enum": [ + "c-archive", + "c-shared", + "" + ], + "default": "" }, "ldflags": { "$ref": "#/$defs/StringArray" @@ -438,7 +467,13 @@ "type": "string" }, "buildmode": { - "type": "string" + "type": "string", + "enum": [ + "c-archive", + "c-shared", + "" + ], + "default": "" }, "ldflags": { "$ref": "#/$defs/StringArray" @@ -491,7 +526,7 @@ ], "default": "" }, - "skip": { + "disable": { "oneOf": [ { "type": "string" @@ -519,6 +554,17 @@ }, "abbrev": { "type": "integer" + }, + "skip": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ], + "description": "use disable instead" } }, "additionalProperties": false, @@ -913,7 +959,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/goreleaser/goreleaser/pkg/config/t", + "$id": "https://github.com/goreleaser/goreleaser/pkg/config/file-alias", "$defs": { "FileInfo": { "properties": { @@ -1300,7 +1346,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/goreleaser/goreleaser/pkg/config/t", + "$id": "https://github.com/goreleaser/goreleaser/pkg/config/hook-alias", "properties": { "dir": { "type": "string" @@ -1499,6 +1545,21 @@ "additionalProperties": false, "type": "object" }, + "Libdirs": { + "properties": { + "header": { + "type": "string" + }, + "carchive": { + "type": "string" + }, + "cshared": { + "type": "string" + } + }, + "additionalProperties": false, + "type": "object" + }, "LinkedIn": { "properties": { "enabled": { @@ -1699,6 +1760,9 @@ "bindir": { "type": "string" }, + "libdirs": { + "$ref": "#/$defs/Libdirs" + }, "changelog": { "type": "string" }, @@ -2089,7 +2153,7 @@ }, { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/goreleaser/goreleaser/pkg/config/t", + "$id": "https://github.com/goreleaser/goreleaser/pkg/config/nix-dependency-alias", "properties": { "name": { "type": "string" @@ -3559,7 +3623,7 @@ "additionalProperties": false, "type": "object", "required": [ - "package_identifier", + "name", "publisher", "repository", "short_description", diff --git a/goreleaser/www/docs/users.md b/goreleaser/www/docs/users.md index ccd32e1..0e5774f 100644 --- a/goreleaser/www/docs/users.md +++ b/goreleaser/www/docs/users.md @@ -95,4 +95,4 @@ If you're going to edit it, please: [^1]: Entries were either added by the companies themselves or by the maintainers after seeing it in the wild. - You can see all public repositories using GoReleaser by [searching on GitHub](https://github.com/search?q=filename%3Agoreleaser+language%3Ayaml+path%3A%2F). + You can see all public repositories using GoReleaser by [searching on GitHub](https://github.com/search?q=path%3A.goreleaser.yml+OR+path%3A.goreleaser.yaml+&type=code). diff --git a/goreleaser/www/htmltest.yml b/goreleaser/www/htmltest.yml index 49bd64e..66cfbbb 100644 --- a/goreleaser/www/htmltest.yml +++ b/goreleaser/www/htmltest.yml @@ -20,6 +20,7 @@ IgnoreURLs: - docs.github.com - help.github.com - twitter.com + - medium.com IgnoreDirs: - overrides IgnoreDirectoryMissingTrailingSlash: true diff --git a/goreleaser/www/mkdocs.yml b/goreleaser/www/mkdocs.yml index 9a1ce74..90ee6fc 100644 --- a/goreleaser/www/mkdocs.yml +++ b/goreleaser/www/mkdocs.yml @@ -78,13 +78,13 @@ extra: nav: - Home: index.md - Getting Started: - - intro.md - - install.md - - quick-start.md - - how-it-works.md - - Limitations: - - limitations/cgo.md - - limitations/semver.md + - intro.md + - install.md + - quick-start.md + - how-it-works.md + - Limitations: + - limitations/cgo.md + - limitations/semver.md - Customization: - customization/index.md - Basics: @@ -106,6 +106,8 @@ nav: - Packaging and Archiving: - customization/archive.md - customization/nfpm.md + - customization/dmg.md + - customization/msi.md - customization/checksum.md - customization/snapcraft.md - customization/chocolatey.md @@ -170,58 +172,57 @@ nav: - ci/travis.md - ci/woodpecker.md - - More resources: - - sponsors.md - - users.md - - deprecations.md - - Common errors: - - errors/dirty.md - - errors/multiple-tokens.md - - errors/release-upload.md - - errors/docker-build.md - - errors/no-main.md - - errors/build.md - - errors/resource-not-accessible-by-integration.md - - errors/no-history.md - - errors/multiple-binaries-archive.md - - errors/scoop-archive.md - - Cookbooks: - - About: cookbooks/index.md - - Blog Posts: cookbooks/blog-posts.md - - Add a new cookbook: cookbooks/contributing.md - - cookbooks/private-monorepo-public-release.md - - cookbooks/multi-platform-docker-images.md - - cookbooks/build-go-modules.md - - cookbooks/cgo-and-crosscompiling.md - - cookbooks/debconf-templates.md - - cookbooks/using-jfrog-cli-to-publish-to-artifactory.md - - cookbooks/publish-to-nexus.md - - cookbooks/release-a-library.md - - cookbooks/semantic-release.md - - cookbooks/set-a-custom-git-tag.md - - cookbooks/using-main.version.md - - cookbooks/override-image-name.md - - cookbooks/goreleaser-xx.md - - Command Line Usage: - - cmd/goreleaser.md - - cmd/goreleaser_init.md - - cmd/goreleaser_healthcheck.md - - cmd/goreleaser_check.md - - cmd/goreleaser_changelog.md - - cmd/goreleaser_build.md - - cmd/goreleaser_release.md - - cmd/goreleaser_continue.md - - cmd/goreleaser_publish.md - - cmd/goreleaser_announce.md - - cmd/goreleaser_completion.md - - cmd/goreleaser_completion_bash.md - - cmd/goreleaser_completion_fish.md - - cmd/goreleaser_completion_powershell.md - - cmd/goreleaser_completion_zsh.md - - cmd/goreleaser_jsonschema.md - - contributing.md - - links.md + - sponsors.md + - users.md + - deprecations.md + - Common errors: + - errors/dirty.md + - errors/multiple-tokens.md + - errors/release-upload.md + - errors/docker-build.md + - errors/no-main.md + - errors/build.md + - errors/resource-not-accessible-by-integration.md + - errors/no-history.md + - errors/multiple-binaries-archive.md + - errors/scoop-archive.md + - Cookbooks: + - About: cookbooks/index.md + - Blog Posts: cookbooks/blog-posts.md + - Add a new cookbook: cookbooks/contributing.md + - cookbooks/private-monorepo-public-release.md + - cookbooks/multi-platform-docker-images.md + - cookbooks/build-go-modules.md + - cookbooks/cgo-and-crosscompiling.md + - cookbooks/debconf-templates.md + - cookbooks/using-jfrog-cli-to-publish-to-artifactory.md + - cookbooks/publish-to-nexus.md + - cookbooks/release-a-library.md + - cookbooks/semantic-release.md + - cookbooks/set-a-custom-git-tag.md + - cookbooks/using-main.version.md + - cookbooks/override-image-name.md + - cookbooks/goreleaser-xx.md + - Command Line Usage: + - cmd/goreleaser.md + - cmd/goreleaser_init.md + - cmd/goreleaser_healthcheck.md + - cmd/goreleaser_check.md + - cmd/goreleaser_changelog.md + - cmd/goreleaser_build.md + - cmd/goreleaser_release.md + - cmd/goreleaser_continue.md + - cmd/goreleaser_publish.md + - cmd/goreleaser_announce.md + - cmd/goreleaser_completion.md + - cmd/goreleaser_completion_bash.md + - cmd/goreleaser_completion_fish.md + - cmd/goreleaser_completion_powershell.md + - cmd/goreleaser_completion_zsh.md + - cmd/goreleaser_jsonschema.md + - contributing.md + - links.md - Get Pro: pro.md - Blog: - blog/index.md