build/build.sh
author ymh <ymh.work@gmail.com>
Wed, 13 Sep 2017 22:19:48 +0200
changeset 544 ad58d7627f70
parent 541 e756a8c72c3d
permissions -rwxr-xr-x
use same http client in ImportCocoonRDF and define version 0.22
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
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
    23
    rm -fr node_modules bower_components
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
    24
    yarn install --ignore-engines
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    ./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
    26
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    echoblue "---> preparing bo client done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    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
    30
    pushd ../server/src > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    php composer.phar install
367
e0fb97c1e9c6 correct build script + rpm hook scripts
ymh <ymh.work@gmail.com>
parents: 346
diff changeset
    32
    /usr/local/bin/npm install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    ./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
    34
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    echoblue "---> preparing back done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    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
    38
    pushd ../cms/app-client > /dev/null
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
    39
    rm -fr node_modules bower_components
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
    40
    yarn install --ignore-engines
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    ./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
    42
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    echoblue "---> preparing app-client done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
    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
    46
    pushd ../cms > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
    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
    48
    popd > /dev/null
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
    49
    echoblue "---> preparing module done"
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
    echoblue "---> checking vagrant"
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
    53
    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
    54
        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
    55
        # 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
    56
        #     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
    57
        #     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
    58
        #     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
    59
        # fi
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
        vagrant up
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
        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
    62
        # 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
    63
        #     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
    64
        # fi
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
    fi
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
    echoblue "---> done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
    69
    popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
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
    71
    return 0
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
}
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
function usage() {
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
    cat <<EOF
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
Usage: $0 [-I] [-p|-d] [-h]
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
    -I : do not run install
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
    -h : print this message
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
    -p : build for production
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
    -d : build for development
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
EOF
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
}
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
environment=""
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
do_install=true
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
while getopts "Ihpd" opt; do
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
  case $opt in
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
    I) do_install=false ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
    h) usage; exit 0 ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
    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
    93
    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
    94
    \?) usage >&2; exit 1 ;;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
  esac
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
done
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
shift $((OPTIND-1))
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
[[ -z "$environment" ]] && environment='production'
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
case $environment in
386
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   102
    development)
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   103
        build_option='--dev'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   104
        build_option_back='--development'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   105
        ;;
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   106
    *)
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   107
        build_option='--prod'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   108
        build_option_back='--production'
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   109
        ;;
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
esac
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
echo "environment: $environment"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
echo "do_install: $do_install"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
[[ "$do_install" == true ]] && echoblue "DO INSTALL" && install;
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
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
   116
pushd "$DIR" > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
echoblue "---> cleaning build folder"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
rm -fr root
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
echoblue "---> creating build folder"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
mkdir -p root/var/www/corpusdelaparole/corpus-back
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
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
   124
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   125
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
   126
pushd ../server/src > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
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
   128
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
   129
npm install
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   130
./node_modules/.bin/bower install
386
c731ab9b934d implement first version of sparql client interface
ymh <ymh.work@gmail.com>
parents: 368
diff changeset
   131
./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
   132
popd > /dev/null
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   133
echoblue "---> building back done"
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
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
   136
pushd ../cms/app-client > /dev/null
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   137
yarn install --ignore-engines
437
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   138
./node_modules/.bin/bower install
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
./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
   140
popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
echoblue "---> building app-client done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   143
echoblue "---> building module and copying front"
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
   144
pushd ../cms > /dev/null
437
7693515f2e4a replace php-memcache by php-memcached, slight build improvement
ymh <ymh.work@gmail.com>
parents: 390
diff changeset
   145
npm install
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   146
./node_modules/.bin/gulp copy-drupal ${build_option} --version="$version"
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
./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
   148
popd > /dev/null
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   149
echoblue "---> building module and copying front done"
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
echoblue "---> building package"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
vagrant ssh -c "/vagrant/build_rpm.sh"
388
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   153
echoblue "---> building package done"
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   154
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   155
if [ "$VAGRANT_STARTED" = true ]; then
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   156
    echoblue "---> Stopping vagrant"
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   157
    vagrant halt
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   158
    echoblue "---> Stopping vagrant done"
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   159
fi
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   160
202b6f209b9a set version 0.0.5
ymh <ymh.work@gmail.com>
parents: 386
diff changeset
   161
popd > /dev/null
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
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
   163
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
   164
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   165
pushd "$DIR" > /dev/null
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   166
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   167
cp drupal/installDrupal.sh dist/
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   168
cp drupal/exportDrupal.sh dist/
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   169
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   170
popd > /dev/null
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   171
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
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
   173
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   174
if [ -f bootstrap-puppet.sh -a -f corpusdelaparole-$version-*.noarch.rpm -a -f installDrupal.sh -a -f puppet-corpusdelaparole-$version-*.noarch.rpm ]; then
544
ad58d7627f70 use same http client in ImportCocoonRDF and define version 0.22
ymh <ymh.work@gmail.com>
parents: 541
diff changeset
   175
    rm -f corpusdelaparole_*_*.tar.gz
ad58d7627f70 use same http client in ImportCocoonRDF and define version 0.22
ymh <ymh.work@gmail.com>
parents: 541
diff changeset
   176
    ARCHIVE_NAME="corpusdelaparole_$(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
   177
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   178
    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
   179
541
e756a8c72c3d integrate drupal and correct build process. update version
ymh <ymh.work@gmail.com>
parents: 483
diff changeset
   180
    cp bootstrap-puppet.sh corpusdelaparole-$version-*.noarch.rpm installDrupal.sh exportDrupal.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
   181
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   182
    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
   183
483
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   184
    rm -fr "$ARCHIVE_NAME"
b47da9606c10 remove double sroll control in i.e. and edge
ymh <ymh.work@gmail.com>
parents: 467
diff changeset
   185
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
   186
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
   187
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
   188
346
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   189
echoblue "---> done"
4cd0f8c936ed upgrade build and delivery process for integration
ymh <ymh.work@gmail.com>
parents:
diff changeset
   190