-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (53 loc) · 2.39 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Makefile for django Organice themes
#
# variables
SHELL = /bin/bash
.PHONY: help assets bootstrap bumpver clean release setuptools
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " assets to build all static assets (combined/minified CSS, JavaScript, etc.)"
@echo " bootstrap to update Sass, Compass, UglifyJS, and bootstrap-sass on your (Ubuntu) system"
@echo " bumpver to bump the version number, commit and tag for releasing"
@echo " clean to remove build files and folders"
@echo " install to install this project including its dependencies"
@echo " uninstall to uninstall this package using pip"
@echo " release to package a new release, and upload it to pypi.org"
@echo " setuptools to install setuptools or repair a broken pip installation"
assets: #bootstrap
@echo "Building assets..."
cd */static && compass clean && compass compile
cd */static/js && \
BOOTSTRAP_JS_DIR=$(shell find $(shell gem environment gemdir)/gems/ \
-name bootstrap-sass-*)/vendor/assets/javascripts/bootstrap/ && \
uglifyjs -o scripts.js \
{jquery,jquery-ui,profile}.js \
../todo/js/jquery.tablednd_0_5.js \
$$BOOTSTRAP_JS_DIR/{affix,alert,carousel,dropdown,scrollspy}.js
bootstrap:
@echo "Updating your system-wide bootstrap-sass installation... (may require your password)"
gem list &> /dev/null || sudo apt-get install -y ruby
yes | sudo gem uninstall sass sass-css-importer compass bootstrap-sass
sudo gem install compass bootstrap-sass --no-rdoc --no-ri
sudo gem install --pre sass-css-importer --no-rdoc --no-ri
@gem list
@echo
@echo "Updating uglify-js v2 for Bootstrap JavaScript minification... (may require your password)"
npm list &> /dev/null || sudo apt-get install -y npm
sudo npm uninstall -g uglify-js
sudo npm install -g uglify-js
bumpver:
@echo "Not implemented yet. Install pypi package instead: \`pip install bumpversion'"
clean:
rm -rf build/ dist/ *.egg-info/ */static/.sass-cache
install: setuptools
python setup.py install
uninstall:
@PKG_NAME=$${PWD##*/} && pip freeze | sed 's/==.*$$//' | grep $$PKG_NAME &> /dev/null \
&& pip uninstall -y $$PKG_NAME \
|| echo "Package $$PKG_NAME not installed."
release: setuptools clean
python setup.py sdist upload
setuptools:
python -c 'import setuptools' || \
curl -s -S https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python
rm -f setuptools-*.zip