Do a fresh clone when syncing repos
We have been having issues while trying to rename
tags in the tf.org CI repo. We believe this is due to
the sync script using old copy of the repo.
To fix this do a fresh clone of the repos for now.
Might revert back this change once the issue is fixed.
Change-Id: I13eb516d0e3aa460e1e72350c8c9175443972765
Signed-off-by: Zelalem <zelalem.aweke@arm.com>
diff --git a/job/tf-sync-repos/sync.sh b/job/tf-sync-repos/sync.sh
index 4fe50a3..cf97cae 100755
--- a/job/tf-sync-repos/sync.sh
+++ b/job/tf-sync-repos/sync.sh
@@ -53,16 +53,14 @@
exit 1
;;
esac
-
- # Check if the repo clone exists in the job's workspace
- if [ ! -d $1 ]
- then
- # Fresh clone
- echo Cloning $repo_name from trustedfirmware.org...
- git clone $repo_url
- else
- echo Will use existing repo for "$repo_name"...
+
+ # Remove old tree if it exists
+ if [ -d $1 ]; then
+ rm -rf "$1"
fi
+ # Fresh clone
+ echo Cloning $repo_name from trustedfirmware.org...
+ git clone $repo_url
}
# Pull changes from tf.org to the local repo