Commit a6cbd93b authored by eric pellegrini's avatar eric pellegrini
Browse files

(Re)Harmonized Windows and Unix directory structure

parent 9f36c1ad
...@@ -23,7 +23,7 @@ mkdir -p ${DEBIAN_ROOT_DIR} ...@@ -23,7 +23,7 @@ mkdir -p ${DEBIAN_ROOT_DIR}
echo -e "${BLUE}""Build debian tree""${NORMAL}" echo -e "${BLUE}""Build debian tree""${NORMAL}"
# Copy all the debian files (e.g. control, copyright, md5sum ...) into DEBIAN directory # Copy all the debian files (e.g. control, copyright, md5sum ...) into DEBIAN directory
cp -r ${SCRIPT_DIR}/DEBIAN ${DEBIAN_ROOT_DIR}/ cp -r ${SCRIPT_DIR}/Resources/DEBIAN ${DEBIAN_ROOT_DIR}/
# Set automatically the good version number for the Debian control file # Set automatically the good version number for the Debian control file
sed -i "s/Version:.*/Version: ${VERSION_NAME}/g" ${DEBIAN_ROOT_DIR}/DEBIAN/control sed -i "s/Version:.*/Version: ${VERSION_NAME}/g" ${DEBIAN_ROOT_DIR}/DEBIAN/control
chmod -R 755 ${DEBIAN_ROOT_DIR}/DEBIAN chmod -R 755 ${DEBIAN_ROOT_DIR}/DEBIAN
...@@ -31,7 +31,7 @@ chmod -R 755 ${DEBIAN_ROOT_DIR}/DEBIAN ...@@ -31,7 +31,7 @@ chmod -R 755 ${DEBIAN_ROOT_DIR}/DEBIAN
# Build the /usr/share/applications directory inside the debian root directory and copy the mdanse desktop file inside # Build the /usr/share/applications directory inside the debian root directory and copy the mdanse desktop file inside
DEBIAN_APP_DIR=${DEBIAN_ROOT_DIR}/usr/share/applications DEBIAN_APP_DIR=${DEBIAN_ROOT_DIR}/usr/share/applications
mkdir -p ${DEBIAN_APP_DIR} mkdir -p ${DEBIAN_APP_DIR}
cp ${SCRIPT_DIR}/MDANSE.desktop ${DEBIAN_APP_DIR}/ cp ${SCRIPT_DIR}/Resources/MDANSE.desktop ${DEBIAN_APP_DIR}/
# Build the /usr/share/pixmaps directory inside the debian root directory and copy the mdanse icon file inside # Build the /usr/share/pixmaps directory inside the debian root directory and copy the mdanse icon file inside
DEBIAN_PIXMAPS_DIR=${DEBIAN_ROOT_DIR}/usr/share/pixmaps DEBIAN_PIXMAPS_DIR=${DEBIAN_ROOT_DIR}/usr/share/pixmaps
......
...@@ -88,4 +88,4 @@ ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/change_dylib_path.sh ...@@ -88,4 +88,4 @@ ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/change_dylib_path.sh
hdiutil unmount /Volumes/MDANSE -force -quiet hdiutil unmount /Volumes/MDANSE -force -quiet
sleep 5 sleep 5
${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/dmg/create-dmg --background "${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/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}" ${CI_TEMP_DIR}/dist ${CI_PROJECT_DIR}/BuildServer/Unix/MacOS/Resources/dmg/create-dmg --background "${CI_PROJECT_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}" ${CI_TEMP_DIR}/dist
...@@ -56,28 +56,3 @@ if [ $status -ne 0 ]; then ...@@ -56,28 +56,3 @@ if [ $status -ne 0 ]; then
exit $status exit $status
fi fi
PKG_INFO=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/MDANSE/__pkginfo__.py
# Update the __pkginfo__ file with the current commit
$SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${CI_COMMIT_ID}\"/" ${PKG_INFO}
# Get MDANSE version
MDANSE_VERSION=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' ${PKG_INFO}`
# Check if branch is master
if [[ ${CI_COMMIT_REF_NAME} == "master" ]]
then
VERSION_NAME=${MDANSE_VERSION}
${SED_I_COMMAND} "s/.*__beta__.*/__beta__ = None/" ${PKG_INFO}
else
# Check if branch is release*
if [[ ${CI_COMMIT_REF_NAME::7} == "release" ]]
then
VERSION_NAME=${MDANSE_VERSION}-rc-${CI_COMMIT_ID}
${SED_I_COMMAND} "s/.*__beta__.*/__beta__ = \"rc\"/" ${PKG_INFO}
else
VERSION_NAME=${MDANSE_VERSION}-beta-${CI_COMMIT_ID}
${SED_I_COMMAND} "s/.*__beta__.*/__beta__ = \"beta\"/" ${PKG_INFO}
fi
fi
export VERSION_NAME
...@@ -36,3 +36,30 @@ export NORMAL="\\033[0m" ...@@ -36,3 +36,30 @@ export NORMAL="\\033[0m"
echo -e "${BLUE}""Commit id = ${CI_COMMIT_ID}""${NORMAL}" echo -e "${BLUE}""Commit id = ${CI_COMMIT_ID}""${NORMAL}"
echo -e "${BLUE}""Branch name = ${CI_COMMIT_REF_NAME}""${NORMAL}" echo -e "${BLUE}""Branch name = ${CI_COMMIT_REF_NAME}""${NORMAL}"
PKG_INFO=${CI_TEMP_INSTALL_DIR}/lib/python2.7/site-packages/MDANSE/__pkginfo__.py
# Update the __pkginfo__ file with the current commit
$SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${CI_COMMIT_ID}\"/" ${PKG_INFO}
# Get MDANSE version
MDANSE_VERSION=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' ${PKG_INFO}`
# Check if branch is master
if [[ ${CI_COMMIT_REF_NAME} == "master" ]]
then
VERSION_NAME=${MDANSE_VERSION}
${SED_I_COMMAND} "s/.*__beta__.*/__beta__ = None/" ${PKG_INFO}
else
# Check if branch is release*
if [[ ${CI_COMMIT_REF_NAME::7} == "release" ]]
then
VERSION_NAME=${MDANSE_VERSION}-rc-${CI_COMMIT_ID}
${SED_I_COMMAND} "s/.*__beta__.*/__beta__ = \"rc\"/" ${PKG_INFO}
else
VERSION_NAME=${MDANSE_VERSION}-beta-${CI_COMMIT_ID}
${SED_I_COMMAND} "s/.*__beta__.*/__beta__ = \"beta\"/" ${PKG_INFO}
fi
fi
export VERSION_NAME
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