pull/3062/merge
W. Michael Petullo 2024-11-21 01:14:45 +00:00 committed by GitHub
commit 4005576c43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -59,12 +59,15 @@ var (
func main() {
// Load the version
version, err := ioutil.ReadFile("./VERSION")
if err != nil {
log.Fatal(err)
version := os.Getenv("GOPHISH_VERSION")
if version == "" {
versionBytes, err := ioutil.ReadFile("./VERSION")
if err != nil {
log.Fatal(err)
}
version = string(versionBytes)
}
kingpin.Version(string(version))
kingpin.Version(version)
// Parse the CLI flags and load the config
kingpin.CommandLine.HelpFlag.Short('h')