Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit daae658

Browse files
chirayuktravis@travis-ci.org
authored and
travis@travis-ci.org
committed
chore(travis): custom merge pubspec.lock for g3v1x rebases
pubspec.lock changes will never really apply cleanly to g3v1x. What we wnat to capture, is whether Travis tests will pass if we apply the pubspec.yaml changes to the g3v1x branch and then regenerate the pubspec.lock file. This commit inserts a custom merge driver for git to ignore changes to the pubspec.lock file during merging to achieve this.
1 parent de82408 commit daae658

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/travis/setup.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ if [ "$USE_G3" = "YES" ]; then
99
git config --global user.name "AngularDart on Travis"
1010
git remote add upstream https://github.com/angular/angular.dart.git
1111
git fetch upstream
12+
# Set up a custom merge driver so that top level pubspec.lock conflicts for
13+
# do not fail the rebase.
14+
echo $'pubspec.lock merge=merge_pubspec_lock\n' >> .git/info/attributes
15+
cat >> .git/config <<"EOF"
16+
[merge "merge_pubspec_lock"]
17+
name = "Auto merge pubspec.lock conflicts by ignoring changes"
18+
driver = cp %O %A
19+
recursive = text
20+
EOF
1221
git rebase --onto upstream/g3v1x upstream/g3v1x-master
1322
fi
1423

0 commit comments

Comments
 (0)