run_deploy.sh 1.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# RUN FROM c:\cygwin64\bin\bash c:\Users\Administrateur\Desktop\BUILD\package.sh

#############################
# CONFIGURATION
#############################

if [ ! $1 ]; then
    BUILD_TARGET="win-amd64"
else
    BUILD_TARGET=$1
fi

15
COMMIT_ID=$(git rev-parse --short HEAD)
16
VERSION_NAME=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
eric pellegrini's avatar
eric pellegrini committed
17
18

if [[ ${CI_BUILD_REF_NAME} =~ develop ]]
19
then
eric pellegrini's avatar
eric pellegrini committed
20
21
22
23
    if [ -n "${WEEKLY_BUILD}" ]
    then
        VERSION_NAME=${VERSION_NAME}-"weekly-"`date +%Y-%m-%d`
    fi
24
    VERSION_NAME=${VERSION_NAME}-${COMMIT_ID}
25
26
fi

eric pellegrini's avatar
eric pellegrini committed
27
28


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
##Which versions of external programs to use
PYTHON_VERSION=2.7.6

CI_PROJECT_DIR_WIN=$(cygpath -a -w ${CI_PROJECT_DIR})

# Change working directory to the directory the script is in
# http://stackoverflow.com/a/246128
SCRIPT_DIR="${CI_PROJECT_DIR}/BuildServer/Windows"

# This is the directory that will contain the temporary installation
TARGET_DIR="${CI_PROJECT_DIR_WIN}\\BuildServer\\Windows\\Build"
TARGET_DIR_CYGWIN=$(cygpath -u $TARGET_DIR)

cd ${SCRIPT_DIR}

echo "Packaging"

# create the MDANSE installer
echo "Creating nsis installer for target ${BUILD_TARGET}..."

makensis /V4 /ONSISlog.txt /DVERSION=${VERSION_NAME} /DARCH=${BUILD_TARGET} /DTARGET_DIR="${TARGET_DIR}" MDANSE_installer.nsi

Remi Perenon's avatar
Remi Perenon committed
51
exit 0