aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/osmocom-latest-packages.sh3
-rwxr-xr-xscripts/osmocom-next-packages.sh6
-rwxr-xr-xscripts/osmocom-nightly-packages.sh43
3 files changed, 45 insertions, 7 deletions
diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh
index 4d5b3f3..46d8a0f 100755
--- a/scripts/osmocom-latest-packages.sh
+++ b/scripts/osmocom-latest-packages.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# Generate source packages and upload them to OBS, for the latest feed.
. "$(dirname "$0")/common.sh"
. "$(dirname "$0")/common-obs.sh"
@@ -24,7 +25,7 @@ prepare() {
mkdir "$DEBSRCDIR"
cd "$TOP"
- osmo_obs_prepare_conflict "osmocom-latest" "osmocom-nightly"
+ osmo_obs_prepare_conflict "osmocom-latest" "osmocom-nightly" "osmocom-next"
}
get_last_tag() {
diff --git a/scripts/osmocom-next-packages.sh b/scripts/osmocom-next-packages.sh
new file mode 100755
index 0000000..aa9ab90
--- /dev/null
+++ b/scripts/osmocom-next-packages.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+# Generate source packages and upload them to OBS, for the next feed.
+. "$(dirname "$0")/common.sh"
+
+export FEED="next"
+$OSMO_CI_DIR/scripts/osmocom-nightly-packages.sh
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
index 40f2a6c..4a0bc80 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -1,16 +1,35 @@
#!/bin/bash
+# Generate source packages and upload them to OBS, for the nightly or next feed.
+# Environment variables:
+# * FEED: the binary package feed to upload to, this also controls the source branch that is used:
+# * "nightly": use "master" branch (default)
+# * "next": use "next" branch if it exists, otherwise use "master" branch
. "$(dirname "$0")/common.sh"
. "$(dirname "$0")/common-obs.sh"
set -e
set -x
-# OBS project name
-PROJ=network:osmocom:nightly
-
DT=$(date +%Y%m%d)
TOP=$(pwd)/$(mktemp -d nightly-3g_XXXXXX)
+# Set FEED and PROJ, based on the FEED env var
+parse_feed_proj() {
+ FEED="${FEED:-nightly}"
+ case "$FEED" in
+ nightly)
+ PROJ=network:osmocom:nightly
+ ;;
+ next)
+ PROJ=network:osmocom:next
+ ;;
+ *)
+ echo "unsupported feed: $FEED"
+ exit 1
+ ;;
+ esac
+}
+
### OBS build
prepare() {
# clean up the whole space
@@ -19,7 +38,14 @@ prepare() {
osc co "$PROJ"
cd "$REPO"
- osmo_obs_prepare_conflict "osmocom-nightly" "osmocom-latest"
+ case "$FEED" in
+ nightly)
+ osmo_obs_prepare_conflict "osmocom-nightly" "osmocom-latest" "osmocom-next"
+ ;;
+ next)
+ osmo_obs_prepare_conflict "osmocom-next" "osmocom-latest" "osmocom-nightly"
+ ;;
+ esac
}
get_last_tag() {
@@ -70,6 +96,10 @@ checkout() {
osmo_git_clone_date "$url"
fi
+ if [ "$FEED" = "next" ] && git -C "$name" show-branch remotes/origin/next >/dev/null 2>&1; then
+ git -C "$name" checkout next
+ fi
+
cd -
}
@@ -99,7 +129,7 @@ build() {
if [ "$changelog" = "commit" ] ; then
VER=$(get_commit_version)
- osmo_obs_add_debian_dependency "./debian/control" "osmocom-nightly"
+ osmo_obs_add_debian_dependency "./debian/control" "osmocom-$FEED"
dch -b -v "$VER" -m "Snapshot build"
git commit -m "$VER snapshot" debian/
fi
@@ -213,7 +243,7 @@ build_osmocom() {
osmo_obs_checkout_copy debian8 osmo-trx
osmo_obs_checkout_copy debian10 limesuite
- build osmocom-nightly
+ build osmocom-$FEED
build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)"
build limesuite-debian10 no_commit --git-upstream-tree="$(get_last_tag limesuite)"
build osmo-gsm-manuals
@@ -256,4 +286,5 @@ build_osmocom() {
post
}
+parse_feed_proj
build_osmocom