1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

bug #3853: Add sunstone option to scons to compile css and js

This commit is contained in:
Daniel Molina 2015-07-17 15:49:09 +02:00
parent a5eb40f751
commit c34113de07
2 changed files with 37 additions and 0 deletions

View File

@ -155,6 +155,9 @@ else:
# Rubygem generation # Rubygem generation
main_env.Append(rubygems=ARGUMENTS.get('rubygems', 'no')) main_env.Append(rubygems=ARGUMENTS.get('rubygems', 'no'))
# Sunstone minified files generation
main_env.Append(sunstone=ARGUMENTS.get('sunstone', 'no'))
if not main_env.GetOption('clean'): if not main_env.GetOption('clean'):
try: try:
if mysql=='yes': if mysql=='yes':
@ -243,6 +246,7 @@ build_scripts=[
'src/vdc/SConstruct', 'src/vdc/SConstruct',
'share/man/SConstruct', 'share/man/SConstruct',
'src/sunstone/public/locale/languages/SConstruct', 'src/sunstone/public/locale/languages/SConstruct',
'src/sunstone/public/SConstruct',
'share/rubygems/SConstruct', 'share/rubygems/SConstruct',
'src/im_mad/collectd/SConstruct', 'src/im_mad/collectd/SConstruct',
'src/client/SConstruct' 'src/client/SConstruct'

View File

@ -0,0 +1,33 @@
# SConstruct for share/man
# -------------------------------------------------------------------------- #
# Copyright 2002-2014, OpenNebula Project (OpenNebula.org), C12G Labs #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
import os
Import('env')
if env['sunstone']=='yes':
print "Generating Sunstone minified files\n"
exit_code=os.system("grunt --gruntfile ./Gruntfile.js sass")
if exit_code != 0:
print "Error generating Sunstone css files\n"
exit(-1)
exit_code=os.system("grunt --gruntfile ./Gruntfile.js requirejs")
if exit_code != 0:
print "Error generating minifying Susntone files\n"
exit(-1)