File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1+ VERSION =$(shell git describe --tags)
2+
3+ build :
4+ go build -ldflags " -X main.version=$( VERSION) "
5+
6+ install :
7+ go install -ldflags " -X main.version=$( VERSION) "
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ Installation
1212------------
1313
1414``` sh
15- go get github.com/pocke/lemonade
15+ go get -d github.com/pocke/lemonade
16+ cd $GOPATH /src/github.com/pocke/lemonade/
17+ make install
1618```
1719
1820Or download from [ latest release] ( https://github.com/pocke/lemonade/releases/latest )
Original file line number Diff line number Diff line change 11package main
22
3- import "os"
3+ import (
4+ "fmt"
5+ "os"
6+ )
47
5- const Usage = `Usage: lemonade [options]... SUB_COMMAND [arg]
8+ var version string
9+ var Usage = fmt .Sprintf (`Usage: lemonade [options]... SUB_COMMAND [arg]
610Sub Commands:
711 open [URL] Open URL by browser
812 copy [text] Copy text.
@@ -16,7 +20,10 @@ Options:
1620 --trans-loopback=true Translate loopback address [open subcommand only]
1721 --trans-localfile=true Translate local file path [open subcommand only]
1822 --help Show this message
19- `
23+
24+
25+ Version:
26+ %s` , version )
2027
2128func main () {
2229 cli := & CLI {
You can’t perform that action at this time.
0 commit comments