Skip to content

Commit

Permalink
update directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
spinlock committed Nov 7, 2014
1 parent aa910ff commit 7879c08
Show file tree
Hide file tree
Showing 101 changed files with 185 additions and 1,627 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
*.rdb
nohup.out
martini_log
/bin/proxy
/bin/cconfig
/bin
/Dockerfile
/deploy.tar
39 changes: 23 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
.PHONY: all build test clean
all: build
@tar -cf deploy.tar bin sample

all: clean build test
build: build-proxy build-config build-server

clean:
rm -rf bin/cconfig
rm -f *.rdb
rm -f bin/*.log
rm -f *.out
rm -f bin/*.out
rm -f *.dump
build-proxy:
go build -o bin/codis-proxy ./cmd/proxy

test:
go test ./... -race
build-config:
go build -o bin/codis-config ./cmd/cconfig
@rm -rf bin/assets && cp -r cmd/cconfig/assets bin/

build-server:
@mkdir -p bin
make -j4 -C ext/redis-2.8.13/
@cp -f ext/redis-2.8.13/src/redis-server bin/codis-server

clean:
@rm -rf bin
@rm -f *.rdb *.out *.log *.dump deploy.tar
@rm -f Dockerfile ext/Dockerfile
@if [ -d test ]; then cd test && rm -f *.out *.log *.rdb; fi

distclean: clean
@make --no-print-directory --quiet -C ext/redis-2.8.13 clean

build:
go build -a -o bin/cconfig ./cmd/cconfig
go build -a -o bin/proxy ./cmd/proxy
rm -rf bin/assets
cp -r ./cmd/cconfig/assets ./bin/
gotest:
go test ./... -race
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ Codis is production-ready and is widely used by Wandoujia.com.
* go get github.com/wandoulabs/codis
* cd codis
* ./bootstrap.sh
* make test
* cd deploy/sample_service
* cd sample
* follow instructions in usage.md

## Tutorial
Expand Down
1 change: 0 additions & 1 deletion bin/README.md

This file was deleted.

Loading

0 comments on commit 7879c08

Please sign in to comment.