render

package
v0.0.0-...-3a64406 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cli.Command{
	Name:  "render-changelog",
	Usage: "Renders a changelog.yaml as a markdown changelog section.",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    markdownPathFlag,
			EnvVars: common.EnvFor(markdownPathFlag),
			Usage:   "Path to the destination markdown file.",
			Value:   "CHANGELOG.partial.md",
		},
		&cli.StringFlag{
			Name:    versionFlag,
			EnvVars: common.EnvFor(versionFlag),
			Usage: "Version to stamp in the changelog section header. " +
				"If omitted, no version header will be generated",
			Value: "",
		},
		&cli.TimestampFlag{
			Name:    dateFlag,
			EnvVars: common.EnvFor(dateFlag),
			Usage: "Date to stamp in the changelog section header, in YYYY-MM-DD format. " +
				"If empty it will default to the current time (time.Now()).",
			Value:  cli.NewTimestamp(time.Now()),
			Layout: "2006-01-02",
		},
	},
	Action: Render,
}

Cmd is the cli.Command object for the is-held command.

Functions

func Render

func Render(cCtx *cli.Context) error

Render is a command function which loads a changelog.yaml file from this, and prints to stdout whether it has the Held flag set to true.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL