#!/usr/bin/make -f


VERSION=$(shell parsechangelog | grep "Version:" | head -n 1 | cut -b 10-)
COMMENT=$(shell parsechangelog | grep "  \*" | cut -b 4-)
MAINTAINER=$(shell parsechangelog | grep 'Maintainer' | sed 's/.*<\(.*\)>/\1/')

dupload:
	ls -t ../yandex-mobile-android-apps-updater_*.changes | head -1 | xargs dupload --to=yandex-mobile-trusty --nomail || exit

test:
	./manage.py test updater.tests --settings=updater.tests.settings

clean:
	find ./ -name *.pyc -delete
	debuild clean

deploy:
	conductor-ticket --comment "$(COMMENT)" --cc $(MAINTAINER) yandex-mobile-android-apps-updater=$(VERSION)
