Skip to content

Commit b730bd3

Browse files
committed
Change the structure of the repository to make it work with go get
1 parent d0413fa commit b730bd3

14 files changed

Lines changed: 5 additions & 5 deletions

File tree

File renamed without changes.
File renamed without changes.

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GOFLAGS := \
1313
-ldflags "-X main.BuildVersion=$(shell git rev-parse HEAD) -X main.BuildDescribe=$(shell git describe --tags --always --dirty)"
1414
GO_CMDS := $(BIN)/git-sizer
1515
GO_PKGS := $(shell cd .gopath/src && find github.com/github/git-sizer/ -type f -name '*.go' | xargs -n1 dirname | grep -v '^github.com/github/git-sizer/vendor/' | sort -u)
16-
GO_SRCS := $(shell find src -type f -name '*.go')
16+
GO_SRCS := $(shell find . -type f -name '*.go' | grep -v '^\./vendor/' | sort -u)
1717

1818
.PHONY: all
1919
all: $(GO_CMDS)
@@ -33,11 +33,11 @@ gotest:
3333

3434
.PHONY: gofmt
3535
gofmt:
36-
find src test -name "*.go" -print0 | xargs -0 $(GOFMT) -l -w | sed -e 's/^/Fixing /'
36+
$(GOFMT) -l -w $(GO_SRCS) | sed -e 's/^/Fixing /'
3737

3838
.PHONY: goimports
3939
goimports:
40-
find src -name "*.go" -print0 | xargs -0 goimports -l -w -e
40+
goimports -l -w -e $(GO_SRCS)
4141

4242
.PHONY: govet
4343
govet:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
// Smoke test that the program runs.
99
func TestExec(t *testing.T) {
1010
command := exec.Command("bin/git-sizer", ".")
11-
command.Dir = "../.."
11+
command.Dir = ".."
1212
output, err := command.CombinedOutput()
1313
if err != nil {
1414
t.Errorf("command failed (%s); output: %#v", err, string(output))
File renamed without changes.
File renamed without changes.

script/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ fi
1515
BASE="$GOPATH/src/github.com/github/git-sizer"
1616
rm -f "$BASE"
1717
mkdir -p $(dirname "$BASE")
18-
ln -s "$(pwd)/src" "$BASE"
18+
ln -s "$(pwd)" "$BASE"
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)