Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mike182uk committed Aug 22, 2017
1 parent 2a83955 commit 6bc5875
Show file tree
Hide file tree
Showing 47 changed files with 1,888 additions and 1,103 deletions.
15 changes: 5 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ go:
- 1.8
- tip

addons:
apt:
packages:
- xclip # So we can run the clipboard tests

cache:
directories:
- vendor

before_install:
# So we can run the clipboard tests
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
env:
global:
# coveralls repo token
- secure: N9SmiHqmT62JBF4+ChXXrYKdIfTZ7nHkcQHnSRzyZ4ii00uY9g9w/8nWPGaGBJ4WGoaCUJx+VkVCS1UOf/UbZ8CqST89LE5EFc2N4AnqFSA3iRA3BlTb1OehppdYSA9GdrmX+NbaDJNdaqgOiz+JpBvbno2+hP0jXQPPqEhQKlRlP+I4QlwYtWiHm+iwoNP88kmunBj+G/qe79kq0qflQOFcZQIujORWjNLGNKepA06Bnb3Yi42EihXCQP7BbXWgKhp3SVTvIAL7wfEYjTOmPRXvU+bs8O7DI/C002CfnyiE00/KzKNaD+ICRiBh33ew3wD3FraLuXlWJ9BDNXKjfv04y0Mif/oERHc2Y08BNuQAFnlD2QCMrze6bRrJRf0Z5wD9tQn52BhP6w9qnxmMXitDu+j9uUj81wNz9uiEdFm+bZvn0HKHcgMzye9VCsPXRhmAABlr9XlGY+vjiiaguiWM/d6x87CtTBZva9FVZkfd3UY61X2L4vSIYuGOQe86GJFb4w8u71iD1Do4lnp/mKXRymeUgMTWIyF2meZK/7gF1TwLxskmvgeEBZ7uTSpsU+iNuIV4hzmPn5IAQgQQc4RqFPOHP7ZqvRvA++cImTHk5IW78KW0B2Ca2QPJHXNekHuAMJV65VSnhh4h4r3GpLh15rAMqx+Ud2BFsRzWxuY=

before_script:
- make install-env-deps
Expand All @@ -26,7 +21,7 @@ before_script:

script:
- make lint
- make test
- make test && make coverage
- make build && make clean

after_success:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 2.0.0

Rewrite all the things

# 1.0.0

First release
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Please report issues via the issue tracker on [GitHub](https://github.com/mike18

- **Lint changes** - Make sure you run `make lint` before committing your code.

- **Add tests where appropriate** - Make sure new features or bug fixes are covered by a test/
- **Add tests where appropriate** - Make sure new features or bug fixes are covered by a test.

- **Document any change in behaviour** - Make sure the README and any other relevant documentation are kept up-to-date.

Expand Down
182 changes: 182 additions & 0 deletions Gopkg.lock

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

62 changes: 62 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/ararog/timeago"
version = "0.0.1"

[[constraint]]
branch = "master"
name = "github.com/atotto/clipboard"

[[constraint]]
name = "github.com/boltdb/bolt"
version = "1.3.0"

[[constraint]]
name = "github.com/briandowns/spinner"
version = "1.0.0"

[[constraint]]
name = "github.com/fatih/color"
version = "1.5.0"

[[constraint]]
name = "github.com/parnurzeal/gorequest"
version = "0.2.15"

[[constraint]]
name = "github.com/segmentio/go-prompt"
revision = "f0d19b6901ade831d5a3204edc0d6a7d6457fbb2"

[[constraint]]
branch = "master"
name = "github.com/spf13/afero"

[[constraint]]
branch = "master"
name = "github.com/spf13/cobra"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"
26 changes: 16 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
BIN=snpt
BUILD_DIR=./build
SRC_DIR=./src
ENTRYPOINT=./cmd/snpt

.PHONY: default
default: build

.PHONY: test
test:
go test -v $(SRC_DIR)/...
go test -cover -v ./internal/...

.PHONY: coverage
coverage:
goveralls -package=./internal/...

.PHONY: lint
lint:
gometalinter \
--disable=errcheck \
--disable=gotype \
--enable=gofmt \
--enable=misspell \
--vendor \
$(SRC_DIR)/...
--deadline=180s \
--exclude=internal/platform/storage/test.go \
./internal/... ./cmd/...

.PHONY: build
build:
go build -o $(BUILD_DIR)/$(BIN) $(SRC_DIR)
go build -o $(BUILD_DIR)/$(BIN) $(ENTRYPOINT)

.PHONY: build-all
build-all:
gox -output "$(BUILD_DIR)/$(BIN)-$(TRAVIS_TAG)-{{.OS}}-{{.Arch}}/$(BIN)" -os="darwin windows linux" -arch="amd64" $(SRC_DIR)/...
gox -output "$(BUILD_DIR)/$(BIN)-$(TRAVIS_TAG)-{{.OS}}-{{.Arch}}/$(BIN)" -os="darwin windows linux" -arch="amd64" $(ENTRYPOINT)

.PHONY: package
package:
Expand All @@ -40,15 +45,16 @@ clean-all: clean

.PHONY: install
install:
glide install
dep ensure

.PHONY: install-env-deps
install-env-deps:
go get -u github.com/mitchellh/gox
go get -u github.com/alecthomas/gometalinter
go get -u github.com/Masterminds/glide
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/mattn/goveralls
gometalinter --install

.PHONY: fmt
fmt:
go fmt $(SRC_DIR)/...
go fmt ./internal/... ./cmd/...
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![Version](https://img.shields.io/github/release/mike182uk/snpt.svg?style=flat-square)](https://github.com/mike182uk/snpt)
[![Build Status](https://img.shields.io/travis/mike182uk/snpt.svg?style=flat-square)](http://travis-ci.org/mike182uk/snpt)
[![Downloads](https://img.shields.io/github/downloads/mike182uk/snpt/total.svg?style=flat-square)](https://github.com/mike182uk/snpt)
[![Coveralls](https://img.shields.io/coveralls/mike182uk/snpt/master.svg?style=flat-square)](https://coveralls.io/r/mike182uk/snpt)
[![Go Report Card](https://goreportcard.com/badge/github.com/mike182uk/snpt)](https://goreportcard.com/report/github.com/mike182uk/snpt)
[![License](https://img.shields.io/github/license/mike182uk/snpt.svg?style=flat-square)](https://github.com/mike182uk/snpt)

A [gist](https://gist.github.com/) powered CLI snippet retriever.
Expand Down
2 changes: 1 addition & 1 deletion bash_completion
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_snpt()
{
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "cp ls token sync write" -- $cur) )
COMPREPLY=( $(compgen -W "cp copy ls list token sync write version" -- $cur) )
}
complete -F _snpt snpt
Loading

0 comments on commit 6bc5875

Please sign in to comment.