-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace dep manager & fix dep issues, add makefile, improve docs
- Loading branch information
Showing
11 changed files
with
317 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ redalert | |
notes | ||
config.json | ||
*.rice-box.go | ||
Godeps/_workspace | ||
vendor | ||
*.exe |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
BINARY=redalert | ||
|
||
VERSION=0.2.1 | ||
BUILD=`git rev-parse HEAD` | ||
|
||
LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}" | ||
|
||
build: build-static | ||
go build ${LDFLAGS} -o ${BINARY} | ||
|
||
build-static: | ||
go get github.com/GeertJohan/go.rice | ||
go get github.com/GeertJohan/go.rice/rice | ||
cd web && rice embed-go && cd .. | ||
|
||
build-proto: | ||
protoc -I servicepb/ servicepb/service.proto --go_out=plugins=grpc:servicepb | ||
|
||
clean: | ||
if [ -f ${BINARY} ] ; then rm ${BINARY} ; fi | ||
|
||
test-deps: | ||
docker pull sickp/alpine-sshd | ||
docker pull postgres | ||
|
||
test: | ||
go test -v -race $(shell glide novendor) | ||
|
||
build-docker-image-local: build-static | ||
docker run --rm \ | ||
-v "$(shell pwd):/src" \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
centurylink/golang-builder \ | ||
jonog/redalert | ||
|
||
build-docker-image-remote: build-docker-image-local | ||
docker tag jonog/redalert jonog/redalert:v${VERSION} | ||
docker push jonog/redalert | ||
|
||
.PHONY: build-static build-proto clean test-deps test build-docker-image build-docker-image-remote |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package: github.com/jonog/redalert | ||
import: | ||
- package: github.com/GeertJohan/go.rice | ||
- package: github.com/docker/engine-api | ||
version: ^0.4.0 | ||
subpackages: | ||
- client | ||
- types | ||
- package: github.com/fatih/color | ||
version: ^1.4.1 | ||
- package: github.com/golang/protobuf | ||
subpackages: | ||
- proto | ||
- package: github.com/gorilla/mux | ||
version: ^1.3.0 | ||
- package: github.com/jmoiron/jsonq | ||
- package: github.com/lib/pq | ||
- package: github.com/olekukonko/tablewriter | ||
- package: github.com/rs/cors | ||
version: ^1.0.0 | ||
- package: github.com/spf13/cobra | ||
- package: golang.org/x/crypto | ||
subpackages: | ||
- ssh | ||
- ssh/agent | ||
- package: golang.org/x/net | ||
subpackages: | ||
- context | ||
- package: google.golang.org/grpc | ||
version: ^1.0.5 | ||
- package: gopkg.in/gorp.v1 | ||
testImport: | ||
- package: github.com/docker/go-connections | ||
subpackages: | ||
- nat | ||
- package: github.com/nu7hatch/gouuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
package main // import "github.com/jonog/redalert" | ||
|
||
import "github.com/jonog/redalert/cmd" | ||
import ( | ||
"github.com/jonog/redalert/cmd" | ||
"github.com/jonog/redalert/utils" | ||
) | ||
|
||
var ( | ||
Version string | ||
Build string | ||
) | ||
|
||
func main() { | ||
utils.RegisterVersionAndBuild(Version, Build) | ||
cmd.Execute() | ||
} |
Oops, something went wrong.