From 5009a4e24310fa63d7a814ffa037dfc60b650248 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Fri, 8 Feb 2019 15:18:14 -0300 Subject: [PATCH] Better versioning for OBS --- build_scripts/OBS/get_source_version.sh | 14 ++++++++++++++ .../prepare_source_tarball.sh} | 0 2 files changed, 14 insertions(+) create mode 100755 build_scripts/OBS/get_source_version.sh rename build_scripts/{prepare_OBS_source_tarbal.sh => OBS/prepare_source_tarball.sh} (100%) diff --git a/build_scripts/OBS/get_source_version.sh b/build_scripts/OBS/get_source_version.sh new file mode 100755 index 000000000..59b171a58 --- /dev/null +++ b/build_scripts/OBS/get_source_version.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +SOURCE_VERSION_FILE="$( dirname "${BASH_SOURCE[0]}" )/../../Source_Version" + +VERSION_MAJOR="$(cat "${SOURCE_VERSION_FILE}" | awk -F. '{print $1}')" +VERSION_MAJOR="${VERSION_MAJOR:1}" + +VERSION_MINOR="$(cat "${SOURCE_VERSION_FILE}" | awk -F. '{print $2}')" + +VERSION_MINI="$(cat "${SOURCE_VERSION_FILE}" | awk -F. '{print $3}' | awk -F- '{print $1}')" + +VERSION_EXTRA="$(cat "${SOURCE_VERSION_FILE}" | awk -F- '{print "-"$2"-"$3"-OBS"}')" + +echo RS_MAJOR_VERSION=${VERSION_MAJOR} RS_MINOR_VERSION=${VERSION_MINOR} RS_MINI_VERSION=${VERSION_MINI} RS_EXTRA_VERSION=\"${VERSION_EXTRA}\" diff --git a/build_scripts/prepare_OBS_source_tarbal.sh b/build_scripts/OBS/prepare_source_tarball.sh similarity index 100% rename from build_scripts/prepare_OBS_source_tarbal.sh rename to build_scripts/OBS/prepare_source_tarball.sh