forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ed Rooth
committed
Jul 24, 2014
1 parent
355fcc0
commit c88a212
Showing
8 changed files
with
107 additions
and
29 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
frontend/node_modules | ||
frontend/public/img | ||
frontend/public/lib |
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,23 +1,4 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
|
||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
/bin | ||
/Godeps/_workspace/github.com/coreos-inc/bridge | ||
/frontend/public/bower_components | ||
/frontend/public/dist |
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,4 +1,35 @@ | ||
bridge | ||
====== | ||
|
||
control center for clusters and fleets | ||
|
||
|
||
## Standard Build | ||
1. Build the backend `./build` | ||
1. Build the frontend `./build-web` | ||
|
||
Backend binaries are generated in `/bin`. | ||
Frontend build assets are generated in `/frontend/public/dist`. | ||
|
||
### Dependencies | ||
- go | ||
- nodejs (for frontend builds) | ||
|
||
|
||
## Hacking | ||
|
||
Add new frontend dependencies: | ||
- from `frontend` run `gulp deps` | ||
|
||
Add new backend dependencies: | ||
- run `godep save -r ./...` | ||
|
||
If changes are made to the `schema/v1.json` file you must: | ||
1. Rebuild the bindings by running: `schema/generator` | ||
1. Rewrite go dependencies: `godep save -r ./...` | ||
|
||
Update existing backend dependencies: | ||
1. `go get -u foo/bar` as usual | ||
1. `godep update foo/bar` | ||
|
||
### Dependencies | ||
- nodejs glup |
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,14 @@ | ||
#!/bin/sh -e | ||
|
||
PROJECT_DIR=$(basename $PWD) | ||
export GOPATH=${PWD}/Godeps/_workspace | ||
export GOBIN=${PWD}/bin | ||
|
||
if [ ! -h $GOPATH/src/github.com/coreos-inc/$PROJECT_DIR ]; then | ||
mkdir -p $GOPATH/src/github.com/coreos-inc/ | ||
ln -s ${PWD} $GOPATH/src/github.com/coreos-inc/$PROJECT_DIR | ||
fi | ||
|
||
eval $(go env) | ||
|
||
go install github.com/coreos-inc/$PROJECT_DIR/server |
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,4 @@ | ||
#!/bin/sh -e | ||
|
||
# build frontend | ||
cd frontend && ./node_modules/.bin/gulp |
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,50 @@ | ||
#!/bin/bash -e | ||
# | ||
# Run all tests (not including functional) | ||
# ./test | ||
# ./test -v | ||
# | ||
# Run tests for one package | ||
# PKG=./unit ./test | ||
# PKG=ssh ./test | ||
# | ||
|
||
# Invoke ./cover for HTML output | ||
COVER=${COVER:-"-cover"} | ||
|
||
source ./build | ||
|
||
TESTABLE="api server" | ||
FORMATTABLE="$TESTABLE version" | ||
|
||
# user has not provided PKG override | ||
if [ -z "$PKG" ]; then | ||
TEST=$TESTABLE | ||
FMT=$FORMATTABLE | ||
|
||
# user has provided PKG override | ||
else | ||
# strip out slashes and dots from PKG=./foo/ | ||
TEST=${PKG//\//} | ||
TEST=${TEST//./} | ||
|
||
# only run gofmt on packages provided by user | ||
FMT="$TEST" | ||
fi | ||
|
||
# split TEST into an array and prepend repo path to each local package | ||
split=(${TEST// / }) | ||
TEST=${split[@]/#/github.com/coreos-inc/bridge/} | ||
|
||
echo "Running tests..." | ||
go test -i ${TEST} | ||
go test ${COVER} $@ ${TEST} | ||
|
||
echo "Checking gofmt..." | ||
fmtRes=$(gofmt -l $FMT) | ||
if [ -n "${fmtRes}" ]; then | ||
echo -e "gofmt checking failed:\n${fmtRes}" | ||
exit 255 | ||
fi | ||
|
||
echo "Success" |