You've already forked goreleaser
							
							
				mirror of
				https://github.com/goreleaser/goreleaser.git
				synced 2025-10-30 23:58:09 +02:00 
			
		
		
		
	feat: consistently use directory in property names (#4737)
It was a mess of "folder" x "directory", so changed it all to "directory". Closes #4732
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							5a8b6d41fb
						
					
				
				
					commit
					7fc93995b8
				
			| @@ -187,7 +187,7 @@ brews: | ||||
|   - repository: | ||||
|       owner: goreleaser | ||||
|       name: homebrew-tap | ||||
|     folder: Formula | ||||
|     directory: Formula | ||||
|     goarm: "7" | ||||
|     homepage: https://goreleaser.com | ||||
|     description: Deliver Go binaries as fast and easily as possible | ||||
| @@ -268,7 +268,7 @@ scoops: | ||||
|   - repository: | ||||
|       owner: goreleaser | ||||
|       name: scoop-bucket | ||||
|     folder: bucket | ||||
|     directory: bucket | ||||
|     homepage: https://goreleaser.com | ||||
|     description: Deliver Go binaries as fast and easily as possible | ||||
|     license: MIT | ||||
|   | ||||
							
								
								
									
										2
									
								
								USERS.md
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								USERS.md
									
									
									
									
									
								
							| @@ -111,7 +111,7 @@ Feel free to [add yours](https://github.com/goreleaser/goreleaser/edit/main/USER | ||||
| Hey! Thanks for looking into this file! | ||||
| If you're going to edit it, please: | ||||
| - keep a-z ordering :) | ||||
| - edit only the USERS.md file at the repository's root folder | ||||
| - edit only the USERS.md file at the repository's root directory | ||||
| - /www/docs/users.md is auto-copied from /USERS.md | ||||
| --> | ||||
|  | ||||
|   | ||||
| @@ -85,8 +85,8 @@ When using ` + "`--single-target`" + `, the ` + "`GOOS`" + ` and ` + "`GOARCH`" | ||||
| 	cmd.Flags().BoolVar(&root.opts.skipValidate, "skip-validate", false, "Skips several sanity checks") | ||||
| 	cmd.Flags().BoolVar(&root.opts.skipBefore, "skip-before", false, "Skips global before hooks") | ||||
| 	cmd.Flags().BoolVar(&root.opts.skipPostHooks, "skip-post-hooks", false, "Skips all post-build hooks") | ||||
| 	cmd.Flags().BoolVar(&root.opts.clean, "clean", false, "Remove the dist folder before building") | ||||
| 	cmd.Flags().BoolVar(&root.opts.rmDist, "rm-dist", false, "Remove the dist folder before building") | ||||
| 	cmd.Flags().BoolVar(&root.opts.clean, "clean", false, "Removes the 'dist' directory before building") | ||||
| 	cmd.Flags().BoolVar(&root.opts.rmDist, "rm-dist", false, "Removes the 'dist' directory before building") | ||||
| 	cmd.Flags().IntVarP(&root.opts.parallelism, "parallelism", "p", 0, "Amount tasks to run concurrently (default: number of CPUs)") | ||||
| 	_ = cmd.RegisterFlagCompletionFunc("parallelism", cobra.NoFileCompletions) | ||||
| 	cmd.Flags().DurationVar(&root.opts.timeout, "timeout", 30*time.Minute, "Timeout to the entire build process") | ||||
|   | ||||
| @@ -107,8 +107,8 @@ func newReleaseCmd() *releaseCmd { | ||||
| 	cmd.Flags().BoolVar(&root.opts.skipKo, "skip-ko", false, "Skips Ko builds") | ||||
| 	cmd.Flags().BoolVar(&root.opts.skipBefore, "skip-before", false, "Skips global before hooks") | ||||
| 	cmd.Flags().BoolVar(&root.opts.skipValidate, "skip-validate", false, "Skips git checks") | ||||
| 	cmd.Flags().BoolVar(&root.opts.clean, "clean", false, "Removes the dist folder") | ||||
| 	cmd.Flags().BoolVar(&root.opts.rmDist, "rm-dist", false, "Removes the dist folder") | ||||
| 	cmd.Flags().BoolVar(&root.opts.clean, "clean", false, "Removes the 'dist' directory") | ||||
| 	cmd.Flags().BoolVar(&root.opts.rmDist, "rm-dist", false, "Removes the 'dist' directory") | ||||
| 	cmd.Flags().IntVarP(&root.opts.parallelism, "parallelism", "p", 0, "Amount tasks to run concurrently (default: number of CPUs)") | ||||
| 	_ = cmd.RegisterFlagCompletionFunc("parallelism", cobra.NoFileCompletions) | ||||
| 	cmd.Flags().DurationVar(&root.opts.timeout, "timeout", 30*time.Minute, "Timeout to the entire release process") | ||||
|   | ||||
| @@ -59,6 +59,10 @@ func (Pipe) Default(ctx *context.Context) error { | ||||
| 		if archive.ID == "" { | ||||
| 			archive.ID = "default" | ||||
| 		} | ||||
| 		if archive.StripParentBinaryFolder { | ||||
| 			archive.StripBinaryDirectory = true | ||||
| 			deprecate.Notice(ctx, "archives.strip_parent_binary_folder") | ||||
| 		} | ||||
| 		if archive.RLCP != "" && archive.Format != "binary" && len(archive.Files) > 0 { | ||||
| 			deprecate.Notice(ctx, "archives.rlcp") | ||||
| 		} | ||||
| @@ -202,7 +206,7 @@ func create(ctx *context.Context, arch config.Archive, binaries []*artifact.Arti | ||||
| 	bins := []string{} | ||||
| 	for _, binary := range binaries { | ||||
| 		dst := binary.Name | ||||
| 		if arch.StripParentBinaryFolder { | ||||
| 		if arch.StripBinaryDirectory { | ||||
| 			dst = filepath.Base(dst) | ||||
| 		} | ||||
| 		if err := a.Add(config.File{ | ||||
|   | ||||
| @@ -88,8 +88,8 @@ func TestRunPipe(t *testing.T) { | ||||
| 								Owner: "root", | ||||
| 								Group: "root", | ||||
| 							}, | ||||
| 							NameTemplate:            defaultNameTemplate, | ||||
| 							StripParentBinaryFolder: dets.Strip, | ||||
| 							NameTemplate:         defaultNameTemplate, | ||||
| 							StripBinaryDirectory: dets.Strip, | ||||
| 							Files: []config.File{ | ||||
| 								{Source: "README.{{.Os}}.*"}, | ||||
| 								{Source: "./foo/**/*"}, | ||||
|   | ||||
| @@ -26,8 +26,12 @@ func (Pipe) Default(ctx *context.Context) error { | ||||
| 		if blob.Bucket == "" || blob.Provider == "" { | ||||
| 			return fmt.Errorf("bucket or provider cannot be empty") | ||||
| 		} | ||||
| 		if blob.Folder == "" { | ||||
| 			blob.Folder = "{{ .ProjectName }}/{{ .Tag }}" | ||||
| 		if blob.Folder != "" { | ||||
| 			deprecate.Notice(ctx, "blobs.folder") | ||||
| 			blob.Directory = blob.Folder | ||||
| 		} | ||||
| 		if blob.Directory == "" { | ||||
| 			blob.Directory = "{{ .ProjectName }}/{{ .Tag }}" | ||||
| 		} | ||||
| 		if blob.ContentDisposition == "" { | ||||
| 			blob.ContentDisposition = "attachment;filename={{.Filename}}" | ||||
|   | ||||
| @@ -92,20 +92,21 @@ func TestDefaults(t *testing.T) { | ||||
| 		{ | ||||
| 			Bucket:             "foo", | ||||
| 			Provider:           "azblob", | ||||
| 			Folder:             "{{ .ProjectName }}/{{ .Tag }}", | ||||
| 			Directory:          "{{ .ProjectName }}/{{ .Tag }}", | ||||
| 			IDs:                []string{"foo", "bar"}, | ||||
| 			ContentDisposition: "inline", | ||||
| 		}, | ||||
| 		{ | ||||
| 			Bucket:             "foobar", | ||||
| 			Provider:           "gcs", | ||||
| 			Folder:             "{{ .ProjectName }}/{{ .Tag }}", | ||||
| 			Directory:          "{{ .ProjectName }}/{{ .Tag }}", | ||||
| 			ContentDisposition: "attachment;filename={{.Filename}}", | ||||
| 		}, | ||||
| 		{ | ||||
| 			Bucket:             "deprecated", | ||||
| 			Provider:           "s3", | ||||
| 			Folder:             "static", | ||||
| 			Directory:          "static", | ||||
| 			OldDisableSSL:      true, | ||||
| 			DisableSSL:         true, | ||||
| 			OldKMSKey:          "fake", | ||||
|   | ||||
| @@ -85,11 +85,11 @@ func urlFor(ctx *context.Context, conf config.Blob) (string, error) { | ||||
| // upload to destination (eg: gs://gorelease-bucket) using the given uploader | ||||
| // implementation. | ||||
| func doUpload(ctx *context.Context, conf config.Blob) error { | ||||
| 	folder, err := tmpl.New(ctx).Apply(conf.Folder) | ||||
| 	dir, err := tmpl.New(ctx).Apply(conf.Directory) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	folder = strings.TrimPrefix(folder, "/") | ||||
| 	dir = strings.TrimPrefix(dir, "/") | ||||
|  | ||||
| 	bucketURL, err := urlFor(ctx, conf) | ||||
| 	if err != nil { | ||||
| @@ -141,7 +141,7 @@ func doUpload(ctx *context.Context, conf config.Blob) error { | ||||
| 		g.Go(func() error { | ||||
| 			// TODO: replace this with ?prefix=folder on the bucket url | ||||
| 			dataFile := artifact.Path | ||||
| 			uploadFile := path.Join(folder, artifact.Name) | ||||
| 			uploadFile := path.Join(dir, artifact.Name) | ||||
|  | ||||
| 			return uploadData(ctx, conf, up, dataFile, uploadFile, bucketURL) | ||||
| 		}) | ||||
| @@ -155,7 +155,7 @@ func doUpload(ctx *context.Context, conf config.Blob) error { | ||||
| 		name := name | ||||
| 		fullpath := fullpath | ||||
| 		g.Go(func() error { | ||||
| 			uploadFile := path.Join(folder, name) | ||||
| 			uploadFile := path.Join(dir, name) | ||||
| 			return uploadData(ctx, conf, up, fullpath, uploadFile, bucketURL) | ||||
| 		}) | ||||
| 	} | ||||
|   | ||||
| @@ -74,6 +74,10 @@ func (Pipe) Default(ctx *context.Context) error { | ||||
| 		if brew.Plist != "" { | ||||
| 			deprecate.Notice(ctx, "brews.plist") | ||||
| 		} | ||||
| 		if brew.Folder != "" { | ||||
| 			deprecate.Notice(ctx, "brews.folder") | ||||
| 			brew.Directory = brew.Folder | ||||
| 		} | ||||
| 		if !reflect.DeepEqual(brew.Tap, config.RepoRef{}) { | ||||
| 			brew.Repository = brew.Tap | ||||
| 			deprecate.Notice(ctx, "brews.tap") | ||||
| @@ -144,7 +148,7 @@ func doPublish(ctx *context.Context, formula *artifact.Artifact, cl client.Clien | ||||
|  | ||||
| 	repo := client.RepoFromRef(brew.Repository) | ||||
|  | ||||
| 	gpath := buildFormulaPath(brew.Folder, formula.Name) | ||||
| 	gpath := buildFormulaPath(brew.Directory, formula.Name) | ||||
|  | ||||
| 	msg, err := tmpl.New(ctx).Apply(brew.CommitMessageTemplate) | ||||
| 	if err != nil { | ||||
| @@ -271,7 +275,7 @@ func doRun(ctx *context.Context, brew config.Homebrew, cl client.ReleaseURLTempl | ||||
| 	} | ||||
|  | ||||
| 	filename := brew.Name + ".rb" | ||||
| 	path := filepath.Join(ctx.Config.Dist, "homebrew", brew.Folder, filename) | ||||
| 	path := filepath.Join(ctx.Config.Dist, "homebrew", brew.Directory, filename) | ||||
| 	if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
|   | ||||
							
								
								
									
										4
									
								
								internal/pipe/dist/dist.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								internal/pipe/dist/dist.go
									
									
									
									
										vendored
									
									
								
							| @@ -1,4 +1,4 @@ | ||||
| // Package dist provides checks to make sure the dist folder is always | ||||
| // Package dist provides checks to make sure the dist directory is always | ||||
| // empty. | ||||
| package dist | ||||
|  | ||||
| @@ -21,7 +21,7 @@ func (Pipe) String() string { | ||||
| func (Pipe) Run(ctx *context.Context) (err error) { | ||||
| 	_, err = os.Stat(ctx.Config.Dist) | ||||
| 	if os.IsNotExist(err) { | ||||
| 		log.Debugf("%s doesn't exist, creating empty folder", ctx.Config.Dist) | ||||
| 		log.Debugf("%s doesn't exist, creating empty directory", ctx.Config.Dist) | ||||
| 		return mkdir(ctx) | ||||
| 	} | ||||
| 	if ctx.Clean { | ||||
|   | ||||
| @@ -97,6 +97,10 @@ func (Pipe) Default(ctx *context.Context) error { | ||||
| 		if scoop.Name == "" { | ||||
| 			scoop.Name = ctx.Config.ProjectName | ||||
| 		} | ||||
| 		if scoop.Folder != "" { | ||||
| 			deprecate.Notice(ctx, "scoops.folder") | ||||
| 			scoop.Directory = scoop.Folder | ||||
| 		} | ||||
| 		scoop.CommitAuthor = commitauthor.Default(scoop.CommitAuthor) | ||||
| 		if scoop.CommitMessageTemplate == "" { | ||||
| 			scoop.CommitMessageTemplate = "Scoop update for {{ .ProjectName }} version {{ .Tag }}" | ||||
| @@ -180,7 +184,7 @@ func doRun(ctx *context.Context, scoop config.Scoop, cl client.ReleaseURLTemplat | ||||
| 	} | ||||
|  | ||||
| 	filename := scoop.Name + ".json" | ||||
| 	path := filepath.Join(ctx.Config.Dist, "scoop", scoop.Folder, filename) | ||||
| 	path := filepath.Join(ctx.Config.Dist, "scoop", scoop.Directory, filename) | ||||
| 	if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| @@ -247,7 +251,7 @@ func doPublish(ctx *context.Context, manifest *artifact.Artifact, cl client.Clie | ||||
| 	} | ||||
|  | ||||
| 	repo := client.RepoFromRef(scoop.Repository) | ||||
| 	gpath := path.Join(scoop.Folder, manifest.Name) | ||||
| 	gpath := path.Join(scoop.Directory, manifest.Name) | ||||
|  | ||||
| 	if scoop.Repository.Git.URL != "" { | ||||
| 		return client.NewGitUploadClient(repo.Branch). | ||||
|   | ||||
| @@ -70,7 +70,7 @@ var BuildPipeline = []Piper{ | ||||
| 	dist.Pipe{}, | ||||
| 	// setup metadata options | ||||
| 	metadata.Pipe{}, | ||||
| 	// creates a metadta.json files in the dist folder | ||||
| 	// creates a metadta.json files in the dist directory | ||||
| 	metadata.MetaPipe{}, | ||||
| 	// setup gomod-related stuff | ||||
| 	gomod.Pipe{}, | ||||
| @@ -138,7 +138,7 @@ var Pipeline = append( | ||||
| 	docker.Pipe{}, | ||||
| 	// publishes artifacts | ||||
| 	publish.New(), | ||||
| 	// creates a artifacts.json files in the dist folder | ||||
| 	// creates a artifacts.json files in the dist directory | ||||
| 	metadata.ArtifactsPipe{}, | ||||
| 	// announce releases | ||||
| 	announce.Pipe{}, | ||||
|   | ||||
| @@ -225,7 +225,7 @@ type Homebrew struct { | ||||
| 	Repository            RepoRef              `yaml:"repository,omitempty" json:"repository,omitempty"` | ||||
| 	CommitAuthor          CommitAuthor         `yaml:"commit_author,omitempty" json:"commit_author,omitempty"` | ||||
| 	CommitMessageTemplate string               `yaml:"commit_msg_template,omitempty" json:"commit_msg_template,omitempty"` | ||||
| 	Folder                string               `yaml:"folder,omitempty" json:"folder,omitempty"` | ||||
| 	Directory             string               `yaml:"directory,omitempty" json:"directory,omitempty"` | ||||
| 	Caveats               string               `yaml:"caveats,omitempty" json:"caveats,omitempty"` | ||||
| 	Install               string               `yaml:"install,omitempty" json:"install,omitempty"` | ||||
| 	ExtraInstall          string               `yaml:"extra_install,omitempty" json:"extra_install,omitempty"` | ||||
| @@ -252,6 +252,9 @@ type Homebrew struct { | ||||
|  | ||||
| 	// Deprecated: use Service instead. | ||||
| 	Plist string `yaml:"plist,omitempty" json:"plist,omitempty" jsonschema:"deprecated=true,description=use service instead"` | ||||
|  | ||||
| 	// Deprecated: use Directory instead. | ||||
| 	Folder string `yaml:"folder,omitempty" json:"folder,omitempty" jsonschema:"deprecated=true"` | ||||
| } | ||||
|  | ||||
| type Nix struct { | ||||
| @@ -394,7 +397,7 @@ type Scoop struct { | ||||
| 	Name                  string       `yaml:"name,omitempty" json:"name,omitempty"` | ||||
| 	IDs                   []string     `yaml:"ids,omitempty" json:"ids,omitempty"` | ||||
| 	Repository            RepoRef      `yaml:"repository,omitempty" json:"repository,omitempty"` | ||||
| 	Folder                string       `yaml:"folder,omitempty" json:"folder,omitempty"` | ||||
| 	Directory             string       `yaml:"directory,omitempty" json:"directory,omitempty"` | ||||
| 	CommitAuthor          CommitAuthor `yaml:"commit_author,omitempty" json:"commit_author,omitempty"` | ||||
| 	CommitMessageTemplate string       `yaml:"commit_msg_template,omitempty" json:"commit_msg_template,omitempty"` | ||||
| 	Homepage              string       `yaml:"homepage,omitempty" json:"homepage,omitempty"` | ||||
| @@ -411,6 +414,9 @@ type Scoop struct { | ||||
|  | ||||
| 	// Deprecated: use Repository instead. | ||||
| 	Bucket RepoRef `yaml:"bucket,omitempty" json:"bucket,omitempty" jsonschema:"deprecated=true,description=use repository instead"` | ||||
|  | ||||
| 	// Deprecated: use Directory instead. | ||||
| 	Folder string `yaml:"folder,omitempty" json:"folder,omitempty" jsonschema:"deprecated=true"` | ||||
| } | ||||
|  | ||||
| // CommitAuthor is the author of a Git commit. | ||||
| @@ -714,13 +720,16 @@ type Archive struct { | ||||
| 	Format                    string           `yaml:"format,omitempty" json:"format,omitempty" jsonschema:"enum=tar,enum=tgz,enum=tar.gz,enum=zip,enum=gz,enum=tar.xz,enum=txz,enum=binary,default=tar.gz"` | ||||
| 	FormatOverrides           []FormatOverride `yaml:"format_overrides,omitempty" json:"format_overrides,omitempty"` | ||||
| 	WrapInDirectory           string           `yaml:"wrap_in_directory,omitempty" json:"wrap_in_directory,omitempty" jsonschema:"oneof_type=string;boolean"` | ||||
| 	StripParentBinaryFolder   bool             `yaml:"strip_parent_binary_folder,omitempty" json:"strip_parent_binary_folder,omitempty"` | ||||
| 	StripBinaryDirectory      bool             `yaml:"strip_binary_directory,omitempty" json:"strip_binary_directory,omitempty"` | ||||
| 	Files                     []File           `yaml:"files,omitempty" json:"files,omitempty"` | ||||
| 	Meta                      bool             `yaml:"meta,omitempty" json:"meta,omitempty"` | ||||
| 	AllowDifferentBinaryCount bool             `yaml:"allow_different_binary_count,omitempty" json:"allow_different_binary_count,omitempty"` | ||||
|  | ||||
| 	// Deprecated: don't need to set this anymore. | ||||
| 	RLCP string `yaml:"rlcp,omitempty" json:"rlcp,omitempty"  jsonschema:"oneof_type=string;boolean,deprecated=true,description=you can now remove this"` | ||||
|  | ||||
| 	// Deprecated: use StripBinaryDirectory instead. | ||||
| 	StripParentBinaryFolder bool `yaml:"strip_parent_binary_folder,omitempty" json:"strip_parent_binary_folder,omitempty" jsonschema:"deprecated=true"` | ||||
| } | ||||
|  | ||||
| type ReleaseNotesMode string | ||||
| @@ -1111,7 +1120,7 @@ type Blob struct { | ||||
| 	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"` | ||||
| 	Directory          string      `yaml:"directory,omitempty" json:"directory,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 | ||||
| @@ -1125,8 +1134,12 @@ type Blob struct { | ||||
|  | ||||
| 	// 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"` | ||||
|  | ||||
| 	// Deprecated: use Directory instead. | ||||
| 	Folder string `yaml:"folder,omitempty" json:"folder,omitempty" jsonschema:"deprecated=true"` | ||||
| } | ||||
|  | ||||
| // Upload configuration. | ||||
|   | ||||
| @@ -14,7 +14,7 @@ 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 | ||||
| which means you might need to specify the dist directory path if it is different | ||||
| than the default. | ||||
|  | ||||
| !!! success "GoReleaser Pro" | ||||
| @@ -28,7 +28,7 @@ goreleaser announce [flags] | ||||
| ## Options | ||||
|  | ||||
| ``` | ||||
|   -d, --dist string        dist folder to continue (default "./dist") | ||||
|   -d, --dist string        dist directory to continue (default "./dist") | ||||
|   -h, --help               help for announce | ||||
|   -k, --key string         GoReleaser Pro license key [$GORELEASER_KEY] | ||||
|       --merge              Merges multiple parts of a --split release | ||||
|   | ||||
| @@ -20,7 +20,7 @@ goreleaser build [flags] | ||||
| ## Options | ||||
|  | ||||
| ``` | ||||
|       --clean              Remove the dist folder before building | ||||
|       --clean              Remove the dist directory before building | ||||
|   -f, --config string      Load configuration from file | ||||
|   -h, --help               help for build | ||||
|       --id stringArray     Builds only the specified build ids | ||||
|   | ||||
| @@ -20,7 +20,7 @@ goreleaser continue [flags] | ||||
| ## Options | ||||
|  | ||||
| ``` | ||||
|   -d, --dist string        dist folder to continue (default "./dist") | ||||
|   -d, --dist string        dist directory to continue (default "./dist") | ||||
|   -h, --help               help for continue | ||||
|   -k, --key string         GoReleaser Pro license key [$GORELEASER_KEY] | ||||
|       --merge              Merges multiple parts of a --split release | ||||
|   | ||||
| @@ -24,7 +24,7 @@ goreleaser publish [flags] | ||||
| ## Options | ||||
|  | ||||
| ``` | ||||
|   -d, --dist string        dist folder to continue (default "./dist") | ||||
|   -d, --dist string        dist directory to continue (default "./dist") | ||||
|   -h, --help               help for publish | ||||
|   -k, --key string         GoReleaser Pro license key [$GORELEASER_KEY] | ||||
|       --merge              Merges multiple parts of a --split release | ||||
|   | ||||
| @@ -10,7 +10,7 @@ goreleaser release [flags] | ||||
|  | ||||
| ``` | ||||
|       --auto-snapshot                Automatically sets --snapshot if the repository is dirty | ||||
|       --clean                        Removes the dist folder | ||||
|       --clean                        Removes the dist directory | ||||
|   -f, --config string                Load configuration from file | ||||
|       --fail-fast                    Whether to abort the release publishing on the first error | ||||
|   -h, --help                         help for release | ||||
|   | ||||
| @@ -16,23 +16,23 @@ gomod: | ||||
| In practice, what this does is: | ||||
|  | ||||
| - for each of your builds, create a `dist/proxy/{{ build.id }}`; | ||||
| - creates a `go.mod` that requires your __main module__ at the __current tag__; | ||||
| - copy the project's `go.sum` to that folder. | ||||
| - creates a `go.mod` that requires your **main module** at the **current tag**; | ||||
| - copy the project's `go.sum` to that directory. | ||||
| - runs `go get module@version` | ||||
|  | ||||
| In which: | ||||
|  | ||||
| - __build.id__: the `id` property in your `build` definition; | ||||
| - __main module__: is the output of `go list -m`; | ||||
| - __main package__: is the __main module__ + your build's `main`; | ||||
| - __current tag__: is the tag that is being built. | ||||
| - **build.id**: the `id` property in your `build` definition; | ||||
| - **main module**: is the output of `go list -m`; | ||||
| - **main package**: is the **main module** + your build's `main`; | ||||
| - **current tag**: is the tag that is being built. | ||||
|  | ||||
| So, let's say: | ||||
|  | ||||
| - __main module__: `github.com/goreleaser/nfpm/v2`; | ||||
| - __build id__: `nfpm` | ||||
| - **main module**: `github.com/goreleaser/nfpm/v2`; | ||||
| - **build id**: `nfpm` | ||||
| - build's `main`: `./cmd/nfpm/`; | ||||
| - __current tag__: `v2.5.0`. | ||||
| - **current tag**: `v2.5.0`. | ||||
|  | ||||
| GoReleaser will create a `go.mod` like: | ||||
|  | ||||
| @@ -40,7 +40,7 @@ GoReleaser will create a `go.mod` like: | ||||
| module nfpm | ||||
| ``` | ||||
|  | ||||
| Then it'll copy the `go.sum` into this folder, and run: | ||||
| Then it'll copy the `go.sum` into this directory, and run: | ||||
|  | ||||
| ```sh | ||||
| go get github.com/goreleaser/nfpm/v2@v2.5.0 | ||||
| @@ -79,7 +79,7 @@ You can also use `go version -m my_program` to display the go module information | ||||
|  | ||||
| ## Limitations | ||||
|  | ||||
| 1. Extra files will still be copied from the current project's root folder and not from the proxy cache; | ||||
| 1. Extra files will still be copied from the current project's root directory and not from the proxy cache; | ||||
| 1. You can't build packages that are not contained in the main module; | ||||
| 1. VCS info will not be available. | ||||
|  | ||||
|   | ||||
| @@ -58,17 +58,18 @@ archives: | ||||
|  | ||||
|     # Set this to true if you want all files in the archive to be in a single directory. | ||||
|     # If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz', | ||||
|     # you'll get a folder 'goreleaser_Linux_arm64'. | ||||
|     # you'll get a directory 'goreleaser_Linux_arm64'. | ||||
|     # If set to false, all files are extracted separately. | ||||
|     # You can also set it to a custom folder name (templating is supported). | ||||
|     # You can also set it to a custom directory name (templating is supported). | ||||
|     wrap_in_directory: true | ||||
|  | ||||
|     # If set to true, will strip the parent directories away from binary files. | ||||
|     # | ||||
|     # This might be useful if you have your binary be built with a subdir for some reason, but do no want that subdir inside the archive. | ||||
|     # This might be useful if you have your binary be built with a sub-directory | ||||
|     # for some reason, but do no want that sub-directory inside the archive. | ||||
|     # | ||||
|     # Since: v1.11 | ||||
|     strip_parent_binary_folder: true | ||||
|     strip_binary_directory: true | ||||
|  | ||||
|     # This will make the destination paths be relative to the longest common | ||||
|     # path prefix between all the files matched and the source glob. | ||||
| @@ -104,7 +105,7 @@ archives: | ||||
|       - src: "*.md" | ||||
|         dst: docs | ||||
|  | ||||
|         # Strip parent folders when adding files to the archive. | ||||
|         # Strip parent directories when adding files to the archive. | ||||
|         strip_parent: true | ||||
|  | ||||
|         # File info. | ||||
| @@ -192,8 +193,8 @@ archives: | ||||
|  | ||||
| !!! tip | ||||
|  | ||||
|     You can add entire folders, its subfolders and files by using the glob notation, | ||||
|     for example: `myfolder/**/*`. | ||||
|     You can add entire directories, its sub-directories and files by using the | ||||
|     glob notation, for example: `mydirectory/**/*`. | ||||
|  | ||||
| !!! warning | ||||
|  | ||||
| @@ -201,8 +202,10 @@ archives: | ||||
|  | ||||
| !!! warning | ||||
|  | ||||
|     The `name_template` option will not reflect the filenames under the `dist` folder if `format` is `binary`. | ||||
|     The template will be applied only where the binaries are uploaded (e.g. GitHub releases). | ||||
|     The `name_template` option will not reflect the filenames under the `dist` | ||||
|     directory if `format` is `binary`. | ||||
|     The template will be applied only where the binaries are uploaded (e.g. | ||||
|     GitHub releases). | ||||
|  | ||||
| ## Deep diving into the globbing options | ||||
|  | ||||
| @@ -220,16 +223,18 @@ files: | ||||
|   # Adds all `md` files to the root of the archive: | ||||
|   - src: "*.md" | ||||
|  | ||||
|   # Adds all `md` files in the current folder to a `docs` folder in the archive: | ||||
|   # Adds all `md` files in the current directory to a `docs` directory in the | ||||
|   # archive: | ||||
|   - src: "*.md" | ||||
|     dst: docs | ||||
|  | ||||
|   # Recursively adds all `go` files to a `source` folder in the archive. | ||||
|   # Recursively adds all `go` files to a `source` directory in the archive. | ||||
|   # in this case, `cmd/myapp/main.go` will be added as `source/cmd/myapp/main.go` | ||||
|   - src: "**/*.go" | ||||
|     dst: source | ||||
|  | ||||
|   # Recursively adds all `go` files to a `source` folder in the archive, stripping their parent folder. | ||||
|   # Recursively adds all `go` files to a `source` directory in the archive, | ||||
|   # stripping their parent directory. | ||||
|   # In this case, `cmd/myapp/main.go` will be added as `source/main.go`: | ||||
|   - src: "**/*.go" | ||||
|     dst: source | ||||
|   | ||||
| @@ -15,8 +15,7 @@ This page describes the available options. | ||||
| ```yaml | ||||
| # .goreleaser.yaml | ||||
| aurs: | ||||
|   - | ||||
|     # The package name. | ||||
|   - # The package name. | ||||
|     # | ||||
|     # Note that since this integration does not create a PKGBUILD to build from | ||||
|     # source, per Arch's guidelines. | ||||
| @@ -41,11 +40,11 @@ aurs: | ||||
|  | ||||
|     # The maintainers of the package. | ||||
|     maintainers: | ||||
|       - 'Foo Bar <foo at bar dot com>' | ||||
|       - "Foo Bar <foo at bar dot com>" | ||||
|  | ||||
|     # The contributors of the package. | ||||
|     contributors: | ||||
|       - 'Foo Zaz <foo at zaz dot com>' | ||||
|       - "Foo Zaz <foo at zaz dot com>" | ||||
|  | ||||
|     # SPDX identifier of your app's license. | ||||
|     license: "MIT" | ||||
| @@ -56,15 +55,15 @@ aurs: | ||||
|     # IMPORTANT: the key must not be password-protected. | ||||
|     # | ||||
|     # WARNING: do not expose your private key in the configuration file! | ||||
|     private_key: '{{ .Env.AUR_KEY }}' | ||||
|     private_key: "{{ .Env.AUR_KEY }}" | ||||
|  | ||||
|     # The AUR Git URL for this package. | ||||
|     # Publish is skipped if empty. | ||||
|     git_url: 'ssh://aur@aur.archlinux.org/mypackage-bin.git' | ||||
|     git_url: "ssh://aur@aur.archlinux.org/mypackage-bin.git" | ||||
|  | ||||
|     # Setting this will prevent goreleaser to actually try to commit the updated | ||||
|     # formula - instead, the formula file will be stored on the dist folder only, | ||||
|     # leaving the responsibility of publishing it to the user. | ||||
|     # formula - instead, the formula file will be stored on the dist directory | ||||
|     # only, leaving the responsibility of publishing it to the user. | ||||
|     # | ||||
|     # If set to auto, the release will not be uploaded to the AUR repo | ||||
|     # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1. | ||||
| @@ -91,7 +90,7 @@ aurs: | ||||
|     # | ||||
|     # Must be in the format `package: short description of the extra functionality`. | ||||
|     optdepends: | ||||
|       - 'wget: for downloading things' | ||||
|       - "wget: for downloading things" | ||||
|  | ||||
|     # List of files that can contain user-made changes and should be preserved | ||||
|     # during package upgrades and removals. | ||||
| @@ -146,7 +145,7 @@ aurs: | ||||
|     # the Git URL. | ||||
|     # | ||||
|     # Default: 'ssh -i {{ .KeyPath }} -o StrictHostKeyChecking=accept-new -F /dev/null' | ||||
|     git_ssh_command: 'ssh -i {{ .Env.KEY }} -o SomeOption=yes' | ||||
|     git_ssh_command: "ssh -i {{ .Env.KEY }} -o SomeOption=yes" | ||||
|  | ||||
|     # URL which is determined by the given Token | ||||
|     # (github, gitlab or gitea). | ||||
|   | ||||
| @@ -49,7 +49,7 @@ blobs: | ||||
|     # | ||||
|     # Default: '{{ .ProjectName }}/{{ .Tag }}' | ||||
|     # Templates: allowed | ||||
|     folder: "foo/bar/{{.Version}}" | ||||
|     directory: "foo/bar/{{.Version}}" | ||||
|  | ||||
|     # Whether to disable this particular upload configuration. | ||||
|     # | ||||
| @@ -120,10 +120,10 @@ blobs: | ||||
|  | ||||
|   - provider: gs | ||||
|     bucket: goreleaser-bucket | ||||
|     folder: "foo/bar/{{.Version}}" | ||||
|     directory: "foo/bar/{{.Version}}" | ||||
|   - provider: s3 | ||||
|     bucket: goreleaser-bucket | ||||
|     folder: "foo/bar/{{.Version}}" | ||||
|     directory: "foo/bar/{{.Version}}" | ||||
| ``` | ||||
|  | ||||
| !!! tip | ||||
| @@ -175,7 +175,7 @@ in the following order: | ||||
| There is no common way to set ACLs across all bucket providers, so, [go-cloud][] | ||||
| [does not support it yet][issue1108]. | ||||
|  | ||||
| You are expected to set the ACLs on the bucket/folder/etc, depending on your | ||||
| You are expected to set the ACLs on the bucket/directory/etc, depending on your | ||||
| provider. | ||||
|  | ||||
| [go-cloud]: https://gocloud.dev/howto/blob/ | ||||
|   | ||||
| @@ -204,7 +204,7 @@ builds: | ||||
|     # By default, GoReleaser will create your binaries inside | ||||
|     # `dist/${BuildID}_${BuildTarget}`, which is a unique directory per build | ||||
|     # target in the matrix. | ||||
|     # You can set subdirs within that folder using the `binary` property. | ||||
|     # You can set subdirs within that directory using the `binary` property. | ||||
|     # | ||||
|     # However, if for some reason you don't want that unique directory to be | ||||
|     # created, you can set this property. | ||||
| @@ -480,7 +480,7 @@ builds: | ||||
|     # prebuilt specific options | ||||
|     prebuilt: | ||||
|       # Path must be the template path to the binaries. | ||||
|       # GoReleaser removes the `dist` folder before running, so you will likely | ||||
|       # GoReleaser removes the `dist` directory before running, so you will likely | ||||
|       # want to put the binaries elsewhere. | ||||
|       # This field is required when using the `prebuilt` builder. | ||||
|       path: output/mybin_{{ .Os }}_{{ .Arch }}{{ with .Amd64 }}_{{ . }}{{ end }}/mybin | ||||
| @@ -531,7 +531,7 @@ There is no difference in how the binaries are handled. | ||||
|  | ||||
| If you'd like to see this in action, check [this example on GitHub](https://github.com/caarlos0/goreleaser-pro-prebuilt-example). | ||||
|  | ||||
| ## A note about folder names inside `dist` | ||||
| ## A note about directory names inside `dist` | ||||
|  | ||||
| By default, GoReleaser will create your binaries inside | ||||
| `dist/${BuildID}_${BuildTarget}`, which is a unique directory per build target | ||||
|   | ||||
| @@ -23,7 +23,7 @@ dockers: | ||||
|  | ||||
|     The `image_templates` attribute supports templating. Learn more about the [name template engine](/customization/templates/). | ||||
|  | ||||
| You also need to create a `Dockerfile` in your project's root folder: | ||||
| You also need to create a `Dockerfile` in your project's root directory: | ||||
|  | ||||
| ```dockerfile | ||||
| FROM scratch | ||||
| @@ -144,11 +144,11 @@ dockers: | ||||
|     # If your Dockerfile copies files other than binaries and packages, | ||||
|     # you should list them here as well. | ||||
|     # Note that GoReleaser will create the same structure inside a temporary | ||||
|     # folder, so if you add `foo/bar.json` here, on your Dockerfile you can | ||||
|     # directory, so if you add `foo/bar.json` here, on your Dockerfile you can | ||||
|     # `COPY foo/bar.json /whatever.json`. | ||||
|     # Also note that the paths here are relative to the folder in which | ||||
|     # GoReleaser is being run (usually the repository root folder). | ||||
|     # This field does not support wildcards, you can add an entire folder here | ||||
|     # Also note that the paths here are relative to the directory in which | ||||
|     # GoReleaser is being run (usually the repository root directory). | ||||
|     # This field does not support wildcards, you can add an entire directory here | ||||
|     # and use wildcards when you `COPY`/`ADD` in your Dockerfile. | ||||
|     extra_files: | ||||
|       - config.yml | ||||
|   | ||||
| @@ -94,8 +94,8 @@ brews: | ||||
|     # Templates: allowed | ||||
|     commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" | ||||
|  | ||||
|     # Folder inside the repository to put the formula. | ||||
|     folder: Formula | ||||
|     # Directory inside the repository to put the formula. | ||||
|     directory: Formula | ||||
|  | ||||
|     # Caveats for the user of your binary. | ||||
|     caveats: "How to use this binary" | ||||
| @@ -112,8 +112,8 @@ brews: | ||||
|     license: "MIT" | ||||
|  | ||||
|     # Setting this will prevent goreleaser to actually try to commit the updated | ||||
|     # formula - instead, the formula file will be stored on the dist folder only, | ||||
|     # leaving the responsibility of publishing it to the user. | ||||
|     # formula - instead, the formula file will be stored on the dist directory | ||||
|     # only, leaving the responsibility of publishing it to the user. | ||||
|     # If set to auto, the release will not be uploaded to the homebrew tap | ||||
|     # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 | ||||
|     # | ||||
| @@ -203,7 +203,8 @@ brews: | ||||
| By defining the `brew` section, GoReleaser will take care of publishing the | ||||
| Homebrew tap. | ||||
| Assuming that the current tag is `v1.2.3`, the above configuration will generate a | ||||
| `program.rb` formula in the `Formula` folder of `user/homebrew-tap` repository: | ||||
| `program.rb` formula in the `Formula` directory of `user/homebrew-tap` | ||||
| repository: | ||||
|  | ||||
| ```rb | ||||
| class Program < Formula | ||||
|   | ||||
| @@ -76,7 +76,7 @@ krews: | ||||
|     caveats: "How to use this binary" | ||||
|  | ||||
|     # Setting this will prevent goreleaser to actually try to commit the updated | ||||
|     # krew plugin - instead, the plugin file will be stored on the dist folder | ||||
|     # krew plugin - instead, the plugin file will be stored on the dist directory | ||||
|     # only, leaving the responsibility of publishing it to the user. | ||||
|     # If set to auto, the release will not be uploaded to the Krew plugin | ||||
|     # in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1 | ||||
|   | ||||
| @@ -2,8 +2,8 @@ | ||||
|  | ||||
| > Since v1.20 | ||||
|  | ||||
| GoReleaser creates some metadata files in the `dist` folder before it finishes | ||||
| running. | ||||
| GoReleaser creates some metadata files in the `dist` directory before it | ||||
| finishes running. | ||||
|  | ||||
| These are the options available: | ||||
|  | ||||
|   | ||||
| @@ -260,10 +260,10 @@ nfpms: | ||||
|  | ||||
|       # Using the type 'dir', empty directories can be created. When building | ||||
|       # RPMs, however, this type has another important purpose: Claiming | ||||
|       # ownership of that folder. This is important because when upgrading or | ||||
|       # ownership of that directory. This is important because when upgrading or | ||||
|       # removing an RPM package, only the directories for which it has claimed | ||||
|       # ownership are removed. However, you should not claim ownership of a | ||||
|       # folder that is created by the OS or a dependency of your package. | ||||
|       # directory that is created by the OS or a dependency of your package. | ||||
|       # | ||||
|       # A directory in the build environment can optionally be provided in the | ||||
|       # 'src' field in order copy mtime and mode from that directory without | ||||
|   | ||||
| @@ -65,7 +65,7 @@ nix: | ||||
|     license: "mit" | ||||
|  | ||||
|     # Setting this will prevent goreleaser to actually try to commit the updated | ||||
|     # package - instead, it will be stored on the dist folder only, | ||||
|     # package - instead, it will be stored on the dist directory only, | ||||
|     # leaving the responsibility of publishing it to the user. | ||||
|     # | ||||
|     # If set to auto, the release will not be uploaded to the repository | ||||
|   | ||||
| @@ -25,13 +25,13 @@ scoops: | ||||
|     # Templates: allowed | ||||
|     url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}" | ||||
|  | ||||
|     # Folder inside the repository to put the scoop. | ||||
|     # Directory inside the repository to put the scoop. | ||||
|     # | ||||
|     # Note that while scoop works if the manifests are in a folder, | ||||
|     # Note that while scoop works if the manifests are in a directory, | ||||
|     # 'scoop bucket list' will show 0 manifests if they are not in the root | ||||
|     # folder. | ||||
|     # directory. | ||||
|     # In short, it's generally better to leave this empty. | ||||
|     folder: Scoops | ||||
|     directory: Scoops | ||||
|  | ||||
|     # Which format to use. | ||||
|     # | ||||
|   | ||||
| @@ -16,7 +16,7 @@ snapshot: | ||||
|   # | ||||
|   # Default is `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`. | ||||
|   # Templates: allowed | ||||
|   name_template: '{{ incpatch .Version }}-devel' | ||||
|   name_template: "{{ incpatch .Version }}-devel" | ||||
| ``` | ||||
|  | ||||
| ## How it works | ||||
| @@ -32,12 +32,14 @@ You can also check if it's a snapshot build inside a template with: | ||||
| ``` | ||||
|  | ||||
| !!! tip | ||||
|  | ||||
|     Learn more about the [name template engine](/customization/templates/). | ||||
|  | ||||
| Note that the idea behind GoReleaser's snapshots is for local builds or to | ||||
| validate your build on the CI pipeline. Artifacts won't be uploaded and will | ||||
| only be generated into the `dist` folder. | ||||
| only be generated into the `dist` directory. | ||||
|  | ||||
| !!! info "Maybe you are looking for something else?" | ||||
|  | ||||
|     - If just want to build the binaries, and no packages at all, check the [`goreleaser build` command](/cmd/goreleaser_build/); | ||||
|     - If you actually want to create nightly builds, check out the [nightly documentation](/customization/nightlies/). | ||||
|   | ||||
| @@ -51,7 +51,7 @@ source: | ||||
|     - src: "*.md" | ||||
|       dst: docs | ||||
|  | ||||
|       # Strip parent folders when adding files to the archive. | ||||
|       # Strip parent directories when adding files to the archive. | ||||
|       strip_parent: true | ||||
|  | ||||
|       # File info. | ||||
|   | ||||
| @@ -27,7 +27,7 @@ template_files: | ||||
|     src: foo.tpl.sh | ||||
|  | ||||
|     # Destination path of the file. | ||||
|     # Will be prefixed with the `dist` folder. | ||||
|     # Will be prefixed with the `dist` directory. | ||||
|     # Ignored if empty. | ||||
|     # | ||||
|     # Templates: allowed | ||||
|   | ||||
| @@ -127,7 +127,7 @@ winget: | ||||
|     copyright_url: "https://goreleaser.com/copyright" | ||||
|  | ||||
|     # Setting this will prevent goreleaser to actually try to commit the updated | ||||
|     # package - instead, it will be stored on the dist folder only, | ||||
|     # package - instead, it will be stored on the dist directory only, | ||||
|     # leaving the responsibility of publishing it to the user. | ||||
|     # | ||||
|     # If set to auto, the release will not be uploaded to the repository | ||||
|   | ||||
| @@ -21,7 +21,7 @@ Template for new deprecations: | ||||
|  | ||||
| ### property | ||||
|  | ||||
| > since yyyy-mm-dd | ||||
| > since yyyy-mm-dd (v1.xx) | ||||
|  | ||||
| Description. | ||||
|  | ||||
| @@ -39,6 +39,94 @@ Description. | ||||
|  | ||||
| --> | ||||
|  | ||||
| ### archives.strip_parent_binary_folder | ||||
|  | ||||
| > since 2024-03-29 (v1.25) | ||||
|  | ||||
| Property was renamed to be consistent across all configurations. | ||||
|  | ||||
| === "Before" | ||||
|  | ||||
|     ```yaml | ||||
|     archives: | ||||
|       - | ||||
|         strip_parent_binary_folder: true | ||||
|     ``` | ||||
|  | ||||
| === "After" | ||||
|  | ||||
|     ```yaml | ||||
|     archives: | ||||
|       - | ||||
|         strip_binary_directory: true | ||||
|     ``` | ||||
|  | ||||
| ### blobs.folder | ||||
|  | ||||
| > since 2024-03-29 (v1.25) | ||||
|  | ||||
| Property was renamed to be consistent across all configurations. | ||||
|  | ||||
| === "Before" | ||||
|  | ||||
|     ```yaml | ||||
|     blobs: | ||||
|       - | ||||
|         folder: foo | ||||
|     ``` | ||||
|  | ||||
| === "After" | ||||
|  | ||||
|     ```yaml | ||||
|     blobs: | ||||
|       - | ||||
|         directory: foo | ||||
|     ``` | ||||
|  | ||||
| ### brews.folder | ||||
|  | ||||
| > since 2024-03-29 (v1.25) | ||||
|  | ||||
| Property was renamed to be consistent across all configurations. | ||||
|  | ||||
| === "Before" | ||||
|  | ||||
|     ```yaml | ||||
|     brews: | ||||
|       - | ||||
|         directory: foo | ||||
|     ``` | ||||
|  | ||||
| === "After" | ||||
|  | ||||
|     ```yaml | ||||
|     brews: | ||||
|       - | ||||
|         directory: foo | ||||
|     ``` | ||||
|  | ||||
| ### scoops.folder | ||||
|  | ||||
| > since 2024-03-29 (v1.25) | ||||
|  | ||||
| Property was renamed to be consistent across all configurations. | ||||
|  | ||||
| === "Before" | ||||
|  | ||||
|     ```yaml | ||||
|     scoops: | ||||
|       - | ||||
|         directory: foo | ||||
|     ``` | ||||
|  | ||||
| === "After" | ||||
|  | ||||
|     ```yaml | ||||
|     scoops: | ||||
|       - | ||||
|         directory: foo | ||||
|     ``` | ||||
|  | ||||
| ### furies.skip | ||||
|  | ||||
| > since 2024-03-03 (v1.25) | ||||
|   | ||||
| @@ -44,7 +44,7 @@ ENTRYPOINT ["/app"] | ||||
|  | ||||
| ### Don't | ||||
|  | ||||
| Copy from the `dist` folder. | ||||
| Copy from the `dist` directory. | ||||
|  | ||||
| ```dockerfile | ||||
| FROM scratch | ||||
| @@ -63,6 +63,7 @@ ENTRYPOINT ["/app"] | ||||
| ``` | ||||
|  | ||||
| !!! tip | ||||
|  | ||||
|     If you still want your users to be able to `docker build` without an extra | ||||
|     step, you can have a `Dockerfile` just for GoReleaser, for example, a | ||||
|     `goreleaser.dockerfile`. | ||||
|   | ||||
| @@ -1,6 +1,8 @@ | ||||
| # Build does not contain a main function | ||||
|  | ||||
| This usually happens if you're trying to build a library or if you didn't setup the `builds.main` section in your `.goreleaser.yaml` and your `main.go` is not in the root folder. | ||||
| This usually happens if you're trying to build a library or if you didn't setup | ||||
| the `builds.main` section in your `.goreleaser.yaml` and your `main.go` is not | ||||
| in the root directory. | ||||
|  | ||||
| Here's an example error: | ||||
|  | ||||
| @@ -17,17 +19,17 @@ Add something like this to your config: | ||||
| ```yaml | ||||
| # .goreleaser.yaml | ||||
| builds: | ||||
| - skip: true | ||||
|   - skip: true | ||||
| ``` | ||||
|  | ||||
| ## If your `main.go` is not in the root folder | ||||
| ## If your `main.go` is not in the root directory | ||||
|  | ||||
| Add something like this to your config: | ||||
|  | ||||
| ```yaml | ||||
| # .goreleaser.yaml | ||||
| builds: | ||||
| - main: ./path/to/your/main/pkg/ | ||||
|   - main: ./path/to/your/main/pkg/ | ||||
| ``` | ||||
|  | ||||
| For more info, check the [builds documentation](/customization/build/). | ||||
| @@ -43,9 +45,9 @@ You can set `no_main_check` to `true`: | ||||
| ```yaml | ||||
| # .goreleaser.yaml | ||||
| builds: | ||||
| - main: ./path/... | ||||
|   buildmode: plugin | ||||
|   no_main_check: true | ||||
|   - main: ./path/... | ||||
|     buildmode: plugin | ||||
|     no_main_check: true | ||||
| ``` | ||||
|  | ||||
| For more info, check the [builds documentation](/customization/build/). | ||||
|   | ||||
							
								
								
									
										106
									
								
								www/docs/static/schema-pro.json
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										106
									
								
								www/docs/static/schema-pro.json
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -337,6 +337,9 @@ | ||||
| 					"content_disposition": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"include_meta": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"disableSSL": { | ||||
| 						"type": "boolean", | ||||
| 						"description": "use disable_ssl instead" | ||||
| @@ -440,6 +443,7 @@ | ||||
| 						"enum": [ | ||||
| 							"c-archive", | ||||
| 							"c-shared", | ||||
| 							"pie", | ||||
| 							"" | ||||
| 						], | ||||
| 						"default": "" | ||||
| @@ -507,6 +511,7 @@ | ||||
| 						"enum": [ | ||||
| 							"c-archive", | ||||
| 							"c-shared", | ||||
| 							"pie", | ||||
| 							"" | ||||
| 						], | ||||
| 						"default": "" | ||||
| @@ -659,6 +664,9 @@ | ||||
| 					"algorithm": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"split": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"ids": { | ||||
| 						"items": { | ||||
| 							"type": "string" | ||||
| @@ -1018,6 +1026,33 @@ | ||||
| 				"additionalProperties": false, | ||||
| 				"type": "object" | ||||
| 			}, | ||||
| 			"DockerHub": { | ||||
| 				"properties": { | ||||
| 					"username": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"secret_name": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"images": { | ||||
| 						"items": { | ||||
| 							"type": "string" | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					}, | ||||
| 					"disable": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"description": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"full_description": { | ||||
| 						"$ref": "#/$defs/IncludedMarkdown" | ||||
| 					} | ||||
| 				}, | ||||
| 				"additionalProperties": false, | ||||
| 				"type": "object" | ||||
| 			}, | ||||
| 			"DockerManifest": { | ||||
| 				"properties": { | ||||
| 					"id": { | ||||
| @@ -1234,8 +1269,19 @@ | ||||
| 					"secret_name": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"skip": { | ||||
| 					"disable": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"skip": { | ||||
| 						"oneOf": [ | ||||
| 							{ | ||||
| 								"type": "string" | ||||
| 							}, | ||||
| 							{ | ||||
| 								"type": "boolean" | ||||
| 							} | ||||
| 						], | ||||
| 						"description": "use disable instead" | ||||
| 					} | ||||
| 				}, | ||||
| 				"additionalProperties": false, | ||||
| @@ -1356,6 +1402,9 @@ | ||||
| 					}, | ||||
| 					"mod": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"dir": { | ||||
| 						"type": "string" | ||||
| 					} | ||||
| 				}, | ||||
| 				"additionalProperties": false, | ||||
| @@ -1430,6 +1479,12 @@ | ||||
| 					"url_template": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| 					"url_headers": { | ||||
| 						"items": { | ||||
| 							"type": "string" | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					}, | ||||
| 					"custom_require": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| @@ -2073,7 +2128,14 @@ | ||||
| 					}, | ||||
| 					"formats": { | ||||
| 						"items": { | ||||
| 							"type": "string" | ||||
| 							"type": "string", | ||||
| 							"enum": [ | ||||
| 								"apk", | ||||
| 								"deb", | ||||
| 								"rpm", | ||||
| 								"termux.deb", | ||||
| 								"archlinux" | ||||
| 							] | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					}, | ||||
| @@ -2199,6 +2261,27 @@ | ||||
| 							"type": "string" | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					}, | ||||
| 					"compression": { | ||||
| 						"type": "string", | ||||
| 						"enum": [ | ||||
| 							"gzip", | ||||
| 							"xz", | ||||
| 							"none" | ||||
| 						], | ||||
| 						"default": "gzip" | ||||
| 					}, | ||||
| 					"fields": { | ||||
| 						"additionalProperties": { | ||||
| 							"type": "string" | ||||
| 						}, | ||||
| 						"type": "object" | ||||
| 					}, | ||||
| 					"predepends": { | ||||
| 						"items": { | ||||
| 							"type": "string" | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					} | ||||
| 				}, | ||||
| 				"additionalProperties": false, | ||||
| @@ -2845,6 +2928,12 @@ | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					}, | ||||
| 					"dockerhub": { | ||||
| 						"items": { | ||||
| 							"$ref": "#/$defs/DockerHub" | ||||
| 						}, | ||||
| 						"type": "array" | ||||
| 					}, | ||||
| 					"scoop": { | ||||
| 						"$ref": "#/$defs/Scoop", | ||||
| 						"description": "use scoops instead" | ||||
| @@ -2883,6 +2972,9 @@ | ||||
| 					"signature": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"meta": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"dir": { | ||||
| 						"type": "string" | ||||
| 					}, | ||||
| @@ -3071,6 +3163,12 @@ | ||||
| 						], | ||||
| 						"default": "keep-existing" | ||||
| 					}, | ||||
| 					"replace_existing_artifacts": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"include_meta": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"templated_extra_files": { | ||||
| 						"items": { | ||||
| 							"$ref": "#/$defs/TemplatedExtraFile" | ||||
| @@ -4024,6 +4122,9 @@ | ||||
| 					"signature": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"meta": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| 					"custom_artifact_name": { | ||||
| 						"type": "boolean" | ||||
| 					}, | ||||
| @@ -4175,7 +4276,6 @@ | ||||
| 				"additionalProperties": false, | ||||
| 				"type": "object", | ||||
| 				"required": [ | ||||
| 					"name", | ||||
| 					"publisher", | ||||
| 					"repository", | ||||
| 					"short_description", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user