Skip to content

Commit

Permalink
Merge pull request #13 from fabiorphp/feature/folder-structure
Browse files Browse the repository at this point in the history
Change the folder structure and build
  • Loading branch information
mre authored Oct 11, 2018
2 parents e91b2be + 5c4e42d commit cc09409
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
.glide/
dist/

riffraff

# Coverage files
cover*

# Build folder
build/
15 changes: 12 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: riffraff
dist: ./build
before:
hooks:
- make clean
- make configure
builds:
- binary: riffraff
- main: ./cmd/riffraff/main.go
binary: riffraff
goos:
- windows
- darwin
- linux
- windows
goarch:
- amd64
- amd64
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

# Build app
build:
go build
@go build -v -o ./build/riffraff github.com/mre/riffraff/cmd/riffraff
.PHONY: build

# Clean up
clean:
@rm -fR ./cover*
@rm -fR ./build/ ./cover*
.PHONY: clean

# Creates folders
configure:
@mkdir -p ./build
.PHONY: configure

# Run tests and generates html coverage file
cover: test
@go tool cover -html=./coverage.text -o ./coverage.html
Expand Down
2 changes: 1 addition & 1 deletion main.go → cmd/riffraff/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/bndr/gojenkins"
kingpin "gopkg.in/alecthomas/kingpin.v2"

"github.com/mre/riffraff/commands"
"github.com/mre/riffraff/internal/commands"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion commands/build.go → internal/commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"

"github.com/bndr/gojenkins"
"github.com/mre/riffraff/job"
"github.com/mre/riffraff/internal/job"
)

type Build struct {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion commands/open.go → internal/commands/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package commands
import (
"log"

"github.com/mre/riffraff/job"
"github.com/mre/riffraff/internal/job"

"github.com/bndr/gojenkins"
"github.com/skratchdot/open-golang/open"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion commands/status.go → internal/commands/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/bndr/gojenkins"
"github.com/fatih/color"
"github.com/mre/riffraff/job"
"github.com/mre/riffraff/internal/job"
)

type Status struct {
Expand Down
File renamed without changes.

0 comments on commit cc09409

Please sign in to comment.