Skip to content

Commit

Permalink
Release v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemfp committed Nov 1, 2018
1 parent e34e7ea commit 31fb22a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ GOPATH := $(CURDIR)
GOPATHCMD=GOPATH=$(GOPATH)
GOCMD=$(GOPATHCMD) go

DEP=cd $(PROJECT_PATH) && GOPATH=$(GOPATH) dep

PROJECT_PATH=$(GOPATH)/src/$(PROJECT)

DEP=cd $(PROJECT_PATH) && GOPATH=$(GOPATH) dep
VERSION := `git describe --exact-match --tags 2> /dev/null || git rev-parse HEAD`

.DEFAULT_GOAL: install

Expand All @@ -30,7 +32,7 @@ dep-status:
@$(DEP) status

install: dep-ensure
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOCMD) build -a -installsuffix cgo -ldflags="-w -s" -o ./bin/$(PROJECT) ./src/$(PROJECT)
@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOCMD) build -a -installsuffix cgo -ldflags="-w -s -X=main.version=$(VERSION)" -o ./bin/$(PROJECT) ./src/$(PROJECT)

run:
@GOPATH=$(GOPATH) $(GOCMD) run $(PROJECT_PATH)/main.go $(EXPRESSION)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Find synonyms without leaving your terminal
Run this command to download the latest version of `sinonimos`:

```bash
sudo curl -L "https://github.com/felipemfp/sinonimos-cli/releases/download/v0.3.1/sinonimos" -o /usr/local/bin/sinonimos
sudo curl -L "https://github.com/felipemfp/sinonimos-cli/releases/download/v0.4.0/sinonimos" -o /usr/local/bin/sinonimos
```

Apply executable permissions to the binary:
Expand Down
1 change: 1 addition & 0 deletions src/sinonimos/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/sinonimos/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

var name = "sinonimos"
var version = "v0.3.1"
var version = "dev"
var s = spinner.New(spinner.CharSets[14], 100*time.Millisecond)

func main() {
Expand Down Expand Up @@ -87,12 +87,12 @@ func find(expression string) error {
for j, meaningSection := range meaningSections {
if meaning, ok := scrape.Find(meaningSection, scrape.ByClass("sentido")); ok {
fmt.Printf("\n> %s\n", aurora.Colorize(scrape.Text(meaning), getColors(j)).Bold())
fmt.Print(" ")
} else {
fmt.Print("\n - ")
fmt.Print("\n> -\n")
}

synonyms := scrape.FindAll(meaningSection, synonymMatcher)
fmt.Print(" ")
for i, synonym := range synonyms {
fmt.Print(scrape.Text(synonym))
if i == (len(synonyms) - 1) {
Expand Down

0 comments on commit 31fb22a

Please sign in to comment.