diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-08-17 16:09:43 +0200 |
---|---|---|
committer | osmith <osmith@sysmocom.de> | 2022-08-18 13:18:25 +0000 |
commit | a8536d884774e2297a3eb90b6f258911f8e43234 (patch) | |
tree | 9d854b679c6f201f585bd4758ace7d06adf83136 | |
parent | fb1f39e0c9bf2293bb68ffaa982fab6fa413d825 (diff) |
obs: prepend origin/ to branch selected with -b
Doing this makes more sense and is less prone to errors.
Change-Id: I2fa9c457e0e17cdd1b5946dc27ae232ec13bfa25
-rw-r--r-- | scripts/obs/README | 6 | ||||
-rw-r--r-- | scripts/obs/lib/srcpkg.py | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/scripts/obs/README b/scripts/obs/README index d9499d8..67d2a2b 100644 --- a/scripts/obs/README +++ b/scripts/obs/README @@ -88,11 +88,9 @@ Build and upload source package to OBS -------------------------------------- cd ~/osmo-dev/src/osmo-ci/scripts/obs/ - ./update_obs_project.py -b origin/neels/pkg home:nhofmeyr:test osmo-hnbgw + ./update_obs_project.py -b neels/pkg home:nhofmeyr:test osmo-hnbgw -The -b option chooses a custom branch to build. It is important to prepend -'origin/' to 'your/branch', so that repeated dev cycles use the latest branch -tip that was fetched instead staying stuck on the local branch. +The -b option chooses a custom branch to build. See results diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py index 92c3aa7..baf64a9 100644 --- a/scripts/obs/lib/srcpkg.py +++ b/scripts/obs/lib/srcpkg.py @@ -10,7 +10,7 @@ import lib.rpm_spec def checkout_for_feed(project, feed, branch=None): """ checkout a commit, either latest tag or master or 20YY branch """ if branch: - lib.git.checkout(project, branch) + lib.git.checkout(project, f"origin/{branch}") elif feed == "latest": lib.git.checkout_latest_tag(project) elif feed == "nightly": |