Skip to content

Commit

Permalink
moved all remaining files under designated structure
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed May 17, 2015
1 parent e3f0a39 commit 30eed87
Show file tree
Hide file tree
Showing 67 changed files with 975 additions and 30 deletions.
27 changes: 13 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,35 @@ VERSION := 0.4.0-alpha
all: concat bindata build

deps:
go get github.com/jteeuwen/go-bindata/...
go get -t -v ./...

test:
go vet ./...
go test -cover -short ./...

build:
mkdir -p bin
go build -o bin/drone -ldflags "-X main.revision $(SHA) -X main.version $(VERSION).$(SHA)"
go build -o bin/drone -ldflags "-X main.revision $(SHA) -X main.version $(VERSION).$(SHA)" github.com/drone/drone/cmd/drone-server

clean:
find . -name "*.out" -delete
rm -f drone
rm -f bindata.go

concat:
cat server/static/scripts/drone.js \
server/static/scripts/services/*.js \
server/static/scripts/filters/*.js \
server/static/scripts/controllers/*.js \
server/static/scripts/term.js > server/static/scripts/drone.min.js

bindata_deps:
go get github.com/jteeuwen/go-bindata/...
cat cmd/drone-server/static/scripts/drone.js \
cmd/drone-server/static/scripts/services/*.js \
cmd/drone-server/static/scripts/filters/*.js \
cmd/drone-server/static/scripts/controllers/*.js \
cmd/drone-server/static/scripts/term.js > cmd/drone-server/static/scripts/drone.min.js

# embeds all the static files directly
# into the drone binary file
bindata:
$$GOPATH/bin/go-bindata -o="cmd/drone-server/drone_bindata.go" cmd/drone-server/static/...

bindata_debug:
$$GOPATH/bin/go-bindata --debug server/static/...

bindata:
$$GOPATH/bin/go-bindata server/static/...
$$GOPATH/bin/go-bindata --debug -o="cmd/drone-server/drone_bindata.go" cmd/drone-server/static/...

# creates a debian package for drone
# to install `sudo dpkg -i drone.deb`
Expand Down
12 changes: 6 additions & 6 deletions drone.go → cmd/drone-server/drone.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (
"github.com/gin-gonic/gin"

"github.com/drone/drone/pkg/remote/github"
"github.com/drone/drone/server"
"github.com/drone/drone/server/session"
"github.com/drone/drone/settings"
"github.com/drone/drone/pkg/server"
"github.com/drone/drone/pkg/server/session"
"github.com/drone/drone/pkg/settings"
"github.com/elazarl/go-bindata-assetfs"

eventbus "github.com/drone/drone/pkg/bus/builtin"
queue "github.com/drone/drone/pkg/queue/builtin"
runner "github.com/drone/drone/pkg/runner/builtin"
store "github.com/drone/drone/pkg/store/builtin"
runner "github.com/drone/drone/runner/builtin"

_ "net/http/pprof"
)
Expand Down Expand Up @@ -175,14 +175,14 @@ func static() http.Handler {
return http.StripPrefix("/static/", http.FileServer(&assetfs.AssetFS{
Asset: Asset,
AssetDir: AssetDir,
Prefix: "server/static",
Prefix: "cmd/drone-server/static",
}))
}

// index is a helper function that will setup a template
// for rendering the main angular index.html file.
func index() *template.Template {
file := MustAsset("server/static/index.html")
file := MustAsset("cmd/drone-server/static/index.html")
filestr := string(file)
return template.Must(template.New("index.html").Parse(filestr))
}
Expand Down
938 changes: 938 additions & 0 deletions cmd/drone-server/drone_bindata.go

Large diffs are not rendered by default.

File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/install-docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install-docker.md
1 change: 1 addition & 0 deletions docs/install-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install-source.md
1 change: 1 addition & 0 deletions docs/install-ubuntu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
install.md
1 change: 1 addition & 0 deletions docs/setup-bitbucket.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setup-bitbucket.md
1 change: 1 addition & 0 deletions docs/setup-database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setup-database.md
1 change: 1 addition & 0 deletions docs/setup-github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.md
1 change: 1 addition & 0 deletions docs/setup-gitlab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setup-gitlab.md
1 change: 1 addition & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
setup.md
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/remote/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"net/rpc"

"github.com/drone/drone/pkg/settings"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/settings"
)

// Client communicates with a Remote plugin using the
Expand Down
2 changes: 1 addition & 1 deletion pkg/remote/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"time"

"github.com/drone/drone/pkg/settings"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/settings"
"github.com/hashicorp/golang-lru"

"github.com/google/go-github/github"
Expand Down
2 changes: 1 addition & 1 deletion pkg/remote/github/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/url"
"strings"

"github.com/drone/drone/common/oauth2"
"github.com/drone/drone/pkg/oauth2"
"github.com/google/go-github/github"
"github.com/gorilla/securecookie"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server/badge_test.go → pkg/server/badge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"testing"

"github.com/drone/drone/pkg/ccmenu"
"github.com/drone/drone/pkg/server/recorder"
"github.com/drone/drone/pkg/store/mock"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/server/recorder"

. "github.com/franela/goblin"
"github.com/gin-gonic/gin"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server/login.go → pkg/server/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ungerik/go-gravatar"

log "github.com/Sirupsen/logrus"
"github.com/drone/drone/common/oauth2"
"github.com/drone/drone/pkg/oauth2"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/pkg/utils/httputil"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions server/server.go → pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/drone/drone/pkg/bus"
"github.com/drone/drone/pkg/queue"
"github.com/drone/drone/pkg/remote"
"github.com/drone/drone/pkg/runner"
"github.com/drone/drone/pkg/server/session"
"github.com/drone/drone/pkg/settings"
"github.com/drone/drone/pkg/store"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/runner"
"github.com/drone/drone/server/session"
"github.com/drone/drone/settings"
)

func SetQueue(q queue.Queue) gin.HandlerFunc {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

"github.com/dgrijalva/jwt-go"
"github.com/drone/drone/pkg/settings"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/settings"
)

type Session interface {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion server/user_test.go → pkg/server/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"net/http"
"testing"

"github.com/drone/drone/pkg/server/recorder"
"github.com/drone/drone/pkg/store/mock"
common "github.com/drone/drone/pkg/types"
"github.com/drone/drone/server/recorder"
. "github.com/franela/goblin"
"github.com/gin-gonic/gin"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 30eed87

Please sign in to comment.