laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/28491 )
Change subject: coverity/prepare_source: add SRC_SKIP_FETCH/CLEAN ......................................................................
coverity/prepare_source: add SRC_SKIP_FETCH/CLEAN
When running these scripts locally while developing, it's more useful to not fetch the sources and clean the git repository instead. Add environment variables that allow doing this.
Change-Id: Id6d3cdabb776435df36c0145d93e514693062fca --- M coverity/prepare_source_Osmocom.sh 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/coverity/prepare_source_Osmocom.sh b/coverity/prepare_source_Osmocom.sh index 09608eb..452af3e 100755 --- a/coverity/prepare_source_Osmocom.sh +++ b/coverity/prepare_source_Osmocom.sh @@ -38,7 +38,12 @@ ; do
if [ -d $proj ]; then - (cd $proj && git fetch && git checkout -f -B master origin/master) + if [ -z "$SRC_SKIP_FETCH" ]; then + (cd $proj && git fetch && git checkout -f -B master origin/master) + fi + if [ -n "$SRC_CLEAN" ]; then + git -C "$proj" clean -ffxd + fi else git clone git://git.osmocom.org/$proj fi