mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 20:37:39 -02:30
Clean up UI-related make tasks
This commit is contained in:
60
Makefile
60
Makefile
@@ -290,17 +290,6 @@ test_coverage:
|
|||||||
coverage_html:
|
coverage_html:
|
||||||
coverage html
|
coverage html
|
||||||
|
|
||||||
ui_analysis_report: reports/ui_code node_modules Gruntfile.js
|
|
||||||
$(GRUNT) plato:report
|
|
||||||
|
|
||||||
reports/ui_code: node_modules clean-ui Brocfile.js bower.json Gruntfile.js
|
|
||||||
rm -rf reports/ui_code
|
|
||||||
$(BROCCOLI_BIN) build reports/ui_code -- --no-concat --no-debug --no-styles --no-sourcemaps
|
|
||||||
|
|
||||||
# Run UI unit tests
|
|
||||||
test_ui: node_modules minjs_ci
|
|
||||||
PATH=./node_modules/.bin:$(PATH) $(TESTEM) ci --file testem.yml -p 7359 -R xunit
|
|
||||||
|
|
||||||
# Run API unit tests across multiple Python/Django versions with Tox.
|
# Run API unit tests across multiple Python/Django versions with Tox.
|
||||||
test_tox:
|
test_tox:
|
||||||
tox -v
|
tox -v
|
||||||
@@ -309,6 +298,9 @@ 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
|
||||||
|
|
||||||
|
# UI TASKS
|
||||||
|
# --------------------------------------
|
||||||
|
|
||||||
Gruntfile.js: packaging/node/Gruntfile.js
|
Gruntfile.js: packaging/node/Gruntfile.js
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
@@ -321,9 +313,6 @@ bower.json: packaging/node/bower.json
|
|||||||
package.json: packaging/node/package.template
|
package.json: packaging/node/package.template
|
||||||
sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' $< > $@
|
sed -e 's#%NAME%#$(NAME)#;s#%VERSION%#$(VERSION)#;s#%GIT_REMOTE_URL%#$(GIT_REMOTE_URL)#;' $< > $@
|
||||||
|
|
||||||
sync_ui: node_modules Brocfile.js
|
|
||||||
$(NODE) tools/ui/timepiece.js awx/ui/static $(WATCHER_FLAGS) -- $(UI_FLAGS)
|
|
||||||
|
|
||||||
# Update local npm install
|
# Update local npm install
|
||||||
node_modules: package.json
|
node_modules: package.json
|
||||||
npm install
|
npm install
|
||||||
@@ -332,28 +321,53 @@ node_modules: package.json
|
|||||||
awx/ui/%: node_modules clean-ui Brocfile.js bower.json
|
awx/ui/%: node_modules clean-ui Brocfile.js bower.json
|
||||||
$(BROCCOLI_BIN) build $@ -- $(UI_FLAGS)
|
$(BROCCOLI_BIN) build $@ -- $(UI_FLAGS)
|
||||||
|
|
||||||
testjs: UI_FLAGS=--node-tests --no-concat --no-styles $(EXTRA_UI_FLAGS)
|
# Concatenated, non-minified build; contains debug code and sourcemaps; does not include any tests
|
||||||
testjs: awx/ui/build_test node-tests
|
|
||||||
|
|
||||||
node-tests:
|
|
||||||
NODE_PATH=awx/ui/build_test $(MOCHA_BIN) --full-trace $(shell find awx/ui/build_test -name '*-test.js')
|
|
||||||
|
|
||||||
devjs: awx/ui/static
|
devjs: awx/ui/static
|
||||||
|
|
||||||
# Build minified JS/CSS.
|
# Concatenated, minified, compressed (production) build with no sourcemaps or tests
|
||||||
minjs: UI_FLAGS=--silent --compress --no-docs --no-debug --no-sourcemaps $(EXTRA_UI_FLAGS)
|
minjs: UI_FLAGS=--silent --compress --no-docs --no-debug --no-sourcemaps $(EXTRA_UI_FLAGS)
|
||||||
minjs: awx/ui/static node_modules clean-ui Brocfile.js
|
minjs: awx/ui/static node_modules clean-ui Brocfile.js
|
||||||
|
|
||||||
minjs_ci: UI_FLAGS=--compress --no-docs --no-debug --browser-tests $(EXTRA_UI_FLAGS)
|
# Performs build to awx/ui/build_test and runs node tests via mocha
|
||||||
minjs_ci: awx/ui/static node_modules clean-ui Brocfile.js
|
testjs: UI_FLAGS=--node-tests --no-concat --no-styles $(EXTRA_UI_FLAGS)
|
||||||
|
testjs: awx/ui/build_test node-tests
|
||||||
|
|
||||||
|
# Performs minified, compressed build to awx/ui/static and runs browsers tests with testem ci
|
||||||
|
testjs_ci: UI_FLAGS=--compress --no-docs --no-debug --browser-tests $(EXTRA_UI_FLAGS)
|
||||||
|
testjs_ci: awx/ui/static browser-tests
|
||||||
|
|
||||||
|
# Runs node tests via mocha without building
|
||||||
|
node-tests:
|
||||||
|
NODE_PATH=awx/ui/build_test $(MOCHA_BIN) --full-trace $(shell find awx/ui/build_test -name '*-test.js')
|
||||||
|
|
||||||
|
# Runs browser tests using settings from `testem.yml`
|
||||||
|
browser-tests:
|
||||||
|
PATH=./node_modules/.bin:$(PATH) $(TESTEM) ci --file testem.yml -p 7359 -R xunit
|
||||||
|
|
||||||
# Check .js files for errors and lint
|
# Check .js files for errors and lint
|
||||||
jshint: node_modules Gruntfile.js
|
jshint: node_modules Gruntfile.js
|
||||||
$(GRUNT) $@
|
$(GRUNT) $@
|
||||||
|
|
||||||
|
# Generate UI code documentation
|
||||||
ngdocs: devjs Gruntfile.js
|
ngdocs: devjs Gruntfile.js
|
||||||
$(GRUNT) $@
|
$(GRUNT) $@
|
||||||
|
|
||||||
|
# Launch watcher for build process
|
||||||
|
sync_ui: node_modules Brocfile.js
|
||||||
|
$(NODE) tools/ui/timepiece.js awx/ui/static $(WATCHER_FLAGS) -- $(UI_FLAGS)
|
||||||
|
|
||||||
|
# Build code complexity report for UI code
|
||||||
|
ui_analysis_report: reports/ui_code node_modules Gruntfile.js
|
||||||
|
$(GRUNT) plato:report
|
||||||
|
|
||||||
|
# Non-concatenated, non-minified build with no tests, no debug code, no sourcemaps for plato reports
|
||||||
|
reports/ui_code: node_modules clean-ui Brocfile.js bower.json Gruntfile.js
|
||||||
|
rm -rf reports/ui_code
|
||||||
|
$(BROCCOLI_BIN) build reports/ui_code -- --no-concat --no-debug --no-styles --no-sourcemaps
|
||||||
|
|
||||||
|
# END UI TASKS
|
||||||
|
# --------------------------------------
|
||||||
|
|
||||||
# Build a pip-installable package into dist/ with a timestamped version number.
|
# Build a pip-installable package into dist/ with a timestamped version number.
|
||||||
dev_build:
|
dev_build:
|
||||||
$(PYTHON) setup.py dev_build
|
$(PYTHON) setup.py dev_build
|
||||||
|
|||||||
Reference in New Issue
Block a user