Commit c55b41a0 authored by Remi Perenon's avatar Remi Perenon

Merge branch 'hotfix-debian_package_name' into 'master'

Debugging the package name on debian and moving artifacts for convenient user download

See merge request !15
parents 31bb0c3a 6688dbc1
Pipeline #3937 passed with stages
in 17 minutes and 27 seconds
...@@ -19,7 +19,7 @@ docker_login: ...@@ -19,7 +19,7 @@ docker_login:
ci:ubuntu_trusty: ci:ubuntu_trusty:
stage: ci stage: ci
script: script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_build . - docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t ci_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_build .
allow_failure: false allow_failure: false
tags: tags:
- docker - docker
...@@ -29,7 +29,7 @@ ci:ubuntu_trusty: ...@@ -29,7 +29,7 @@ ci:ubuntu_trusty:
deploy:ubuntu_trusty: deploy:ubuntu_trusty:
stage: deploy stage: deploy
script: script:
- docker build --force-rm -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy . - docker build --force-rm --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t deploy_mdanse_trusty -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-trusty/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh trusty
dependencies: dependencies:
...@@ -40,6 +40,7 @@ deploy:ubuntu_trusty: ...@@ -40,6 +40,7 @@ deploy:ubuntu_trusty:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- tags
- web - web
when: on_success when: on_success
artifacts: artifacts:
...@@ -56,7 +57,7 @@ deploy:ubuntu_trusty: ...@@ -56,7 +57,7 @@ deploy:ubuntu_trusty:
ci:ubuntu_xenial: ci:ubuntu_xenial:
stage: ci stage: ci
script: script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_build . - docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t ci_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_build .
allow_failure: false allow_failure: false
tags: tags:
- docker - docker
...@@ -66,7 +67,7 @@ ci:ubuntu_xenial: ...@@ -66,7 +67,7 @@ ci:ubuntu_xenial:
deploy:ubuntu_xenial: deploy:ubuntu_xenial:
stage: deploy stage: deploy
script: script:
- docker build --force-rm -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy . - docker build --force-rm --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t deploy_mdanse_xenial -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-xenial/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh xenial
dependencies: dependencies:
...@@ -77,6 +78,7 @@ deploy:ubuntu_xenial: ...@@ -77,6 +78,7 @@ deploy:ubuntu_xenial:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- tags
- web - web
when: on_success when: on_success
artifacts: artifacts:
...@@ -93,7 +95,7 @@ deploy:ubuntu_xenial: ...@@ -93,7 +95,7 @@ deploy:ubuntu_xenial:
ci:ubuntu_bionic: ci:ubuntu_bionic:
stage: ci stage: ci
script: script:
- docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} -t ci_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_build . - docker build --force-rm --build-arg MDANSE_GIT_COMMIT=${CI_COMMIT_SHA} --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t ci_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_build .
allow_failure: false allow_failure: false
tags: tags:
- docker - docker
...@@ -103,7 +105,7 @@ ci:ubuntu_bionic: ...@@ -103,7 +105,7 @@ ci:ubuntu_bionic:
deploy:ubuntu_bionic: deploy:ubuntu_bionic:
stage: deploy stage: deploy
script: script:
- docker build --force-rm -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy . - docker build --force-rm --build-arg MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME} -t deploy_mdanse_bionic -f ${CI_PROJECT_DIR}/BuildServer/Docker/Builder/Ubuntu-bionic/Dockerfile_deploy .
- chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh - chmod 755 ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh
- ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic - ${CI_PROJECT_DIR}/BuildServer/Docker/upload_artefacts.sh bionic
dependencies: dependencies:
...@@ -114,6 +116,7 @@ deploy:ubuntu_bionic: ...@@ -114,6 +116,7 @@ deploy:ubuntu_bionic:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- tags
- web - web
when: on_success when: on_success
artifacts: artifacts:
...@@ -157,11 +160,12 @@ deploy:osx: ...@@ -157,11 +160,12 @@ deploy:osx:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- tags
- web - web
when: on_success when: on_success
artifacts: artifacts:
paths: paths:
- ${CI_PROJECT_DIR}/BuildServer/*.dmg - ${CI_PROJECT_DIR}/*.dmg
tags: tags:
- sci - sci
- osx-10.13 - osx-10.13
...@@ -200,11 +204,12 @@ deploy:windows: ...@@ -200,11 +204,12 @@ deploy:windows:
- develop - develop
- /^release-.*$/ - /^release-.*$/
- /^hotfix-.*$/ - /^hotfix-.*$/
- tags
- web - web
when: on_success when: on_success
artifacts: artifacts:
paths: paths:
- "%CI_PROJECT_DIR%\\BuildServer\\*.exe" - "%CI_PROJECT_DIR%\\*.exe"
tags: tags:
- sci - sci
- windows-10 - windows-10
......
...@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"] ...@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT ARG MDANSE_GIT_COMMIT
ARG MDANSE_GIT_BRANCH_NAME
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT} RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
...@@ -2,8 +2,10 @@ FROM ci_mdanse_bionic ...@@ -2,8 +2,10 @@ FROM ci_mdanse_bionic
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_BRANCH_NAME
VOLUME builds VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
...@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"] ...@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT ARG MDANSE_GIT_COMMIT
ARG MDANSE_GIT_BRANCH_NAME
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT} RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
...@@ -2,8 +2,10 @@ FROM ci_mdanse_trusty ...@@ -2,8 +2,10 @@ FROM ci_mdanse_trusty
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_BRANCH_NAME
VOLUME builds VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
...@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"] ...@@ -4,13 +4,15 @@ SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_COMMIT ARG MDANSE_GIT_COMMIT
ARG MDANSE_GIT_BRANCH_NAME
RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git RUN GIT_SSL_NO_VERIFY=true git clone https://code.ill.fr/scientific-software/mdanse.git
WORKDIR mdanse WORKDIR mdanse
RUN git checkout ${MDANSE_GIT_COMMIT} RUN git checkout ${MDANSE_GIT_COMMIT}
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/build.sh
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/tests.sh
...@@ -2,8 +2,10 @@ FROM ci_mdanse_xenial ...@@ -2,8 +2,10 @@ FROM ci_mdanse_xenial
SHELL ["/bin/bash", "-c"] SHELL ["/bin/bash", "-c"]
ARG MDANSE_GIT_BRANCH_NAME
VOLUME builds VOLUME builds
RUN source ./BuildServer/Unix/definitions_debian.sh ; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh RUN source ./BuildServer/Unix/definitions_debian.sh ${MDANSE_GIT_BRANCH_NAME}; source ./BuildServer/Unix/version.sh ; ./BuildServer/Unix/deploy_debian.sh
docker run --rm -iv${PWD}:/artifacts/ deploy_mdanse_$1 << COMMANDS docker run --rm -iv${PWD}:/artifacts/ deploy_mdanse_$1 << COMMANDS
chmod 755 /mdanse/BuildServer/*.deb chmod 755 /mdanse/*.deb
cp -a /mdanse/BuildServer/*.deb /artifacts/. cp -a /mdanse/*.deb /artifacts/.
COMMANDS COMMANDS
...@@ -16,4 +16,6 @@ rm -rf build ...@@ -16,4 +16,6 @@ rm -rf build
rm -rf BuildServer/Build_Debian rm -rf BuildServer/Build_Debian
rm -rf BuildServer/Build_macOS rm -rf BuildServer/Build_macOS
rm -rf BuildServer/Unix/Build_Debian rm -rf BuildServer/Unix/Build_Debian
rm -rf BuildServer/Unix/Build_macOS rm -rf BuildServer/Unix/Build_macOS
\ No newline at end of file rm -rf *.deb
rm -rf *.dmg
\ No newline at end of file
export ARCH=amd64 export ARCH=amd64
export DISTRO=Xenial export DISTRO=$(lsb_release -c | cut -f2)
export PYTHONEXE=/usr/bin/python export PYTHONEXE=/usr/bin/python
# The sed -i"" is compulsory other crashes on macos # The sed -i"" is compulsory other crashes on macos
export SED_I_COMMAND='sed -i' export SED_I_COMMAND='sed -i'
export MDANSE_SOURCE_DIR=`pwd` export MDANSE_SOURCE_DIR=$(pwd)
export MDANSE_TEMPORARY_INSTALLATION_DIR=${MDANSE_SOURCE_DIR}/BuildServer/Unix/Build_Debian export MDANSE_TEMPORARY_INSTALLATION_DIR=${MDANSE_SOURCE_DIR}/BuildServer/Unix/Build_Debian
export PYTHONPATH=${MDANSE_TEMPORARY_INSTALLATION_DIR}/lib/python2.7/site-packages/:${PYTHONPATH} export PYTHONPATH=${MDANSE_TEMPORARY_INSTALLATION_DIR}/lib/python2.7/site-packages/:${PYTHONPATH}
export RED="\\033[1;31m" export RED="\\033[1;31m"
export BLUE="\\033[1;34m" export BLUE="\\033[1;34m"
export NORMAL="\\033[0m" export NORMAL="\\033[0m"
# Get revision number from Git
export MDANSE_GIT_CURRENT_COMMIT=$(git rev-parse --short HEAD)
# Get commit branch from Gitlab
export MDANSE_GIT_BRANCH_NAME="$1"
\ No newline at end of file
export ARCH=amd64 export ARCH=amd64
export DISTRO=macOS export DISTRO=macOS
export PYTHONEXE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python export PYTHONEXE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python
# The sed -i"" is compulsory other crashes on macos # The sed -i"" is compulsory other crashes on macos
export SED_I_COMMAND='sed -i ""' export SED_I_COMMAND='sed -i ""'
export MDANSE_SOURCE_DIR=`pwd` export MDANSE_SOURCE_DIR=$(pwd)
export MDANSE_TEMPORARY_INSTALLATION_DIR=${MDANSE_SOURCE_DIR}/BuildServer/Unix/Build_macOS export MDANSE_TEMPORARY_INSTALLATION_DIR=${MDANSE_SOURCE_DIR}/BuildServer/Unix/Build_macOS
export PYTHONPATH=${MDANSE_TEMPORARY_INSTALLATION_DIR}/lib/python2.7/site-packages/:${PYTHONPATH} export PYTHONPATH=${MDANSE_TEMPORARY_INSTALLATION_DIR}/lib/python2.7/site-packages/:${PYTHONPATH}
export RED="\\033[1;31m" export RED="\\033[1;31m"
export BLUE="\\033[1;34m" export BLUE="\\033[1;34m"
export NORMAL="\\033[0m" export NORMAL="\\033[0m"
\ No newline at end of file
# Get revision number from Git
export MDANSE_GIT_CURRENT_COMMIT=$(git rev-parse --short HEAD)
# Get commit branch from Gitlab
export MDANSE_GIT_BRANCH_NAME=${CI_COMMIT_REF_NAME}
\ No newline at end of file
...@@ -56,7 +56,7 @@ instSize=$(du ${DEBIAN_ROOT_DIR} -b -s | cut -f1) ...@@ -56,7 +56,7 @@ instSize=$(du ${DEBIAN_ROOT_DIR} -b -s | cut -f1)
sed -i "s/Installed-Size:.*/Installed-Size: $((1+(instSize/1024)))/g" ${DEBIAN_ROOT_DIR}/DEBIAN/control sed -i "s/Installed-Size:.*/Installed-Size: $((1+(instSize/1024)))/g" ${DEBIAN_ROOT_DIR}/DEBIAN/control
export TMPDIR=. export TMPDIR=.
fakeroot dpkg-deb -b ${DEBIAN_ROOT_DIR} ${MDANSE_SOURCE_DIR}/BuildServer/MDANSE-${VERSION_NAME}-${DISTRO}-${ARCH}.deb fakeroot dpkg-deb -b ${DEBIAN_ROOT_DIR} ${MDANSE_SOURCE_DIR}/MDANSE-${VERSION_NAME}-${DISTRO}-${ARCH}.deb
status=$? status=$?
if [ $status -ne 0 ]; then if [ $status -ne 0 ]; then
echo -e "${RED}" "Cannot build app.""${NORMAL}" echo -e "${RED}" "Cannot build app.""${NORMAL}"
......
...@@ -64,6 +64,6 @@ chmod 777 ${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources//change_dylib_pa ...@@ -64,6 +64,6 @@ chmod 777 ${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources//change_dylib_pa
${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources//change_dylib_path.sh ${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources//change_dylib_path.sh
${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources/dmg/create-dmg --background "${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources/dmg/dmg_background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ${MDANSE_TEMPORARY_INSTALLATION_DIR}/dist ${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources/dmg/create-dmg --background "${MDANSE_SOURCE_DIR}/BuildServer/Unix/MacOS_resources/dmg/dmg_background.jpg" --volname "MDANSE" --window-pos 200 120 --window-size 800 400 --icon MDANSE.app 200 190 --hide-extension MDANSE.app --app-drop-link 600 185 "${MDANSE_DMG}" ${MDANSE_TEMPORARY_INSTALLATION_DIR}/dist
mv ${MDANSE_SOURCE_DIR}/BuildServer/Unix/${MDANSE_DMG} ${MDANSE_SOURCE_DIR}/BuildServer mv ${MDANSE_SOURCE_DIR}/BuildServer/Unix/${MDANSE_DMG} ${MDANSE_SOURCE_DIR}
rm -rf ${MDANSE_TEMPORARY_INSTALLATION_DIR} rm -rf ${MDANSE_TEMPORARY_INSTALLATION_DIR}
\ No newline at end of file
...@@ -2,22 +2,22 @@ ...@@ -2,22 +2,22 @@
cd $MDANSE_SOURCE_DIR cd $MDANSE_SOURCE_DIR
# Get revision number from GIT and update the __pkginfo__ file with the current commit # Update the __pkginfo__ file with the current commit
MDANSE_GIT_CURRENT_COMMIT=$(git rev-parse --short HEAD)
echo -e "${BLUE}""Commit id = ${MDANSE_GIT_CURRENT_COMMIT}<--""${NORMAL}" echo -e "${BLUE}""Commit id = ${MDANSE_GIT_CURRENT_COMMIT}<--""${NORMAL}"
echo -e "${BLUE}""Branch name = ${MDANSE_GIT_BRANCH_NAME}<--""${NORMAL}"
$SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${MDANSE_GIT_CURRENT_COMMIT}\"/" MDANSE/__pkginfo__.py $SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${MDANSE_GIT_CURRENT_COMMIT}\"/" MDANSE/__pkginfo__.py
# Get MDANSE version # Get MDANSE version
MDANSE_VERSION=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py` MDANSE_VERSION=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
# Check if branch is master # Check if branch is master
if [[ ${CI_COMMIT_REF_NAME} == "master" ]] if [[ ${MDANSE_GIT_BRANCH_NAME} == "master" ]]
then then
VERSION_NAME=${MDANSE_VERSION} VERSION_NAME=${MDANSE_VERSION}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py $SED_I_COMMAND "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py
else else
# Check if branch is release* # Check if branch is release*
if [[ ${CI_COMMIT_REF_NAME::7} == "release" ]] if [[ ${MDANSE_GIT_BRANCH_NAME::7} == "release" ]]
then then
VERSION_NAME=${MDANSE_VERSION}-rc-${MDANSE_GIT_CURRENT_COMMIT} VERSION_NAME=${MDANSE_VERSION}-rc-${MDANSE_GIT_CURRENT_COMMIT}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py $SED_I_COMMAND "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py
......
...@@ -6,6 +6,7 @@ rem MDANSE_DEPENDENCIES_DIR ...@@ -6,6 +6,7 @@ rem MDANSE_DEPENDENCIES_DIR
rem MDANSE_TEMPORARY_INSTALLATION_DIR rem MDANSE_TEMPORARY_INSTALLATION_DIR
cd %MDANSE_SOURCE_DIR% cd %MDANSE_SOURCE_DIR%
del MDANSE*.exe
rmdir /S /Q build rmdir /S /Q build
rmdir /S /Q BuildServer\\Windows\\Build rmdir /S /Q BuildServer\\Windows\\Build
......
...@@ -16,4 +16,12 @@ rem Set th directory where the MDANSE dependencies are stored ...@@ -16,4 +16,12 @@ rem Set th directory where the MDANSE dependencies are stored
set MDANSE_DEPENDENCIES_DIR=C:\\Projects\\mdanse\\resources\\dependencies\\%BUILD_TARGET% set MDANSE_DEPENDENCIES_DIR=C:\\Projects\\mdanse\\resources\\dependencies\\%BUILD_TARGET%
rem Set the location where the temporary Python will be installed rem Set the location where the temporary Python will be installed
set MDANSE_TEMPORARY_INSTALLATION_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows\\Build set MDANSE_TEMPORARY_INSTALLATION_DIR=%MDANSE_SOURCE_DIR%\\BuildServer\\Windows\\Build
\ No newline at end of file
rem Get revision number from Git
rem To understand this syntax "set cmd=...... for /F %%ii ......", see https://stackoverflow.com/questions/2323292/assign-output-of-a-program-to-a-variable
set cmd="git rev-parse --short HEAD"
for /F %%i in (' %cmd% ') do set MDANSE_GIT_CURRENT_COMMIT=%%i
rem Get commit branch from Gitlab
set MDANSE_GIT_BRANCH_NAME=%CI_COMMIT_REF_NAME%
\ No newline at end of file
...@@ -30,7 +30,7 @@ if %STATUS% neq 0 ( ...@@ -30,7 +30,7 @@ if %STATUS% neq 0 (
exit %STATUS% exit %STATUS%
) )
move %MDANSE_TEMPORARY_INSTALLATION_DIR%\\MDANSE*.exe %MDANSE_SOURCE_DIR%\\BuildServer\\ move %MDANSE_TEMPORARY_INSTALLATION_DIR%\\MDANSE*.exe %MDANSE_SOURCE_DIR%\\
rem Remove NSIS log file rem Remove NSIS log file
del NSISlog.txt del NSISlog.txt
cd %MDANSE_SOURCE_DIR% cd %MDANSE_SOURCE_DIR%
...@@ -4,10 +4,9 @@ cd "%MDANSE_SOURCE_DIR%" ...@@ -4,10 +4,9 @@ cd "%MDANSE_SOURCE_DIR%"
rem To understand this syntax "set cmd=...... for /F %%ii ......", see https://stackoverflow.com/questions/2323292/assign-output-of-a-program-to-a-variable rem To understand this syntax "set cmd=...... for /F %%ii ......", see https://stackoverflow.com/questions/2323292/assign-output-of-a-program-to-a-variable
rem Get revision number from GIT and update the __pkginfo__ file with the current commit rem Update the __pkginfo__ file with the current commit
set cmd="git rev-parse --short HEAD"
for /F %%i in (' %cmd% ') do set MDANSE_GIT_CURRENT_COMMIT=%%i
echo "Commit id %MDANSE_GIT_CURRENT_COMMIT%" echo "Commit id %MDANSE_GIT_CURRENT_COMMIT%"
echo "Branch name %MDANSE_GIT_BRANCH_NAME%"
sed -i "s/.*__commit__.*/__commit__ = \"%MDANSE_GIT_CURRENT_COMMIT%\"/" MDANSE/__pkginfo__.py sed -i "s/.*__commit__.*/__commit__ = \"%MDANSE_GIT_CURRENT_COMMIT%\"/" MDANSE/__pkginfo__.py
rem Get MDANSE version rem Get MDANSE version
...@@ -15,12 +14,12 @@ set cmd="sed -n "s/__version__.*=.*\"\(.*\)\"/\1/p" MDANSE/__pkginfo__.py" ...@@ -15,12 +14,12 @@ set cmd="sed -n "s/__version__.*=.*\"\(.*\)\"/\1/p" MDANSE/__pkginfo__.py"
for /F %%i in (' %cmd% ') do set MDANSE_VERSION=%%i for /F %%i in (' %cmd% ') do set MDANSE_VERSION=%%i
rem Check if branch is master, tag as draft otherwise rem Check if branch is master, tag as draft otherwise
if "%CI_COMMIT_REF_NAME%" == "master" ( if "%MDANSE_GIT_BRANCH_NAME%" == "master" (
set VERSION_NAME=%MDANSE_VERSION% set VERSION_NAME=%MDANSE_VERSION%
sed -i "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py sed -i "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py
) else ( ) else (
rem Check if branch is release* rem Check if branch is release*
if "%CI_COMMIT_REF_NAME:~0,7%" == "release" ( if "%MDANSE_GIT_BRANCH_NAME:~0,7%" == "release" (
set VERSION_NAME=%MDANSE_VERSION%-rc-%MDANSE_GIT_CURRENT_COMMIT% set VERSION_NAME=%MDANSE_VERSION%-rc-%MDANSE_GIT_CURRENT_COMMIT%
sed -i "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py sed -i "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py
) else ( ) else (
......
version 1.1.1
--------------
* FIXED issue #14 Package name was not valid for debian package in 1.1.0 version
* CHANGED Moving artifacts for more convenient user downloading
version 1.1.0 version 1.1.0
-------------- --------------
* ADDED issue #11 MDANSE is now compliant with 16.04 and 18.04 Ubuntu systems * ADDED issue #11 MDANSE is now compliant with 16.04 and 18.04 Ubuntu systems
......
...@@ -25,9 +25,9 @@ __repo__ = "https://code.ill.fr/scientific-software/mdanse/" ...@@ -25,9 +25,9 @@ __repo__ = "https://code.ill.fr/scientific-software/mdanse/"
__license__ = "GPL 3" __license__ = "GPL 3"
__version__ = "1.1.0" __version__ = "1.1.1"
__date__ = "06-06-2018" __date__ = "14-06-2018"
__commit__ = "undefined" __commit__ = "undefined"
......
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