Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
dc471047
Commit
dc471047
authored
Mar 07, 2017
by
eric pellegrini
Browse files
bug fix when setting the commit id in __pkginfo__
parent
bff8e7d3
Pipeline
#1497
passed with stages
in 6 minutes and 42 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
BuildServer/Darwin/Scripts/run_build.sh
View file @
dc471047
...
@@ -16,8 +16,11 @@ BUILD_TARGET=darwin
...
@@ -16,8 +16,11 @@ BUILD_TARGET=darwin
# take the latest version of nmoldyn available on the forge
# take the latest version of nmoldyn available on the forge
echo
-e
"
$BLEU
""Getting last MDANSE revision"
"
$NORMAL
"
echo
-e
"
$BLEU
""Getting last MDANSE revision"
"
$NORMAL
"
#
Get revision number from git (without trailing newline)
#
Update the __pkginfo__ file with the current commit. The sed -i "" is compulsory other crashes on macos
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
sed
-i
""
"s/.*__commit__.*/__commit__ =
\"
${
COMMIT_ID
}
\"
/"
MDANSE/__pkginfo__.py
# Get revision number from git (without trailing newline)
echo
-e
"
$BLEU
""Commit id =
${
COMMIT_ID
}
"
"
$NORMAL
"
echo
-e
"
$BLEU
""Commit id =
${
COMMIT_ID
}
"
"
$NORMAL
"
# Now build last version and install it in our homebrewed python
# Now build last version and install it in our homebrewed python
...
...
BuildServer/Darwin/Scripts/run_deploy.sh
View file @
dc471047
...
@@ -10,10 +10,7 @@
...
@@ -10,10 +10,7 @@
ROUGE
=
"
\\
033[1;31m"
ROUGE
=
"
\\
033[1;31m"
BLEU
=
"
\\
033[1;34m"
BLEU
=
"
\\
033[1;34m"
# Update the __pkginfo__ file with the current commit
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
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
`
VERSION_NAME
=
`
sed
-n
's/__version__.*=.*\"\(.*\)\"/\1/p'
MDANSE/__pkginfo__.py
`
if
[[
${
CI_BUILD_REF_NAME
}
=
~ develop
]]
if
[[
${
CI_BUILD_REF_NAME
}
=
~ develop
]]
...
...
BuildServer/Debian/run_build.sh
View file @
dc471047
...
@@ -13,8 +13,11 @@ BLEU="\\033[1;34m"
...
@@ -13,8 +13,11 @@ BLEU="\\033[1;34m"
cd
cd
cd
$CI_PROJECT_DIR
cd
$CI_PROJECT_DIR
#
Get revision number from git (without trailing newline)
#
Update the __pkginfo__ file with the current commit
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
sed
-i
"s/.*__commit__.*/__commit__ =
\"
${
COMMIT_ID
}
\"
/"
MDANSE/__pkginfo__.py
# Get revision number from git (without trailing newline)
echo
-e
"
$BLEU
""Commit id =
${
COMMIT_ID
}
<--"
"
$NORMAL
"
echo
-e
"
$BLEU
""Commit id =
${
COMMIT_ID
}
<--"
"
$NORMAL
"
# Now build last version
# Now build last version
...
...
BuildServer/Debian/run_deploy.sh
View file @
dc471047
...
@@ -11,10 +11,7 @@ export DISTRO=$2
...
@@ -11,10 +11,7 @@ export DISTRO=$2
ROUGE
=
"
\\
033[1;31m"
ROUGE
=
"
\\
033[1;31m"
BLEU
=
"
\\
033[1;34m"
BLEU
=
"
\\
033[1;34m"
# Update the __pkginfo__ file with the current commit
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
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
`
VERSION_NAME
=
`
sed
-n
's/__version__.*=.*\"\(.*\)\"/\1/p'
MDANSE/__pkginfo__.py
`
if
[[
${
CI_BUILD_REF_NAME
}
=
~ develop
]]
if
[[
${
CI_BUILD_REF_NAME
}
=
~ develop
]]
...
@@ -23,7 +20,7 @@ then
...
@@ -23,7 +20,7 @@ then
then
then
VERSION_NAME
=
${
VERSION_NAME
}
-
"weekly-"
`
date
+%Y-%m-%d
`
VERSION_NAME
=
${
VERSION_NAME
}
-
"weekly-"
`
date
+%Y-%m-%d
`
fi
fi
VERSION_NAME
=
${
VERSION_NAME
}
-
`
git rev-parse
--short
HEAD
`
VERSION_NAME
=
${
VERSION_NAME
}
-
${
COMMIT_ID
}
fi
fi
##Select the build target
##Select the build target
...
...
BuildServer/Windows/run_build.sh
View file @
dc471047
...
@@ -194,8 +194,11 @@ rm pythonlog.txt
...
@@ -194,8 +194,11 @@ rm pythonlog.txt
cd
${
CI_PROJECT_DIR
}
cd
${
CI_PROJECT_DIR
}
#
Get revision number from GIT
#
Update the __pkginfo__ file with the current commit
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
sed
-i
"s/.*__commit__.*/__commit__ =
\"
${
COMMIT_ID
}
\"
/"
MDANSE/__pkginfo__.py
# Get revision number from GIT
echo
"Commit id
${
COMMIT_ID
}
"
echo
"Commit id
${
COMMIT_ID
}
"
# setup the environment for a visual studio build of MDANSE using microsoft SDK 7.0 and build MDANSE
# setup the environment for a visual studio build of MDANSE using microsoft SDK 7.0 and build MDANSE
...
...
BuildServer/Windows/run_deploy.sh
View file @
dc471047
...
@@ -12,10 +12,7 @@ else
...
@@ -12,10 +12,7 @@ else
BUILD_TARGET
=
$1
BUILD_TARGET
=
$1
fi
fi
# Update the __pkginfo__ file with the current commit
COMMIT_ID
=
$(
git rev-parse
--long
HEAD
)
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
`
VERSION_NAME
=
`
sed
-n
's/__version__.*=.*\"\(.*\)\"/\1/p'
MDANSE/__pkginfo__.py
`
if
[[
${
CI_BUILD_REF_NAME
}
=
~ develop
]]
if
[[
${
CI_BUILD_REF_NAME
}
=
~ develop
]]
...
@@ -24,7 +21,7 @@ then
...
@@ -24,7 +21,7 @@ then
then
then
VERSION_NAME
=
${
VERSION_NAME
}
-
"weekly-"
`
date
+%Y-%m-%d
`
VERSION_NAME
=
${
VERSION_NAME
}
-
"weekly-"
`
date
+%Y-%m-%d
`
fi
fi
VERSION_NAME
=
${
VERSION_NAME
}
-
`
git rev-parse
--short
HEAD
`
VERSION_NAME
=
${
VERSION_NAME
}
-
${
COMMIT_ID
}
fi
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment