summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-12 19:54:10 +0200
committerRémy Coutable <remy@rymai.me>2017-07-12 19:56:14 +0200
commit70b92c6ad97780eb3a57da5c44a9695b6dc7824f (patch)
treeef0f24105b56bbbcd0b0b0864b4a3bb8c85f15b2
parent9733b0a389498f7efaeff044bb7ca717d396b9a6 (diff)
downloadgitlab-ce-28781-streamline-developer-experience.tar.gz
Improve script/update a bit28781-streamline-developer-experience
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rwxr-xr-xscript/update15
1 files changed, 7 insertions, 8 deletions
diff --git a/script/update b/script/update
index fd59db734a2..655a265b77c 100755
--- a/script/update
+++ b/script/update
@@ -21,24 +21,24 @@ db_running()
fi
}
-
cd "$(dirname "$0")/.."
previous_head=$(git rev-parse HEAD)
current_branch=$(git rev-parse --abbrev-ref HEAD)
stash_created="false"
-git checkout -- Gemfile.lock db/schema.rb
+git checkout -- Gemfile.lock db/schema.rb locale/
if ! (clean_working_tree); then
echo "==> Stashing the following changes (retrieve them with 'git stash pop' if needed)..."
- git diff --name-status
- # git stash
+ diff=$(git diff --name-status)
+ echo $diff
+ git stash
stash_created="true"
fi
-echo "==> Checking out and pulling ${current_branch}..."
-git pull --ff-only origin "$current_branch"
+echo "==> Pulling (fast-forward only) $current_branch..."
+git pull --ff-only origin $current_branch
script/bootstrap
@@ -49,8 +49,7 @@ fi
if ! (test -z "$(git diff "$previous_head"...HEAD -- db/schema.rb 2> /dev/null | tail -n1)"); then
db_running
- echo "==> Updating db..."
+ echo "==> Running all database migrations to ensure everything is up to date..."
echo ""
- # run all database migrations to ensure everything is up to date.
bin/rake db:migrate db:test:prepare
fi