Add sane dependencies to UI-related Makefile targets

This commit is contained in:
Joe Fiorini
2015-02-11 10:15:32 -05:00
parent c903e64ad5
commit f4dc7a1373

View File

@@ -70,8 +70,7 @@ MOCK_CFG ?=
develop refresh adduser syncdb migrate dbchange dbshell runserver celeryd \ develop refresh adduser syncdb migrate dbchange dbshell runserver celeryd \
receiver test test_coverage coverage_html ui_analysis_report test_ui test_jenkins dev_build \ receiver test test_coverage coverage_html ui_analysis_report test_ui test_jenkins dev_build \
release_build release_clean sdist rpmtar mock-rpm mock-srpm \ release_build release_clean sdist rpmtar mock-rpm mock-srpm \
deb deb-src debian reprepro setup_tarball \ deb deb-src debian reprepro setup_tarball sync_ui
node_modules package.json
# Remove setup build files # Remove setup build files
clean-tar: clean-tar:
@@ -251,11 +250,11 @@ test_coverage:
coverage_html: coverage_html:
coverage html coverage html
ui_analysis_report: node_modules ui_analysis_report: node_modules Gruntfile.js
$(GRUNT) plato:report $(GRUNT) plato:report
# Run UI unit tests # Run UI unit tests
test_ui: node_modules minjs_ci test_ui: node_modules minjs_ci Gruntfile.js
$(GRUNT) karma:ci $(GRUNT) karma:ci
# Run API unit tests across multiple Python/Django versions with Tox. # Run API unit tests across multiple Python/Django versions with Tox.
@@ -266,39 +265,41 @@ test_tox:
test_jenkins: test_jenkins:
$(PYTHON) manage.py jenkins -v2 --enable-coverage --project-apps-tests $(PYTHON) manage.py jenkins -v2 --enable-coverage --project-apps-tests
Gruntfile.js: Gruntfile.js: packaging/grunt/Gruntfile.js
cp packaging/grunt/$@ $@ cp $< $@
Brocfile.js: Brocfile.js: packaging/grunt/Brocfile.js
cp packaging/grunt/$@ $@ cp $< $@
bower.json: bower.json: packaging/grunt/bower.json
cp packaging/grunt/$@ $@ cp $< $@
package.json: package.json: packaging/grunt/package.template
sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' packaging/grunt/package.template > $@ sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' $< > $@
sync_ui: node_modules sync_ui: node_modules Brocfile.js
$(NODE) tools/ui/timepiece.js awx/ui/static/dist $(NODE) tools/ui/timepiece.js awx/ui/static/dist
# Update local npm install # Update local npm install
node_modules: Gruntfile.js Brocfile.js bower.json package.json node_modules: package.json
npm install npm install
touch $@
devjs: node_modules clean-ui devjs: node_modules clean-ui Brocfile.js bower.json Gruntfile.js
$(BROCCOLI) build awx/ui/static/dist -- --debug $(BROCCOLI) build awx/ui/static/dist -- --debug
# Build minified JS/CSS. # Build minified JS/CSS.
minjs: node_modules clean-ui minjs: node_modules clean-ui Brocfile.js
$(BROCCOLI) build awx/ui/static/dist -- --silent --no-debug --no-tests --compress $(BROCCOLI) build awx/ui/static/dist -- --silent --no-debug --no-tests --compress
minjs_ci: node_modules clean-ui minjs_ci: node_modules clean-ui Brocfile.js
$(BROCCOLI) build awx/ui/static/dist -- --no-debug --compress $(BROCCOLI) build awx/ui/static/dist -- --no-debug --compress
# Check .js files for errors and lint # Check .js files for errors and lint
jshint: node_modules jshint: node_modules Gruntfile.js
$(GRUNT) $@ $(GRUNT) $@
ngdocs: node_modules ngdocs: node_modules Gruntfile.js
$(GRUNT) $@ $(GRUNT) $@
# Build a pip-installable package into dist/ with a timestamped version number. # Build a pip-installable package into dist/ with a timestamped version number.