Commit 755a1ab8 authored by user's avatar user
Browse files

Version is now generated at build time through the Makefile.

parent 61b11821
GO = GO111MODULE=on go
VERSION=`git describe --tags`
all: fmt check test-coverage build
......@@ -25,12 +26,16 @@ test-coverage:
clean:
rm -f coverage.txt
rm -f varroa
rm -f varroa-fuse
rm -f varroa_bash_completion
rm -f send-to-varroa.js
build:
${GO} build -v ./...
build-bin:
cd cmd/varroa;${GO} build -o ../../varroa;cd ../..
cd cmd/varroa-fuse;${GO} build -o ../../varroa-fuse;cd ../..
cd cmd/varroa;${GO} build -ldflags "-X gitlab.com/passelecasque/varroa.Version=${VERSION}" -o ../../varroa;cd ../..
cd cmd/varroa-fuse;${GO} build -ldflags "-X gitlab.com/passelecasque/varroa.Version=${VERSION}" -o ../../varroa-fuse;cd ../..
cp cmd/varroa/bash_completion varroa_bash_completion
cp script/send-to-varroa.js send-to-varroa.js
......
......@@ -21,7 +21,7 @@ const (
varroaUsage = `
_ _ ____ ____ ____ ____ ____ _ _ _ _ ____ _ ____ ____
| | |__| |__/ |__/ | | |__| |\/| | | [__ | | |__|
\/ | | | \ | \ |__| | | | | |__| ___] | |___ | |
\/ | | | \ | \ |__| | | | | |__| ___] | |___ | | (%s)
Description:
......@@ -211,7 +211,7 @@ type varroaArguments struct {
func (b *varroaArguments) parseCLI(osArgs []string) error {
// parse arguments and options
args, err := docopt.Parse(varroaUsage, osArgs, true, fmt.Sprintf(varroa.FullVersion, varroa.FullName, varroa.Version), false, false)
args, err := docopt.Parse(fmt.Sprintf(varroaUsage, varroa.Version), osArgs, true, fmt.Sprintf(varroa.FullVersion, varroa.FullName, varroa.Version), false, false)
if err != nil {
return errors.Wrap(err, varroa.ErrorInfoBadArguments)
}
......
package varroa
var (
Version = "dev"
)
const (
FullName = "varroa musica"
FullNameAlt = "VarroaMusica"
Version = "v29dev"
FullVersion = "%s -- %s."
DefaultPIDFile = "varroa_pid"
DefaultLogFile = "log"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment