Skip to content
Snippets Groups Projects
Commit 6fa4c266 authored by Diego Wilson's avatar Diego Wilson
Browse files

Reintroduce 'force' option

This time skip checking for uncommited changes in automated builds

Change-Id: I076e5874055cd304780072a2c98c3d3eacd5ec76
parent 129ba5c2
No related branches found
No related tags found
No related merge requests found
......@@ -148,6 +148,14 @@ __patch_tree()
(
set -e
if branch ${PRJ} ; then
if [[ $1 != "force" && $(whoami) != "lnxbuild" ]]; then
if [[ -n $(git status --porcelain) ]]; then
echo "ERROR: You have uncommited changes in ${PRJ}"
echo "You may force overwriting these changes"
echo "with |source build/envsetup.sh force|"
exit 1
fi
fi
# Ensure the project is clean before applying patches to it
git reset --hard HEAD > /dev/null
git clean -dfx
......@@ -222,6 +230,7 @@ if [[ -z $1 ]]; then
else
case $1 in
clean) __abandon_tree ;;
force) __patch_tree force ;;
np) echo "Skipping patch tree step...";;
*) [[ -z "$PS1" ]] && __patch_tree || echo Error: Unknown command: $1
esac
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment