If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit e127b5b6 authored by eric pellegrini's avatar eric pellegrini

The pkginfo is now updated with the current commit id when building MDANSE

parent 1df1ab74
Pipeline #1490 passed with stages
in 11 minutes and 14 seconds
......@@ -17,8 +17,8 @@ BUILD_TARGET=darwin
echo -e "$BLEU""Getting last MDANSE revision" "$NORMAL"
# Get revision number from git (without trailing newline)
REV_NUMBER=$(git rev-list --count HEAD)
echo -e "$BLEU""Revision number = ${REV_NUMBER}" "$NORMAL"
COMMIT_ID=$(git rev-parse --long HEAD)
echo -e "$BLEU""Commit id = ${COMMIT_ID}" "$NORMAL"
# Now build last version and install it in our homebrewed python
echo -e "$BLEU""Building MDANSE" "$NORMAL"
......
#!/bin/bash
# This script is to package the nMolDyn package for Mac OS X
# This script is to package the MDANSE package for Mac OS X
#############################
# CONFIGURATION
......@@ -10,6 +10,10 @@
ROUGE="\\033[1;31m"
BLEU="\\033[1;34m"
# Update the __pkginfo__ file with the current commit
COMMIT_ID=$(git rev-parse --long HEAD)
sed -i 's/.*__commit__.*/__commit__ = \"${COMMIT_ID}\"/' MDANSE/__pkginfo__.py
VERSION_NAME=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
if [[ ${CI_BUILD_REF_NAME} =~ develop ]]
......@@ -18,7 +22,7 @@ then
then
VERSION_NAME=${VERSION_NAME}-"weekly-"`date +%Y-%m-%d`
fi
VERSION_NAME=${VERSION_NAME}-`git rev-parse --short HEAD`
VERSION_NAME=${VERSION_NAME}-${COMMIT_ID}
fi
export VERSION_NAME
......
......@@ -14,8 +14,8 @@ cd
cd $CI_PROJECT_DIR
# Get revision number from git (without trailing newline)
REV_NUMBER=$(git rev-list --count HEAD)
echo -e "$BLEU""Revision number = ${REV_NUMBER}<--" "$NORMAL"
COMMIT_ID=$(git rev-parse --long HEAD)
echo -e "$BLEU""Commit id = ${COMMIT_ID}<--" "$NORMAL"
# Now build last version
echo "$BLEU""Building MDANSE" "$NORMAL"
......
......@@ -11,6 +11,10 @@ export DISTRO=$2
ROUGE="\\033[1;31m"
BLEU="\\033[1;34m"
# Update the __pkginfo__ file with the current commit
COMMIT_ID=$(git rev-parse --long HEAD)
sed -i 's/.*__commit__.*/__commit__ = \"${COMMIT_ID}\"/' MDANSE/__pkginfo__.py
VERSION_NAME=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
if [[ ${CI_BUILD_REF_NAME} =~ develop ]]
......
......@@ -195,8 +195,8 @@ rm pythonlog.txt
cd ${CI_PROJECT_DIR}
# Get revision number from GIT
REV_NUMBER=$(git rev-list --count HEAD)
echo "Revision number is $REV_NUMBER"
COMMIT_ID=$(git rev-parse --long HEAD)
echo "Commit id ${COMMIT_ID}"
# setup the environment for a visual studio build of MDANSE using microsoft SDK 7.0 and build MDANSE
echo "MDANSE setup and build"
......
......@@ -12,6 +12,10 @@ else
BUILD_TARGET=$1
fi
# Update the __pkginfo__ file with the current commit
COMMIT_ID=$(git rev-parse --long HEAD)
sed -i 's/.*__commit__.*/__commit__ = \"${COMMIT_ID}\"/' MDANSE/__pkginfo__.py
VERSION_NAME=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
if [[ ${CI_BUILD_REF_NAME} =~ develop ]]
......
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