From 4a7c3d971e3b773e76932cc3771f47138d457433 Mon Sep 17 00:00:00 2001
From: Emmanouil Angelidis <angelidis@fortiss.org>
Date: Thu, 21 Dec 2017 16:35:42 +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: I2ac773a039ba06d8873f52489ea0a3b7b95094fa
---
 setVersion.sh | 95 ---------------------------------------------------
 1 file changed, 95 deletions(-)
 delete mode 100755 setVersion.sh

diff --git a/setVersion.sh b/setVersion.sh
deleted file mode 100755
index 9cb52d1..0000000
--- a/setVersion.sh
+++ /dev/null
@@ -1,95 +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 project hbp_nrp_virtual_coach"
-    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_virtual_coach/hbp_nrp_virtual_coach/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-virtual-coach"
-    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_virtual_coach/hbp_nrp_virtual_coach/version.py
-
-subVersion $version hbp_nrp_virtual_coach/requirements.txt
-
-echo done.
-echo
-- 
GitLab