diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2023-07-18 15:44:35 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2024-10-07 11:02:08 +0200 |
commit | e62928816c6fb218588425a1d651784d7b4b408b (patch) | |
tree | 48343946f8d66a5477a9f4e73bf1260a1d2534e7 | |
parent | 47a85aab574fdc3a07e053a6af26b81e875d49f4 (diff) | |
download | gosc-e62928816c6fb218588425a1d651784d7b4b408b.tar.gz |
Correct URL for <scmsync> element.
-rwxr-xr-x | git-obranch | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git-obranch b/git-obranch index 2a2d367..ebd94bf 100755 --- a/git-obranch +++ b/git-obranch @@ -65,6 +65,8 @@ echo '.osc/' >> .git/info/exclude echo '_scmsync.obsinfo' >> .git/info/exclude # Set config git config "lfs.$(git remote get-url myproj)/info/lfs.locksverify" true +# Switch to factory branch, obs_state is just a record of the old state +git checkout --force -b factory myproj/factory # # SCM Sync settings OSC_META=$(mktemp /tmp/osc_meta_data.XXXXXX.xml) @@ -76,6 +78,6 @@ osc meta pkg "$DEVPRJ" "$PKG" >"$OSC_META" 2>/dev/null # (https://stackoverflow.com/a/1732454/164233) we can use # xmlstarlet instead. if ! grep '<scmsync>' "$OSC_META" >/dev/null 2>&1 ; then - sed -e "/<\/description>/a\ \ <scmsync>$(git remote get-url myproj)<\/scmsync>" \ + sed -e "/<\/package>/i\ \ <scmsync>https://src.opensuse.org/pool/$PKG<\/scmsync>" \ "$OSC_META" | osc meta pkg "$DEVPRJ" "$PKG" -F - fi |