aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-05-17 11:31:26 +0200
committerOliver Smith <osmith@sysmocom.de>2021-05-17 11:31:26 +0200
commit452ae4f41060903a9b188e816daa64d0c7e2c575 (patch)
treeea187c1878dca9d6dfab4c2fb4173617959e2b6d
parent00188531c2bcd7fc79062fc377c3169f0bd410e0 (diff)
OBS: move verify_feed to common
Prepare to move the 2021q1 feed from latest to nightly. Related: SYS#5370 Change-Id: I91e4c36d4a04d465fc9ccb933e8060511b7cd145
-rw-r--r--scripts/common-obs.sh14
-rwxr-xr-xscripts/osmocom-latest-packages.sh15
-rwxr-xr-xscripts/osmocom-nightly-packages.sh11
3 files changed, 21 insertions, 19 deletions
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index 34f2549..3a5c0c1 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -280,3 +280,17 @@ osmo_obs_get_commit_version() {
echo -n "$version"
}
+
+# Verify that $FEED is in $FEEDS
+osmo_obs_verify_feed() {
+ local i
+
+ for i in $FEEDS; do
+ if [ "$i" = "$FEED" ]; then
+ return
+ fi
+ done
+
+ echo "unsupported feed: $FEED"
+ exit 1
+}
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index d942e9d..31fc877 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -24,19 +24,6 @@ TOP=$(pwd)
DEBSRCDIR="$TOP/debsrc"
FEED="${FEED:-latest}"
-verify_feed() {
- local i
-
- for i in $FEEDS; do
- if [ "$i" = "$FEED" ]; then
- return
- fi
- done
-
- echo "unsupported feed: $FEED"
- exit 1
-}
-
### OBS build
prepare() {
# start with a checkout of the project
@@ -259,5 +246,5 @@ build_osmocom() {
osc ci -m "$FEED versions of $DT" --noservice
}
-verify_feed
+osmo_obs_verify_feed
build_osmocom
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
index ef2d7ef..62528c2 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -11,6 +11,11 @@
. "$(dirname "$0")/common.sh"
. "$(dirname "$0")/common-obs.sh"
+FEEDS="
+ next
+ nightly
+"
+
set -e
set -x
@@ -19,11 +24,6 @@ OSMO_OBS_CONFLICT_PKGVER="$OSMO_OBS_CONFLICT_PKGVER.$DT"
TOP=$(pwd)/$(mktemp -d nightly-3g_XXXXXX)
FEED="${FEED:-nightly}"
-if [ "$FEED" != "nightly" ] && [ "$FEED" != "next" ]; then
- echo "unsupported feed: $FEED"
- exit 1
-fi
-
### OBS build
prepare() {
# clean up the whole space
@@ -269,4 +269,5 @@ build_osmocom() {
post
}
+osmo_obs_verify_feed
build_osmocom