<commit_before>all:	updatecode updatedb

updatecode:
ifneq "$(wildcard .svn )" ""
	rm -rf dbupgrade oauth-php admin/swfobject modules/facebook/php-sdk
	svn update

	mkdir dbupgrade/
	svn export http://svn.github.com/sergeychernyshev/DBUpgrade.git _dbupgrade
	mv _dbupgrade/* dbupgrade/
	rm -rf _dbupgrade

	mkdir oauth-php
	svn export http://svn.github.com/sergeychernyshev/oauth-php.git _oauth-php
	mv _oauth-php/* oauth-php
	rm -rf _oauth-php

	mkdir admin/swfobject
	svn export http://svn.github.com/swfobject/swfobject.git _swfobject
	mv _swfobject/* admin/swfobject
	rm -rf _swfobject

	rm -rf _php-sdk
	mkdir modules/facebook/php-sdk
	git clone git://github.com/facebook/php-sdk.git _php-sdk
	( cd _php-sdk; git archive v2.1.2 | tar -x -C ../modules/facebook/php-sdk )
	rm -rf _php-sdk
endif
ifneq "$(wildcard .git )" ""
	git pull origin master
	git submodule init
	git submodule update
endif

updatedb:
	php dbupgrade.php
	php aggregatepoints.php

rel:	release
release: releasetag packages

releasetag:
ifndef v
	# Must specify version as 'v' param<commit_msg>Facebook module was updated to use latest version, do let's do so.<commit_after>all:	updatecode updatedb

updatecode:
ifneq "$(wildcard .svn )" ""
	rm -rf dbupgrade oauth-php admin/swfobject modules/facebook/php-sdk
	svn update

	mkdir dbupgrade/
	svn export http://svn.github.com/sergeychernyshev/DBUpgrade.git _dbupgrade
	mv _dbupgrade/* dbupgrade/
	rm -rf _dbupgrade

	mkdir oauth-php
	svn export http://svn.github.com/sergeychernyshev/oauth-php.git _oauth-php
	mv _oauth-php/* oauth-php
	rm -rf _oauth-php

	mkdir admin/swfobject
	svn export http://svn.github.com/swfobject/swfobject.git _swfobject
	mv _swfobject/* admin/swfobject
	rm -rf _swfobject

	rm -rf _php-sdk
	mkdir modules/facebook/php-sdk
	git clone git://github.com/facebook/php-sdk.git _php-sdk
	( cd _php-sdk; git archive HEAD | tar -x -C ../modules/facebook/php-sdk )
	rm -rf _php-sdk
endif
ifneq "$(wildcard .git )" ""
	git pull origin master
	git submodule init
	git submodule update
endif

updatedb:
	php dbupgrade.php
	php aggregatepoints.php

rel:	release
release: releasetag packages

releasetag:
ifndef v
	# Must specify version as 'v' param
{'fraction_non_alphanumeric': 0.1011441647597254, 'fraction_numerical': 0.0013729977116704805, 'mean_word_length': 3.868596881959911, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '149517', 'n_tokens_mistral': 854, 'n_tokens_neox': 800, 'n_words': 222}