Skip to content

Commit

Permalink
introduce helper script diff-upstream.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin committed Jan 23, 2016
1 parent 8ef7ef5 commit 2fae2c3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ CSS_PROPERTIES_COPY="$DEVTOOLS_ROOT/CSSProperties.in"
CSS_PROPERTIES_OUTPUT_FILE="$DEVTOOLS_ROOT/front_end/SupportedCSSProperties.js"
INSPECTOR_BACKEND_COMMANDS_OUTPUT_FILE="$DEVTOOLS_ROOT/front_end/InspectorBackendCommands.js"
SCRIPTS="$ROOT/scripts"
DIFF_WORK_DIR="$ROOT/../diff-upstream"

popd .
29 changes: 29 additions & 0 deletions scripts/diff-upstream.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -e

. "$(dirname "${BASH_SOURCE[0]}")/config.sh"

pushd "$ROOT"

MESSAGE=$(git log -1 HEAD --pretty=format:%s)

if [[ ! "$MESSAGE" == *"merge updates from official devtools"* ]]; then
echo "run ./scripts/squash-and-merge-official-updates.sh before diffing"
echo "unmerged changes would appear in the diff"
exit 1
fi

if [ -d "$DIFF_WORK_DIR" ] ; then
rm -rf "$DIFF_WORK_DIR"
fi

git clone "$ROOT" "$DIFF_WORK_DIR" --branch "$DEVTOOLS_BRANCH"

pushd "$DIFF_WORK_DIR"

cp -r "$DEVTOOLS_ROOT"/* .

gitup

popd

0 comments on commit 2fae2c3

Please sign in to comment.