mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-16 09:51:38 +02:00
Improved the selectiveness of the source file within the rule Stopped the bash script from reinstalling NPM depenancies - This was likely left in by mistake when there were NPM issues when this build step was first introduced Change-Id: I5364fc8818e37659cdcf11bd19750f0ba1b85a10
68 lines
1.9 KiB
Python
68 lines
1.9 KiB
Python
NODE_VERSION = '8.0.1'
|
|
|
|
COMPILE_DEPS = [
|
|
'//lib:CORE_DEPS',
|
|
'//lib:JACKSON',
|
|
'//lib:KRYO',
|
|
'//lib:javax.ws.rs-api',
|
|
'//lib:servlet-api',
|
|
'//lib:jetty-websocket',
|
|
'//lib:jetty-util',
|
|
'//lib:jersey-media-multipart',
|
|
'//lib:org.apache.karaf.shell.console',
|
|
'//cli:onos-cli',
|
|
'//lib:jersey-server',
|
|
'//incubator/api:onos-incubator-api',
|
|
'//incubator/net:onos-incubator-net',
|
|
'//utils/rest:onlab-rest',
|
|
'//core/store/serializers:onos-core-serializers',
|
|
':onos-tools-gui',
|
|
]
|
|
|
|
TEST_DEPS = [
|
|
'//lib:TEST',
|
|
'//core/api:onos-api-tests',
|
|
'//drivers/default:onos-drivers-default',
|
|
]
|
|
|
|
RESOURCES = {
|
|
'WEB-INF/classes/index.html': 'src/main/webapp/index.html',
|
|
'WEB-INF/classes/login.html': 'src/main/webapp/login.html',
|
|
'WEB-INF/classes/error.html': 'src/main/webapp/error.html',
|
|
'WEB-INF/classes/not-ready.html': 'src/main/webapp/not-ready.html',
|
|
'WEB-INF/classes/onos.js': 'src/main/webapp/onos.js',
|
|
'WEB-INF/classes/nav.html': 'src/main/webapp/nav.html',
|
|
'WEB-INF/classes/app/view': 'src/main/webapp/app/view',
|
|
'WEB-INF/classes/raw': 'src/main/webapp/raw',
|
|
}
|
|
|
|
include_defs('//bucklets/node.bucklet')
|
|
sh_src='onos-gui-build'
|
|
|
|
fetch_node(version = 'v8.1.2')
|
|
|
|
export_file (
|
|
name = 'onos-tools-gui-exe',
|
|
src = sh_src,
|
|
visibility = [ 'PUBLIC' ],
|
|
)
|
|
|
|
genrule(
|
|
name = 'onos-tools-gui',
|
|
srcs = glob(['src/main/webapp/*.js', 'src/main/webapp/app/**/*.js'], excludes = ['src/main/webapp/dist/*.js']),
|
|
bash = '$(location :onos-tools-gui-exe) '
|
|
+ '$(location //web/gui:node-release-v8.1.2) '
|
|
+ '$(location //web/gui:node-bin-v8.1.2) > $OUT',
|
|
out = 'onos-tools-gui.log',
|
|
visibility = [ 'PUBLIC' ],
|
|
)
|
|
|
|
osgi_jar_with_tests (
|
|
name = 'onos-gui',
|
|
deps = COMPILE_DEPS,
|
|
test_deps = TEST_DEPS,
|
|
include_resources = RESOURCES,
|
|
web_context = '/onos/ui',
|
|
do_javadocs = False,
|
|
)
|