[X2Go-Commits] [buildscripts] 01/01: bin/build-rpm-package: nope, version numbers must be numeric, so fake tumbleweed through 9999.
git-admin at x2go.org
git-admin at x2go.org
Thu Nov 16 02:37:16 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit 2a4e9db23c2f0abf108f05ea8f7ec7e5c0a854a6
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Nov 16 02:36:47 2017 +0100
bin/build-rpm-package: nope, version numbers must be numeric, so fake tumbleweed through 9999.
---
bin/build-rpm-package | 32 +++++++++++++++-----------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 6c736c4..6c16b36 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -588,7 +588,7 @@ sign_packages () {
typeset -i tmp_suse_minor_version="0"
if [[ "${codename}" = "tumbleweed" ]]; then
# Fake the version for tumbleweed builds.
- tmp_suse_major_version="tumbleweed"
+ tmp_suse_major_version="9999"
else
tmp_suse_major_version="$(get_generic_major_version "${codename}")"
@@ -662,19 +662,17 @@ sign_packages () {
wrap_suse_major_version () {
typeset major_version="${1:?"Error: no *SuSE major version passed to ${FUNCNAME}()."}"
- # Pass special code name "tumbleweed" right through.
- if [[ "${major_version}" != "tumbleweed" ]]; then
- # For any code name differently from "tumbleweed", we assume an integer-based version number.
- typeset -i tmp_major_version="${major_version}"
+ # tumbleweed has the fictive version number 9999 and should always be gettin
+ # passed-through directly.
+ typeset -i tmp_major_version="${major_version}"
- if [[ "${tmp_major_version}" -lt "10" ]]; then
- echo "Invalid OpenSuSE major version number (${tmp_major_version}), might not be less than 10."
- return "1"
- fi
+ if [[ "${tmp_major_version}" -lt "10" ]]; then
+ echo "Invalid OpenSuSE major version number (${tmp_major_version}), might not be less than 10."
+ return "1"
+ fi
- if [[ "${major_version}" -eq "42" ]]; then
- major_version="14"
- fi
+ if [[ "${major_version}" -eq "42" ]]; then
+ major_version="14"
fi
echo "${major_version}"
@@ -892,7 +890,7 @@ build_packages() {
typeset -i tmp_suse_minor_version="0"
if [[ "${l_CODENAME}" = "tumbleweed" ]]; then
# Fake the version for tumbleweed builds.
- tmp_suse_major_version="tumbleweed"
+ tmp_suse_major_version="9999"
else
tmp_suse_major_version="$(get_generic_major_version "${l_CODENAME}")"
@@ -919,7 +917,7 @@ build_packages() {
exit "1"
fi
- if [[ "${tmp_suse_major_version}" != "tumbleweed" ]]; then
+ if [[ "${tmp_suse_major_version}" != "9999" ]]; then
if [ "${tmp_suse_major_version}" -lt "14" ] ||
( [ "${tmp_suse_major_version}" -eq "14" ] && [ "${tmp_suse_minor_version}" -lt "2" ] ); then
legacy_release="1"
@@ -929,7 +927,7 @@ build_packages() {
if [ "${legacy_release}" -eq "1" ]; then
DOWNLOAD_URL="${OPENSUSE_DOWNLOAD_ARCHIVE_URL}"
else
- if [[ "${tmp_suse_major_version}" = "tumbleweed" ]]; then
+ if [[ "${tmp_suse_major_version}" = "9999" ]]; then
DOWNLOAD_URL="${OPENSUSE_DOWNLOAD_TUMBLEWEED_URL}"
else
DOWNLOAD_URL="${OPENSUSE_DOWNLOAD_URL}"
@@ -938,7 +936,7 @@ build_packages() {
DOWNLOAD_URL="$(sed -e "s/#VERSION#/${l_CODENAME}/" <<< "${DOWNLOAD_URL}")"
- if [[ "${tmp_suse_major_version}" != "tumbleweed" ]]; then
+ if [[ "${tmp_suse_major_version}" != "9999" ]]; then
if [ "${tmp_suse_major_version}" -gt "13" ]; then
DOWNLOAD_URL="$(sed -e 's_#LEAP#_leap/_' <<< "${DOWNLOAD_URL}")"
else
@@ -1200,7 +1198,7 @@ upload_packages() {
typeset -i tmp_suse_minor_version="0"
if [[ "${l_CODENAME}" = "tumbleweed" ]]; then
# Fake the version for tumbleweed builds.
- tmp_suse_major_version="tumbleweed"
+ tmp_suse_major_version="9999"
else
tmp_suse_major_version="$(get_generic_major_version "${l_CODENAME}")"
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list