build/build.sh
author ymh <ymh.work@gmail.com>
Wed, 21 Dec 2016 15:23:00 +0100
changeset 483 b47da9606c10
parent 467 762fc0eb4946
child 541 e756a8c72c3d
permissions -rwxr-xr-x
remove double sroll control in i.e. and edge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
     1
#!/usr/bin/env bash -l
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
set -e
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
## option --prod/--dev
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
VAGRANT_STARTED=false
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
green="\x1B[0;32m" # '\e[1;32m' is too bright for white bg.
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
blue="\x1B[1;34m"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
endColor="\x1B[0m"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
function echoblue() {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    echo -e "${blue}$1${endColor}"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
}
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
function install() {
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    19
    pushd "$DIR" > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    echoblue "---> preparing bo client"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    22
    pushd ../server/bo_client > /dev/null
367
e0fb97c1e9c6 correct build script + rpm hook scripts
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    23
    /usr/local/bin/npm install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    ./node_modules/.bin/bower install
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    25
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    echoblue "---> preparing bo client done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    echoblue "---> preparing back"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    29
    pushd ../server/src > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    php composer.phar install
367
e0fb97c1e9c6 correct build script + rpm hook scripts
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    31
    /usr/local/bin/npm install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    ./node_modules/.bin/bower install
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    33
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
    echoblue "---> preparing back done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
    echoblue "---> preparing app-client"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    37
    pushd ../cms/app-client > /dev/null
367
e0fb97c1e9c6 correct build script + rpm hook scripts
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    38
    /usr/local/bin/npm install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    ./node_modules/.bin/bower install
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    40
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    echoblue "---> preparing app-client done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    echoblue "---> preparing module"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    44
    pushd ../cms > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
    npm install
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
    46
    popd > /dev/null
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
    47
    echoblue "---> preparing module done"
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
    echoblue "---> checking vagrant"
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
    51
    if vagrant status | grep -q -v "running"; then
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
        echoblue "---> starting vagrant"
390
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    53
        # if which virtualenvwrapper.sh > /dev/null 2>&1 ; then
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    54
        #     echoblue "---> activating ansible"
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    55
        #     source `which virtualenvwrapper.sh`
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    56
        #     workon ansible
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    57
        # fi
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
        vagrant up
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
        VAGRANT_STARTED=true
390
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    60
        # if type -t deactivate > /dev/null 2>&1 ; then
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    61
        #     deactivate
f4fed295115b put virtualenv activation during build in comment. That means that for the moment the build machine must be provisionned beforehand, or ansible must be available globally
ymh <ymh.work@gmail.com>
parents: 389
diff changeset
    62
        # fi
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
    fi
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
    echoblue "---> done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
    67
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
389
2204faa0b41a Correct problem in spaqrl client in php 56 + add line numbering in result table
ymh <ymh.work@gmail.com>
parents: 388
diff changeset
    69
    return 0
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
}
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
function usage() {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
    cat <<EOF
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
Usage: $0 [-I] [-p|-d] [-h]
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
    -I : do not run install
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
    -h : print this message
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
    -p : build for production
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
    -d : build for development
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
EOF
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
}
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
environment=""
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
do_install=true
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
while getopts "Ihpd" opt; do
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
  case $opt in
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
    I) do_install=false ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
    h) usage; exit 0 ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
    p) [[ -n "$environment" ]] && { usage >&2; exit 1; } || environment='production' ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
    d) [[ -n "$environment" ]] && { usage >&2; exit 1; } || environment='development' ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
    \?) usage >&2; exit 1 ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
  esac
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
done
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
shift $((OPTIND-1))
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
[[ -z "$environment" ]] && environment='production'
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
case $environment in
386
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   100
    development)
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   101
        build_option='--dev'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   102
        build_option_back='--development'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   103
        ;;
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   104
    *)
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   105
        build_option='--prod'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   106
        build_option_back='--production'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   107
        ;;
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
esac
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
echo "environment: $environment"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
echo "do_install: $do_install"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
[[ "$do_install" == true ]] && echoblue "DO INSTALL" && install;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   114
pushd "$DIR" > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
echoblue "---> cleaning build folder"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
rm -fr root
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
echoblue "---> creating build folder"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
mkdir -p root/var/www/corpusdelaparole/corpus-back
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
mkdir -p root/var/www/corpusdelaparole/drupal/sites/all/modules
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   123
echoblue "---> building back"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   124
pushd ../server/src > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
version=$(sed -n "s/[[:space:]]*\'version\'[[:space:]]*=>[[:space:]]*\'\([\.0-9]*\)\'/\1/p" config/version.php)
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
version=${version:-0.0.0}
437
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   127
npm install
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   128
./node_modules/.bin/bower install
386
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   129
./node_modules/.bin/gulp copy-build ${build_option_back}
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   130
popd > /dev/null
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   131
echoblue "---> building back done"
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
echoblue "---> building app-client"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   134
pushd ../cms/app-client > /dev/null
437
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   135
npm install
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   136
./node_modules/.bin/bower install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
./node_modules/.bin/ember build ${build_option}
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   138
popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
echoblue "---> building app-client done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
echoblue "---> building module"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   142
pushd ../cms > /dev/null
437
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   143
npm install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
./node_modules/.bin/gulp copy-build ${build_option} --version="$version"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   145
popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
echoblue "---> building package"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
vagrant ssh -c "/vagrant/build_rpm.sh"
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   149
echoblue "---> building package done"
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   150
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   151
if [ "$VAGRANT_STARTED" = true ]; then
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   152
    echoblue "---> Stopping vagrant"
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   153
    vagrant halt
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   154
    echoblue "---> Stopping vagrant done"
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   155
fi
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   156
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   157
popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   159
echoblue "--> archiving dist"
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   160
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   161
pushd "$DIR/dist" > /dev/null
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   162
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   163
if [ -f bootstrap-puppet.sh -a -f corpusdelaparole-$version-*.noarch.rpm -a -f installDrupal.sh -a -f puppet-corpusdelaparole-$version-*.noarch.rpm ]; then
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   164
    rm -f corpusdelaparole-back_*_*.tar.gz
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   165
    ARCHIVE_NAME="corpusdelaparole-back_$(date +%Y-%m-%d)_${version}"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   166
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   167
    mkdir "$ARCHIVE_NAME"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   168
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   169
    cp bootstrap-puppet.sh corpusdelaparole-$version-*.noarch.rpm installDrupal.sh puppet-corpusdelaparole-$version-*.noarch.rpm "$ARCHIVE_NAME"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   170
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   171
    tar zcvf "${ARCHIVE_NAME}.tar.gz" "$ARCHIVE_NAME"
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   172
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   173
    rm -fr "$ARCHIVE_NAME"
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   174
fi
467
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   175
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   176
popd > /dev/null
762fc0eb4946 Migrate d3js to v4 and correct d3js visualisations i.e. bug 3.20. Breadcrumb navigation for the language treemap has been improved
ymh <ymh.work@gmail.com>
parents: 437
diff changeset
   177
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
echoblue "---> done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179