Skip to content

Commit

Permalink
Merge pull request #55 from target/cmd
Browse files Browse the repository at this point in the history
refactor: move main.go to /cmd/flottbot
  • Loading branch information
wass3r committed Sep 17, 2018
2 parents 8127df9 + 39324ae commit badca3f
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 64 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Temporary Items
.env
debug
flottbot
!flottbot/

### Git ###
vendor
36 changes: 17 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
language: go
go:
- '1.11'
- "1.11"
before_install:
- go get github.com/mattn/goveralls
- go get github.com/fzipp/gocyclo
- go get github.com/golang/dep/cmd/dep
- go get github.com/mattn/goveralls
- go get github.com/fzipp/gocyclo
- go get github.com/golang/dep/cmd/dep
before_script:
- echo $TRAVIS_COMMIT
- echo $TRAVIS_TAG
- echo $TRAVIS_BRANCH
- echo $TRAVIS_BUILD_NUMBER
- echo $TRAVIS_REPO_SLUG
- dep ensure
- echo $TRAVIS_COMMIT
- echo $TRAVIS_TAG
- echo $TRAVIS_BRANCH
- echo $TRAVIS_BUILD_NUMBER
- echo $TRAVIS_REPO_SLUG
- dep ensure
script:
- go vet $(go list ./... | grep -v vendor)
- go test -v -race -coverprofile=coverage.out -coverpkg=./... $(go list ./... | grep
-v vendor)
- gocyclo -over 18 `find . -iname '*.go' | grep -v vendor | grep -v '_test.go'`
- "$GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci"
- go vet $(go list ./... | grep -v vendor)
- go test -v -race -coverprofile=coverage.out -coverpkg=./... $(go list ./... | grep -v vendor)
- gocyclo -over 18 `find . -iname '*.go' | grep -v vendor | grep -v '_test.go'`
- "$GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci"
before_deploy:
- go get github.com/mitchellh/gox
- gox -ldflags "-X github.com/target/flottbot/version.Version=${TRAVIS_TAG} -X github.com/target/flottbot/version.GitHash=${TRAVIS_COMMIT}"
-os="linux darwin windows" -arch="amd64" -verbose ./...
- "./tar-release.sh"
- go get github.com/mitchellh/gox
- gox -ldflags "-X github.com/target/flottbot/version.Version=${TRAVIS_TAG} -X github.com/target/flottbot/version.GitHash=${TRAVIS_COMMIT}" -os="linux darwin windows" -arch="amd64" -verbose ./...
- "./tar-release.sh"
deploy:
provider: releases
api_key:
Expand Down
82 changes: 40 additions & 42 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build-debug",
"type": "shell",
"command": "go",
"group": "build",
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared"
},
"tasks": [{
"label": "build-debug",
"type": "shell",
"command": "go",
"group": "build",
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared"
},
"args": [
"build",
"-i",
"-gcflags",
"'-N -l'"
],
"linux": {
"args": [
"build",
"-i",
"-gcflags",
"'-N -l'"
],
"linux": {
"args": [
"-o",
"debug",
"${workspaceRoot}/main.go"
]
},
"osx": {
"args": [
"-o",
"debug",
"${workspaceRoot}/main.go"
]
},
"windows": {
"args": [
"-o",
"debug.exe",
"\"${workspaceRoot}\\main.go\""
]
},
"problemMatcher": [
"$go"
"-o",
"debug",
"${workspaceRoot}/cmd/flottbot/main.go"
]
}
]
},
"osx": {
"args": [
"-o",
"debug",
"${workspaceRoot}/cmd/flottbot/main.go"
]
},
"windows": {
"args": [
"-o",
"debug.exe",
"\"${workspaceRoot}\\cmd\\flottbot\\main.go\""
]
},
"problemMatcher": [
"$go"
]
}]
}
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY / .
RUN dep ensure
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/target/flottbot/version.Version=${SOURCE_BRANCH} -X github.com/target/flottbot/version.GitHash=${SOURCE_COMMIT}" \
-o flottbot .
-o flottbot ./cmd/flottbot

FROM alpine:3.8
RUN apk --no-cache add ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.golang
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY / .
RUN dep ensure
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/target/flottbot/version.Version=${SOURCE_BRANCH} -X github.com/target/flottbot/version.GitHash=${SOURCE_COMMIT}" \
-o flottbot .
-o flottbot ./cmd/flottbot

FROM golang:1.11-alpine
RUN apk add --no-cache git
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.ruby
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COPY / .
RUN dep ensure
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -ldflags "-X github.com/target/flottbot/version.Version=${SOURCE_BRANCH} -X github.com/target/flottbot/version.GitHash=${SOURCE_COMMIT}" \
-o flottbot .
-o flottbot ./cmd/flottbot

FROM ruby:2.5-alpine
RUN apk add --no-cache ruby-dev build-base
Expand Down

0 comments on commit badca3f

Please sign in to comment.