Skip to content

Commit

Permalink
Included packge version in the executable
Browse files Browse the repository at this point in the history
  • Loading branch information
kolayne committed Aug 1, 2024
1 parent e47ec1d commit 8baeafe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ TODO: date

- Added release script
- Added CI for creating releases
- Included package version in the executable binary

# v0.1.0

Expand Down
1 change: 1 addition & 0 deletions docker-on-top_version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0-dirty
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
_ "embed"
"os"

"github.com/docker/go-plugins-helpers/volume"
Expand Down Expand Up @@ -31,7 +32,12 @@ func initLogger() *logging.Logger {

var log *logging.Logger = initLogger()

//go:embed docker-on-top_version.txt
var Version []byte

func main() {
log.Infof("Starting docker-on-top v%s", string(Version))

dotRootDir := "/var/lib/docker-on-top/"
socketPath := "/run/docker/plugins/docker-on-top.sock"

Expand Down

0 comments on commit 8baeafe

Please sign in to comment.