Commit b5e08885 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Update scripts/

parent c213e07b
......@@ -65,7 +65,7 @@ When you are ready with your changes:
The script will check that:
- You are on the *devel* branch in all hpp repositories.
- All hpp repositories are clean (no local changes).
3. Push the tags to github. (TODO add a script)
3. Push the tags to github.
### Benchmarked release
......@@ -25,28 +25,62 @@ hpp-walkgen hpp-wholebody-step hpp-wholebody-step-corba \
hpp-manipulation hpp-manipulation-corba hpp-manipulation-urdf \
hpp-gepetto-viewer hpp-gui hpp-plot"
echo "Devel directory is $DEVEL_HPP_DIR"
# Check that
# - current branch is devel
# - local repository if clean
# - remote origin is something like
# - there is no difference between origin/devel
# and the current working directory.
# - working directory is clean
for pkg in ${pkg_main}; do
GIT="git -C ${DEVEL_HPP_DIR}/src/${pkg}"
current_branch=$(${GIT} rev-parse --abbrev-ref HEAD)
if [ ! "${current_branch}" == "devel" ]; then
echo "${pkg}: Current branch is ${current_branch}. Should be devel."
#exit 1
remote_origin=$(${GIT} remote get-url origin)
if [[ ! "$remote_origin" =~ ^.*[:/]humanoid-path-planner/${pkg}.*$ ]]; then
echo -e "${pkg}: ${c_bad}Remote 'origin' is not the main repo. Should be${pkg}${c_reset}"
# exit 1
#current_branch=$(${GIT} rev-parse --abbrev-ref HEAD)
#if [ ! "${current_branch}" == "devel" ]; then
# echo "${pkg}: Current branch is ${current_branch}. Should be devel."
# exit 1
${GIT} update-index -q --refresh
CHANGED=$(${GIT} diff-index --name-only origin/devel --)
if [ -n "${CHANGED}" ]; then
echo -e "${pkg}: ${c_bad}Not synchronized with origin/devel${c_reset}."
exit 1
CHANGED=$(${GIT} diff-index --name-only HEAD --)
if [ -n "${CHANGED}" ]; then
echo "${pkg}: Working directory not clean."
#exit 1
echo -e "${pkg}: ${c_bad}Working directory not clean${c_reset}."
exit 1
echo -e "${pkg}: ${c_good}Ok${c_reset}."
exit 0
# Create the tags
echo "Create tags ${version}"
for pkg in ${pkg_main}; do
GIT="git -C ${DEVEL_HPP_DIR}/src/${pkg}"
echo "Create tag ${version} in ${pkg}"
${GIT} tag -a -m "Version ${version}" ${version}
echo -e "${pkg}: ${c_good}Ok${c_reset}."
# Push the tags
read -p "Push the tags ? [y/N]" answer
if [[ "${answer}" =~ ^[yY]$ ]]; then
echo "Push tags ${version} to origin"
for pkg in ${pkg_main}; do
GIT="git -C ${DEVEL_HPP_DIR}/src/${pkg}"
${GIT} push origin ${version}
echo -e "${pkg}: ${c_good}Ok${c_reset}."
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