2014-01-25 19:24:31 +00:00
|
|
|
NAME=redash
|
2014-02-09 14:46:32 +00:00
|
|
|
VERSION=`python ./manage.py version`
|
|
|
|
FULL_VERSION=$(VERSION)+b$(CIRCLE_BUILD_NUM)
|
2015-04-06 06:38:01 +00:00
|
|
|
BASE_VERSION=$(shell python ./manage.py version | cut -d + -f 1)
|
2014-05-04 11:37:20 +00:00
|
|
|
# VERSION gets evaluated every time it's referenced, therefore we need to use VERSION here instead of FULL_VERSION.
|
|
|
|
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz
|
2014-01-25 19:24:31 +00:00
|
|
|
|
|
|
|
deps:
|
2016-01-07 12:54:36 +00:00
|
|
|
if [ -d "./rd_ui/app" ]; then cd rd_ui && npm install; fi
|
|
|
|
if [ -d "./rd_ui/app" ]; then cd rd_ui && npm run bower install; fi
|
|
|
|
if [ -d "./rd_ui/app" ]; then cd rd_ui && npm run build; fi
|
2014-01-25 19:24:31 +00:00
|
|
|
|
|
|
|
pack:
|
2014-05-04 11:02:20 +00:00
|
|
|
sed -ri "s/^__version__ = '([0-9.]*)'/__version__ = '$(FULL_VERSION)'/" redash/__init__.py
|
2015-07-22 14:56:49 +00:00
|
|
|
tar -zcv -f $(FILENAME) --exclude="optipng*" --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="rd_ui/node_modules" --exclude="rd_ui/dist/bower_components" --exclude="rd_ui/app" *
|
2014-01-26 14:30:16 +00:00
|
|
|
|
|
|
|
upload:
|
2015-04-06 06:38:01 +00:00
|
|
|
python bin/release_manager.py $(CIRCLE_SHA1) $(BASE_VERSION) $(FILENAME)
|
2014-01-31 17:59:01 +00:00
|
|
|
|
|
|
|
test:
|
2015-08-02 11:59:25 +00:00
|
|
|
nosetests --with-coverage --cover-package=redash tests/
|
2015-04-01 14:23:08 +00:00
|
|
|
#cd rd_ui && grunt test
|