Skip to content

Commit

Permalink
import version from file at build
Browse files Browse the repository at this point in the history
  • Loading branch information
thatmattlove committed Jan 19, 2022
1 parent 6c25d3f commit 8e01661
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func CLI() *cli.App {
Usage: "MAC Address CLI Toolkit",
Action: MainCmd,
Commands: subs,
Version: "0.0.7",
Version: Version,
HideVersion: false,
}

Expand Down
9 changes: 8 additions & 1 deletion constants.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package main

import "golang.org/x/text/language"
import (
_ "embed"

"golang.org/x/text/language"
)

const (
_ouiListUrl string = "https://gitlab.com/wireshark/wireshark/-/raw/master/manuf"
Expand All @@ -12,3 +16,6 @@ const (
var MaybePanic func(err error)

var _locale language.Tag

//go:embed .version
var Version string

0 comments on commit 8e01661

Please sign in to comment.