The code.ill.fr has been recreated and upgraded with the latest version this weekend, If you encounter any problem please inform the Helpdesk.

Commit 187309ba authored by Remi Perenon's avatar Remi Perenon
Browse files

Automatic version generation between Nothing (release), rc and beta

parent 63e446df
Pipeline #3815 passed with stages
in 13 minutes and 11 seconds
......@@ -10,14 +10,20 @@ $SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${MDANSE_GIT_CURRENT_COMMIT}\"/"
# Get MDANSE version
MDANSE_VERSION=`sed -n 's/__version__.*=.*\"\(.*\)\"/\1/p' MDANSE/__pkginfo__.py`
# Check if branch is master, tag as draft otherwise
# Check if branch is master
if [[ ${CI_COMMIT_REF_NAME} == "master" ]]
then
VERSION_NAME=${MDANSE_VERSION}
$SED_I_COMMAND "s/.*__commit__.*/__commit__ = \"${MDANSE_GIT_CURRENT_COMMIT}\"/" MDANSE/__pkginfo__.py
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = False/" MDANSE/__pkginfo__.py
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py
else
VERSION_NAME=${MDANSE_VERSION}-"beta"-${MDANSE_GIT_CURRENT_COMMIT}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = True/" MDANSE/__pkginfo__.py
# Check if branch is release*
if [[ ${CI_COMMIT_REF_NAME::7} == "release" ]]
then
VERSION_NAME=${MDANSE_VERSION}-rc-${MDANSE_GIT_CURRENT_COMMIT}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py
else
VERSION_NAME=${MDANSE_VERSION}-beta-${MDANSE_GIT_CURRENT_COMMIT}
$SED_I_COMMAND "s/.*__beta__.*/__beta__ = \"beta\"/" MDANSE/__pkginfo__.py
fi
fi
export VERSION_NAME
\ No newline at end of file
......@@ -17,8 +17,14 @@ for /F %%i in (' %cmd% ') do set MDANSE_VERSION=%%i
rem Check if branch is master, tag as draft otherwise
if "%CI_COMMIT_REF_NAME%" == "master" (
set VERSION_NAME=%MDANSE_VERSION%
sed -i "s/.*__beta__.*/__beta__ = False/" MDANSE/__pkginfo__.py
sed -i "s/.*__beta__.*/__beta__ = None/" MDANSE/__pkginfo__.py
) else (
set VERSION_NAME=%MDANSE_VERSION%-"beta"-%MDANSE_GIT_CURRENT_COMMIT%
sed -i "s/.*__beta__.*/__beta__ = True/" MDANSE/__pkginfo__.py
rem Check if branch is release*
if "%CI_COMMIT_REF_NAME:~0,7%" == "release" (
set VERSION_NAME=%MDANSE_VERSION%-rc-%MDANSE_GIT_CURRENT_COMMIT%
sed -i "s/.*__beta__.*/__beta__ = \"rc\"/" MDANSE/__pkginfo__.py
) else (
set VERSION_NAME=%MDANSE_VERSION%-beta-%MDANSE_GIT_CURRENT_COMMIT%
sed -i "s/.*__beta__.*/__beta__ = \"beta\"/" MDANSE/__pkginfo__.py
)
)
\ No newline at end of file
......@@ -232,7 +232,7 @@ class MainFrame(wx.Frame):
def on_about(self, event=None):
if __beta__:
beta_string = " (beta)"
beta_string = " (" + str(__beta__) + ")"
else:
beta_string = ""
about_str = \
......
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