Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docwhat feedback #1

Merged
merged 4 commits into from
Jul 31, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
vendor/github.com/
vendor/golang.org/
vendor/gopkg.in/
pachelbel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leading / characters? Ditto for the /vendor as well?

pachelbel.exe
pachelbel*.tgz
pachelbel*.zip
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
sudo: false
language: go

go:
- 1.8
go: 1.8
notifications:
email:
on_success: never
on_failure: never

before_deploy:
- mv $GOPATH/bin/pachelbel ${TRAVIS_BUILD_DIR}
Expand All @@ -12,6 +15,7 @@ before_deploy:
- zip ${TRAVIS_BUILD_DIR}/pachelbel_windows_amd64.zip ./pachelbel.exe

deploy:
skip_cleanup: true
provider: releases
file:
- ${TRAVIS_BUILD_DIR}/pachelbel_linux_amd64.tgz
Expand All @@ -21,3 +25,4 @@ deploy:
secure: UdI8QXj4ftVKoE2poKVC3NKr2xGgVHdC5+/o5I3C7VXKibI98Go/t6TfWkkOBH8fzYjj5hSZ+npjeopZCJUrSezRL1mtC7gyF5h+ExvcgkJjJNv/VhFQpopddJUifHiDXk/oGSV/cXsZR0N0IGfX0QB2/Y6DiLY5bAuZ6hSMHgOr8jsFKPKZoMYOFImdLr9Ducln1aPgNQO/HlGVrGwDsCUBazD4onUm7fMBNXcBUvnSLVas3izTda+NYYlX2aQncSrqvuQFi7sK+ny4RwX2tCW2m2/5WVk5oHTmhzr9B4FIfYi5pyzPKywvUNwJgkepLCbhkZVx3Uh7nN/rZCiRhBPa3qiVXihexi0ydbwnJm+d5vjbFreK2fzjGHEDT2jEUfgVzQiV6XE8Cch5yVT+gfg43E+nUF70Uja063ti8/9GvA27h0c1dg+bu5tz8p/lB8YIv3f0NeYG3odAzTH/mfSgV5S8l5ztGqMw2G192ZdvAPnSI0GMutoa4d1tdzrTTi8n9iY9sCJdrMTtuGK2hzUBRNUlFjw5+mT+WQIGdUdgi/A2Q4NmY+I7NEyeWwPdqB1MHhjqdIXjqWY+HWxparCaUgdg2rkA4z+VvVDVnCc2lqKYeiV9x1cvdFpAFiyGg1Yg6KluZoialh/xwNq761JsTZGcNWCpRrFkYjbs8PA=
on:
tags: true
repo: benjdewan/pachelbel
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CC=gcc
LDFLAGS="-X github.com/benjdewan/pachelbel/cmd.version=$(shell git describe --tags || echo DEV-BUILD)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need the whole github.com/... part?


.PHONY: all clean

Expand All @@ -18,13 +18,13 @@ endif
post-build: linux-build macos-build windows-build

linux-build: test-build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install github.com/benjdewan/pachelbel
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -ldflags $(LDFLAGS) github.com/benjdewan/pachelbel

macos-build: test-build
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go install github.com/benjdewan/pachelbel
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go install -ldflags $(LDFLAGS) github.com/benjdewan/pachelbel

windows-build: test-build
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go install github.com/benjdewan/pachelbel
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go install -ldflags $(LDFLAGS) github.com/benjdewan/pachelbel

test-build: pre-build
$(GOPATH)/bin/gometalinter cmd/ connection/ main.go
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/spf13/cobra"
)

const version string = "v0.1.2"
var version string = "DEV-BUILD"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the version be in main? The CLI's version isn't that interesting, but the version of whatever it does is.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought

$ pachelbel version

was nicer than

$ pachelbel -version

And you can't reference the main package from cmd since that would create a cycle.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough; I haven't read through the code yet.


var versionCmd = &cobra.Command{
Use: "version",
Expand Down