Make copyright year dynamic
This commit is contained in:
parent
0b337849d4
commit
af17b6a6f3
5 changed files with 13 additions and 9 deletions
|
@ -75,10 +75,11 @@ This tool is experimental and in the future it will be integrated in step cli.
|
||||||
OPTIONS`)
|
OPTIONS`)
|
||||||
fmt.Fprintln(os.Stderr)
|
fmt.Fprintln(os.Stderr)
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
fmt.Fprintln(os.Stderr, `
|
fmt.Fprintf(os.Stderr, `
|
||||||
COPYRIGHT
|
COPYRIGHT
|
||||||
|
|
||||||
(c) 2018-2020 Smallstep Labs, Inc.`)
|
(c) 2018-%d Smallstep Labs, Inc.
|
||||||
|
`, time.Now().Year())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ $ step-ca $STEPPATH/config/ca.json --password-file ./password.txt
|
||||||
'''`
|
'''`
|
||||||
app.Flags = append(app.Flags, commands.AppCommand.Flags...)
|
app.Flags = append(app.Flags, commands.AppCommand.Flags...)
|
||||||
app.Flags = append(app.Flags, cli.HelpFlag)
|
app.Flags = append(app.Flags, cli.HelpFlag)
|
||||||
app.Copyright = "(c) 2018-2020 Smallstep Labs, Inc."
|
app.Copyright = fmt.Sprintf("(c) 2018-%d Smallstep Labs, Inc.", time.Now().Year())
|
||||||
|
|
||||||
// All non-successful output should be written to stderr
|
// All non-successful output should be written to stderr
|
||||||
app.Writer = os.Stdout
|
app.Writer = os.Stdout
|
||||||
|
|
|
@ -105,10 +105,11 @@ This tool is experimental and in the future it will be integrated in step cli.
|
||||||
OPTIONS`)
|
OPTIONS`)
|
||||||
fmt.Fprintln(os.Stderr)
|
fmt.Fprintln(os.Stderr)
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
fmt.Fprintln(os.Stderr, `
|
fmt.Fprintf(os.Stderr, `
|
||||||
COPYRIGHT
|
COPYRIGHT
|
||||||
|
|
||||||
(c) 2018-2020 Smallstep Labs, Inc.`)
|
(c) 2018-%d Smallstep Labs, Inc.
|
||||||
|
`, time.Now().Year())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,10 +250,11 @@ This tool is experimental and in the future it will be integrated in step cli.
|
||||||
OPTIONS`)
|
OPTIONS`)
|
||||||
fmt.Fprintln(os.Stderr)
|
fmt.Fprintln(os.Stderr)
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
fmt.Fprintln(os.Stderr, `
|
fmt.Fprintf(os.Stderr, `
|
||||||
COPYRIGHT
|
COPYRIGHT
|
||||||
|
|
||||||
(c) 2018-2021 Smallstep Labs, Inc.`)
|
(c) 2018-%d Smallstep Labs, Inc.
|
||||||
|
`, time.Now().Year())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,10 +148,11 @@ This tool is experimental and in the future it will be integrated in step cli.
|
||||||
OPTIONS`)
|
OPTIONS`)
|
||||||
fmt.Fprintln(os.Stderr)
|
fmt.Fprintln(os.Stderr)
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
fmt.Fprintln(os.Stderr, `
|
fmt.Fprintf(os.Stderr, `
|
||||||
COPYRIGHT
|
COPYRIGHT
|
||||||
|
|
||||||
(c) 2018-2020 Smallstep Labs, Inc.`)
|
(c) 2018-%d Smallstep Labs, Inc.
|
||||||
|
`, time.Now().Year())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue