Skip to content

Commit

Permalink
Fix glide configuration, docs, and logrus import
Browse files Browse the repository at this point in the history
For detail on the glide configuration fixes:

Masterminds/glide#592
  • Loading branch information
jmcfarlane committed May 13, 2017
1 parent 92357eb commit 80063d6
Show file tree
Hide file tree
Showing 15 changed files with 82 additions and 51 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cmd/notable-cli/notable-cli
notable
target
vendor/
vendor/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* Open BoltDB before Bleve as the former supports a timeout :)
* Improve error messaging on startup.
* Enable line wrap.
* Enable vendoring via [Glide](https://glide.sh/).
* Ensure all released binaries are built with vendored dependencies.
* Initial work on a command line client [`notable-cli`](https://github.com/jmcfarlane/notable/tree/master/cmd/notable-cli).
* Fix case incorrect import of [logrus](https://github.com/sirupsen/logrus).

## v0.0.9 / 2017-04-26

Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ships as a static binary.

![](docs/images/notable.png)

You can view recent changes in the [changelog](CHANGELOG.md).

## Installation

### Linux, FreeBSD, MacOS, Windows
Expand All @@ -19,13 +21,25 @@ Download and extract the latest
The zip file contains an executable named `notable`. The MacOS version also
includes an [app bundle](https://en.wikipedia.org/wiki/Bundle_(macOS)).

### Compile from source
### Compile from source (using latest dependencies)

```
go get -u github.com/jmcfarlane/notable
notable
```

### Compile from source (using known good dependencies)

```
curl -s https://glide.sh/get | sh
go get -u -d github.com/jmcfarlane/notable
cd $GOPATH/github.com/jmcfarlane/notable
glide install
go generate
go build
notable
```

### Run via a [rkt](https://coreos.com/rkt/) container

Download the latest `.aci` from the [release](https://github.com/jmcfarlane/notable/releases) page. Then run it:
Expand Down Expand Up @@ -98,7 +112,7 @@ focused).
| [go-sqlite3](https://github.com/mattn/go-sqlite3) | Datastore (*optional*) |
| [httprouter](https://github.com/julienschmidt/httprouter) | Mux |
| [jQuery](https://jquery.com/) | Dom manipulation |
| [logrus](https://github.com/Sirupsen/logrus) | Golang logging |
| [logrus](https://github.com/sirupsen/logrus) | Golang logging |
| [Mousetrap](https://craig.is/killing/mice) | Keyboard bindings |
| [Require.js](http://requirejs.org/) | Dependency management |
| [text plugin](http://github.com/requirejs/text) | Text templates |
Expand Down
2 changes: 1 addition & 1 deletion app/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/twinj/uuid"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// APIResponse - Envelope to communicate details to the frontent
Expand Down
2 changes: 1 addition & 1 deletion bolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/boltdb/bolt"
"github.com/jmcfarlane/notable/app"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// BoltDB backend
Expand Down
2 changes: 1 addition & 1 deletion cmd/notable-cli/cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"fmt"

log "github.com/Sirupsen/logrus"
"github.com/jmcfarlane/notable/app"
log "github.com/sirupsen/logrus"
)

// createCmd represents the create command
Expand Down
2 changes: 1 addition & 1 deletion cmd/notable-cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"syscall"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// Daemonize (please use something like upstart, daemontools, systemd)
Expand Down
63 changes: 33 additions & 30 deletions glide.lock

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

22 changes: 13 additions & 9 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
package: github.com/jmcfarlane/notable
import:
- package: github.com/Sirupsen/logrus
version: ~0.11.5
- package: github.com/sirupsen/logrus
version: master
- package: github.com/blevesearch/bleve
version: ~0.5.0
version: master
- package: github.com/boltdb/bolt
version: ~1.3.0
version: master
- package: github.com/drhodes/golorem
version: master
- package: github.com/elazarl/go-bindata-assetfs
version: master
- package: github.com/julienschmidt/httprouter
version: ~1.1.0
version: master
- package: github.com/mattn/go-sqlite3
version: ~1.2.0
version: master
- package: github.com/mitchellh/go-homedir
version: master
- package: github.com/pkg/errors
version: ~0.8.0
version: master
- package: github.com/twinj/uuid
version: ~0.10.0
version: master
testImport:
- package: github.com/prometheus/log
version: master
- package: github.com/stretchr/testify
version: ~1.1.4
version: master
subpackages:
- assert
2 changes: 1 addition & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/jmcfarlane/notable/app"
"github.com/julienschmidt/httprouter"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// CreateNote creates a new note
Expand Down
3 changes: 2 additions & 1 deletion index.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package main
import (
"os"

log "github.com/Sirupsen/logrus"
"github.com/blevesearch/bleve"
"github.com/jmcfarlane/notable/app"

log "github.com/sirupsen/logrus"
)

func unIndex(uid string) error {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
homedir "github.com/mitchellh/go-homedir"
"github.com/pkg/errors"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// Program version information
Expand Down
4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ for goos in darwin freebsd linux windows; do
cp LICENSE target/notable-${TAG}.${goos}-amd64
done

# Pin dependencies to known stable versions
curl -s https://glide.sh/get | sh
glide install

# Build static assets
go generate

Expand Down
2 changes: 1 addition & 1 deletion sqlite3.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/jmcfarlane/notable/app"
_ "github.com/mattn/go-sqlite3"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// Sqlite3 backend
Expand Down

0 comments on commit 80063d6

Please sign in to comment.