Skip to content

Commit

Permalink
simplify client publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
scivey committed Nov 30, 2015
1 parent 283be08 commit 9c6c8ee
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 62 deletions.
46 changes: 20 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
clean:
rm -f src/*.o

thrift:
python -m thrift_compiler.main --gen cpp2 -o src src/RelevancedProtocol.thrift

Expand Down Expand Up @@ -28,7 +25,7 @@ thrift-java:
thrift-0.9 --gen java -o build/thrift src/RelevancedProtocol.thrift
mv ./build/thrift/gen-java/org/relevanced/client/protocol ./clients/java/client/src/main/java/org/relevanced/client/

thrift-all: thrift thrift-py thrift-node thrift-java
thrift-all: thrift thrift-py thrift-node thrift-java thrift-rb

build-docker-standalone:
rm -f scripts/packaging/containers/standalone_server/data/*
Expand Down Expand Up @@ -131,34 +128,31 @@ deb-package-remote:
docker-sh:
sudo docker run --rm -t -i relevanced/relevanced /bin/bash

smoketest-node:
node ./clients/nodejs/client/test/functionalSmoketest.js

smoketest-java:
cd ./clients/java/client && sbt run

publish-node:
cd ./clients/nodejs/client/ && npm publish

publish-python:
cd ./clients/python/client && python setup.py register -r pypi && python setup.py sdist upload -r pypi

publish-ruby:
rm -f ./clients/ruby/client/*.gem
cd ./clients/ruby/client && gem build relevanced_client.gemspec
mv ./clients/ruby/client/*.gem ./clients/ruby/client/relevanced_client.gem
gem push ./clients/ruby/client/relevanced_client.gem

publish-jvm:
cd ./clients/java/client && sbt publishSigned

publish-clients: publish-node publish-python publish-ruby publish-jvm

.PHONY: publish-node publish-python publish-ruby publish-jvm publish-clients

format-all:
find src \( -name "*.h" -o -name "*.cpp" -o -name "*.mm" \) -exec clang-format -i {} +

deps:
cd external/libstemmer && make libstemmer.o -j4

TEST_DATA_DIR=$(WORKDIR)/build/test_data

run-server:
mkdir -p $(TEST_DATA_DIR) && rm -rf $(TEST_DATA_DIR)/*
cd build/bin && cmake ../../ && make relevanced -j4
cd build/bin && ./src/relevanced --data_dir=$(TEST_DATA_DIR)

test-clients:
$(MAKE) -C clients/python test
$(MAKE) -C clients/nodejs test
$(MAKE) -C clients/ruby test

publish-clients: test-clients
$(MAKE) -C clients/python publish
$(MAKE) -C clients/nodejs publish
$(MAKE) -C clients/ruby publish
$(MAKE) -C clients/java publish

.PHONY: test-clients publish-clients
4 changes: 4 additions & 0 deletions clients/java/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
publish:
cd client && sbt publishSigned

.PHONY: publish
7 changes: 7 additions & 0 deletions clients/nodejs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONY: test publish

test:
cd client && mocha test

publish:
cd client && npm publish
34 changes: 0 additions & 34 deletions clients/nodejs/client/test/functionalSmoketest.js

This file was deleted.

10 changes: 8 additions & 2 deletions clients/python/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
lint:
pyflakes client/relevanced_client/client.py client/relevanced_client/exceptions.py
pyflakes client/relevanced_client/client.py

.PHONY: lint
test:
cd client && nosetests relevanced_client/test

publish:
cd client && python setup.py register -r pypi && python setup.py sdist upload -r pypi

.PHONY: lint test publish
11 changes: 11 additions & 0 deletions clients/ruby/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: test publish

test:
cd client && rspec

publish:
cd client && npm publish
rm -f client/*.gem
cd client && gem build relevanced_client.gemspec
mv client/*.gem client/relevanced_client.gem
gem push client/relevanced_client.gem

0 comments on commit 9c6c8ee

Please sign in to comment.