From a6b5d042bb85f44b200503df1a7418fbaa47b247 Mon Sep 17 00:00:00 2001
From: Emmanouil Angelidis <angelidis@fortiss.org>
Date: Thu, 21 Dec 2017 16:21:31 +0100
Subject: [PATCH] [NRRPLT-5939] New script to change all the nprRepos versions
 automatically

The script reads the repos.txt file from the user-scripts and:

1. Compares the old version with the new one in all the repos, and
   if they new is smaller it stops execution
2. Changes all the versions in all the repos to the new version

Change-Id: I9ddff07ea935adb73e595a2e8d6a404b08e69a21
---
 setVersion.sh | 99 ---------------------------------------------------
 1 file changed, 99 deletions(-)
 delete mode 100755 setVersion.sh

diff --git a/setVersion.sh b/setVersion.sh
deleted file mode 100755
index 66e0673..0000000
--- a/setVersion.sh
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/bin/bash
-# Substitutes versions of all packages in this repo
-# by Bernd Eckstein
-
-function showSyntax() {
-    echo
-    echo "This script substitutes the versions in version.py and requirements.txt"
-    echo "for the projects hbp_nrp_music_xml and hbp_nrp_music_interface"
-    echo
-    echo "Syntax:    ./setVersion.sh [parameter]"
-    echo
-    echo "Parameters:"
-    echo "           --set M.m.p[.devX]]   Set version. See examples below"
-    echo "           --show                Show current version"
-    echo "           --help                Show this help"
-    echo
-    echo "Examples:  ./setVersion.sh --set 0.4.2.dev5"
-    echo "           ./setVersion.sh --set 0.4.3"
-    echo
-}
-
-
-function showVersion() {
-    cat hbp_nrp_music_xml/hbp_nrp_music_xml/version.py | grep VERSION
-}
-
-function testVersion() {
-    version=$1
-    if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+(\.dev[0-9]+)?$ ]]; then
-        return
-    else
-        echo
-        echo "Version string '$version' is not in the format M.m.p[.devX]"
-        echo "Examples:      '0.4.2.dev5'"
-        echo "               '0.4.3'"
-        echo
-        exit -1
-    fi
-}
-
-function setVersion() {
-    version=$1
-    file=$2
-    echo " ... "$file
-    echo "'''version string - generated by setVersion.sh'''" > $file
-    echo "VERSION = '$version'" >> $file
-}
-
-function subVersion() {
-    version=$1
-    file=$2
-    echo " ... "$file
-    list="hbp-nrp-music-xml hbp-nrp-music-interface hbp-nrp-distributed-nest"
-    for i in $list; do
-        sed -i "/$i/c\\$i==$version" $file
-    done
-}
-
-
-
-# make sure we are in the directory of the script
-cd "$(dirname "$0")"
-
-case "$1" in
-    --help)
-        showSyntax
-        exit
-        ;;
-    --show)
-        showVersion
-        exit
-        ;;
-    --set)
-        # just continue
-        ;;
-     *)
-        showSyntax
-        exit
-        ;;
-esac
-
-
-version=$2
-
-testVersion $version # may exit
-
-echo
-echo "Setting versions to '"$version"'" in ...
-
-setVersion $version hbp_nrp_music_xml/hbp_nrp_music_xml/version.py
-setVersion $version hbp_nrp_music_interface/hbp_nrp_music_interface/version.py
-setVersion $version hbp_nrp_distributed_nest/hbp_nrp_distributed_nest/version.py
-
-subVersion $version hbp_nrp_music_xml/requirements.txt
-subVersion $version hbp_nrp_music_interface/requirements.txt
-subVersion $version hbp_nrp_distributed_nest/requirements.txt
-
-echo done.
-echo
-- 
GitLab