Skip to content
Snippets Groups Projects
Verified Commit 67e258a7 authored by meskio's avatar meskio :tent:
Browse files

[feat] add version string

The binary now has a --version that is extracted from the git
tags/commits.

- Resolves: #39
parent 71585085
No related branches found
Tags 0.18.9
1 merge request!16[feat] add version string
......@@ -17,7 +17,7 @@ build_test:
- cd ${APP_PATH}
- go get .
- go test ./...
- go build
- make build
tags:
- linux
artifacts:
......
......@@ -2,8 +2,8 @@
all: icon locales build
build: icon catalog.go
go build
build:
go build -ldflags "-X main.version=`git describe --tags`"
clean:
make -C icon clean
......
......@@ -16,6 +16,8 @@
package main
import (
"flag"
"fmt"
"log"
"os"
......@@ -29,9 +31,17 @@ const (
applicationName = "RiseupVPN"
)
var version string
var printer *message.Printer
func main() {
versionFlag := flag.Bool("version", false, "Version of the bitmask-systray")
flag.Parse()
if *versionFlag {
fmt.Println(version)
os.Exit(0)
}
if _, err := os.Stat(bitmask.ConfigPath); os.IsNotExist(err) {
os.MkdirAll(bitmask.ConfigPath, os.ModePerm)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment