Skip to content

Commit

Permalink
version.go: hardcode version number
Browse files Browse the repository at this point in the history
  • Loading branch information
aviau committed Jul 20, 2017
1 parent ec6bef6 commit 59b980d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ all: fmt gopass test vet lint

SOURCEDIR=.
SOURCES := $(shell find $(SOURCEDIR) -name '*.go') Makefile
VERSION := 1.0.5
LDFLAGS=-ldflags "-X github.com/aviau/gopass/cmd/gopass/internal/version.Version=$(VERSION)"

gopass: $(SOURCES)
go build -v ${LDFLAGS} -o gopass cmd/gopass/main.go
go build -v -o gopass cmd/gopass/main.go

.PHONY: test
test:
go test ${LDFLAGS} -v ./...
go test -v ./...

.PHONY: install
install:
go install ${LDFLAGS} ./...
go install ./...

.PHONY: clean
clean:
Expand Down
2 changes: 1 addition & 1 deletion cmd/gopass/internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ package version

var (
//Version is the current gopass version
Version = "UNKNOWN"
Version = "1.0.6"
)
4 changes: 0 additions & 4 deletions cmd/gopass/internal/version/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ import (
"github.com/aviau/gopass/cmd/gopass/internal/version"
)

func TestVersionNotUnknown(t *testing.T) {
assert.NotEqual(t, version.Version, "UNKNOWN")
}

func TestVersionNoLetters(t *testing.T) {
for _, character := range version.Version {
assert.False(t, unicode.IsLetter(character))
Expand Down

0 comments on commit 59b980d

Please sign in to comment.