OM-234:CLONE - Add a zip to ProcessMaker with the files required to run cases in Mobile
fix mode
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,3 +36,4 @@ workflow/public_html/build-log.html
|
|||||||
temp.txt
|
temp.txt
|
||||||
update.sh
|
update.sh
|
||||||
workflow/public_html/translations/
|
workflow/public_html/translations/
|
||||||
|
build-prod.zip
|
||||||
|
|||||||
31
Rakefile
31
Rakefile
@@ -36,7 +36,6 @@ task :build => [:required] do
|
|||||||
puts "Seems it is not a ProcessMaker installation"
|
puts "Seems it is not a ProcessMaker installation"
|
||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if mode == "production"
|
if mode == "production"
|
||||||
targetDir = publicDir + "/lib"
|
targetDir = publicDir + "/lib"
|
||||||
pmUIFontsDir = targetDir + "/fonts"
|
pmUIFontsDir = targetDir + "/fonts"
|
||||||
@@ -55,9 +54,10 @@ task :build => [:required] do
|
|||||||
pmdynaformDir = targetDir + "/pmdynaform"
|
pmdynaformDir = targetDir + "/pmdynaform"
|
||||||
|
|
||||||
prepareDirs([targetDir, pmUIDir, mafeDir, pmdynaformDir, jsTargetDir, cssTargetDir, cssImagesTargetDir, imgTargetDir, pmUIFontsDir])
|
prepareDirs([targetDir, pmUIDir, mafeDir, pmdynaformDir, jsTargetDir, cssTargetDir, cssImagesTargetDir, imgTargetDir, pmUIFontsDir])
|
||||||
|
|
||||||
buildPmUi(Dir.pwd + "/vendor/colosa/pmUI", targetDir, mode)
|
buildPmUi(Dir.pwd + "/vendor/colosa/pmUI", targetDir, mode)
|
||||||
buildPmdynaform(Dir.pwd + "/vendor/colosa/pmDynaform", targetDir, mode)
|
buildPmdynaform(Dir.pwd + "/vendor/colosa/pmDynaform", targetDir, mode)
|
||||||
|
buildPmdynaformZip(Dir.pwd + "/vendor/colosa/pmDynaform", publicDir)
|
||||||
buildMafe(Dir.pwd + "/vendor/colosa/MichelangeloFE", targetDir, mode)
|
buildMafe(Dir.pwd + "/vendor/colosa/MichelangeloFE", targetDir, mode)
|
||||||
|
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ task :build => [:required] do
|
|||||||
pmdynaformHash = getHash(Dir.pwd + "/vendor/colosa/pmDynaform")
|
pmdynaformHash = getHash(Dir.pwd + "/vendor/colosa/pmDynaform")
|
||||||
|
|
||||||
hashVendors = pmuiHash+"-"+mafeHash
|
hashVendors = pmuiHash+"-"+mafeHash
|
||||||
## Building minified JS Files
|
## Building minified JS Files
|
||||||
puts "Building file: " + "/js/mafe-#{hashVendors}.js".cyan
|
puts "Building file: " + "/js/mafe-#{hashVendors}.js".cyan
|
||||||
mafeCompresedFile = targetDir + "/js/mafe-#{hashVendors}.js"
|
mafeCompresedFile = targetDir + "/js/mafe-#{hashVendors}.js"
|
||||||
mafeCompresedContent = ""
|
mafeCompresedContent = ""
|
||||||
@@ -168,18 +168,18 @@ end
|
|||||||
|
|
||||||
def buildPmdynaform(homeDir, targetDir, mode)
|
def buildPmdynaform(homeDir, targetDir, mode)
|
||||||
puts "\nBuilding PmDynaform library".green.bold
|
puts "\nBuilding PmDynaform library".green.bold
|
||||||
|
|
||||||
# Defining target directories
|
# Defining target directories
|
||||||
pmdynaformDir = targetDir + "/pmdynaform"
|
pmdynaformDir = targetDir + "/pmdynaform"
|
||||||
|
|
||||||
executeInto(homeDir, [ "default"])
|
executeInto(homeDir, [ "default"])
|
||||||
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
Dir.mkdir("#{pmdynaformDir}/build")
|
Dir.mkdir("#{pmdynaformDir}/build")
|
||||||
FileUtils.cp_r(Dir["#{homeDir}/build/*"],"#{pmdynaformDir}/build")
|
FileUtils.cp_r(Dir["#{homeDir}/build/*"],"#{pmdynaformDir}/build")
|
||||||
Dir.mkdir("#{pmdynaformDir}/libs")
|
Dir.mkdir("#{pmdynaformDir}/libs")
|
||||||
FileUtils.cp_r(Dir["#{homeDir}/libs/*"],"#{pmdynaformDir}/libs")
|
FileUtils.cp_r(Dir["#{homeDir}/libs/*"],"#{pmdynaformDir}/libs")
|
||||||
|
|
||||||
template = ""
|
template = ""
|
||||||
config = File.read "#{homeDir}/config/templates.json"
|
config = File.read "#{homeDir}/config/templates.json"
|
||||||
json = JSON.parse config
|
json = JSON.parse config
|
||||||
@@ -191,14 +191,14 @@ def buildPmdynaform(homeDir, targetDir, mode)
|
|||||||
end
|
end
|
||||||
template += s
|
template += s
|
||||||
end
|
end
|
||||||
|
|
||||||
htmlTemplates=["pmdynaform.html"]
|
htmlTemplates=["pmdynaform.html"]
|
||||||
htmlTemplates.each do |htmlTemplate|
|
htmlTemplates.each do |htmlTemplate|
|
||||||
|
|
||||||
FileUtils.cp("#{Dir.pwd}/workflow/engine/templates/cases/#{htmlTemplate}", "#{pmdynaformDir}/build/#{htmlTemplate}")
|
FileUtils.cp("#{Dir.pwd}/workflow/engine/templates/cases/#{htmlTemplate}", "#{pmdynaformDir}/build/#{htmlTemplate}")
|
||||||
|
|
||||||
target = "#{pmdynaformDir}/build/#{htmlTemplate}"
|
target = "#{pmdynaformDir}/build/#{htmlTemplate}"
|
||||||
html = File.read target
|
html = File.read target
|
||||||
while html['###TEMPLATES##'] do
|
while html['###TEMPLATES##'] do
|
||||||
html['###TEMPLATES###'] = template
|
html['###TEMPLATES###'] = template
|
||||||
end
|
end
|
||||||
@@ -206,10 +206,17 @@ def buildPmdynaform(homeDir, targetDir, mode)
|
|||||||
file.write html
|
file.write html
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "\nPmDynaform Build Finished!".magenta
|
puts "\nPmDynaform Build Finished!".magenta
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def buildPmdynaformZip(homeDir, targetDir)
|
||||||
|
puts "\nBuilding Compress Zip library".green.bold
|
||||||
|
executeInto(homeDir, [ "mobile"])
|
||||||
|
copyFiles({homeDir + "/build-prod-zip/build-prod.zip" => targetDir + "/build-prod.zip"})
|
||||||
|
puts "\nPmDynaform Zip Build Finished!".magenta
|
||||||
|
end
|
||||||
|
|
||||||
def buildMafe(homeDir, targetDir, mode)
|
def buildMafe(homeDir, targetDir, mode)
|
||||||
puts "\nBuilding PM Michelangelo FE".green.bold
|
puts "\nBuilding PM Michelangelo FE".green.bold
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user