Commit 1703d9a1 authored by mchazalviel's avatar mchazalviel

improve production script

parent 61ab5471
#!/bin/sh
# Go to MetExploreViz folder
cd /var/www/MetExploreViz/
# Build ExtJS
sudo /root/bin/Sencha/Cmd/6.1.3.42/sencha app build
if [ $# -ne 1 ] # s'il n'y a pas 1 paramètres
then
echo 'Parameter is required : \n\t1: sencha cmd path'
else
arg=$1
cd ../
# Build ExtJS
sudo $arg app build
cd ./scripts/
# Link to the file which contain metExploreViz version
appJS="/var/www/MetExploreViz/build/production/metExploreViz/app.json"
cd /var/www/scripts/
# Link to the file which contain metExploreViz version
appJS="/var/www/MetExploreViz/build/production/metExploreViz/app.json"
# Parse JSON to get version
sub='\["version"]'
lineversion=$(./JSON.sh -l < $appJS| egrep $sub)
version=${lineversion#$sub}
newversion=$(echo $version | sed s/\"//g)
echo $newversion
# Parse JSON to get version
sub='\["version"]'
lineversion=$(./JSON.sh -l < $appJS| egrep $sub)
version=${lineversion#$sub}
newversion=$(echo $version | sed s/\"//g)
echo $newversion
# ../licenses/compil\&licence.sh => add licenses
# ../build/production/metExploreViz/ => MetExploreViz production folder
sudo ../licenses/compil\&licence.sh ../build/production/metExploreViz/ $newversion
# ./licensesScriptMetExploreViz/compil\&licence.sh => add licenses
# ../MetExploreViz/build/production/metExploreViz/ => MetExploreViz production folder
sudo ./licenses/compil\&licence.sh ../MetExploreViz/build/production/metExploreViz/ $newversion
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment