| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9f0ef5a commit 1dfb5b5
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,7 +109,7 @@ cctest: all | |||
| 109 | 109 | @out/$(BUILDTYPE)/$@ | |
| 110 | 110 | ||
| 111 | 111 | v8: | |
| 112 | - tools/make-v8.sh v8 | ||
| 112 | + tools/make-v8.sh | ||
| 113 | 113 | $(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS) | |
| 114 | 114 | ||
| 115 | 115 | test: | cctest # Depends on 'all'. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,38 +1,47 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | ||
| 3 | - | ||
| 4 | - git_origin=$(git config --get remote.origin.url | sed 's/.\+[\/:]\([^\/]\+\/[^\/]\+\)$/\1/') | ||
| 5 | - git_branch=$(git rev-parse --abbrev-ref HEAD) | ||
| 6 | - v8ver=${1:-v8} #default v8 | ||
| 7 | - svn_prefix=https://github.com | ||
| 8 | - svn_path="$svn_prefix/$git_origin/branches/$git_branch/deps/$v8ver" | ||
| 9 | - #svn_path="$git_origin/branches/$git_branch/deps/$v8ver" | ||
| 10 | - gclient_string="solutions = [{'name': 'v8', 'url': '$svn_path', 'managed': False}]" | ||
| 3 | + # Get V8 branch from v8/include/v8-version.h | ||
| 4 | + MAJOR=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) | ||
| 5 | + MINOR=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) | ||
| 6 | + BRANCH=$MAJOR.$MINOR | ||
| 11 | 7 | ||
| 12 | 8 | # clean up if someone presses ctrl-c | |
| 13 | 9 | trap cleanup INT | |
| 14 | 10 | ||
| 15 | 11 | function cleanup() { | |
| 16 | 12 | trap - INT | |
| 17 | - | ||
| 18 | 13 | rm .gclient || true | |
| 19 | 14 | rm .gclient_entries || true | |
| 20 | 15 | rm -rf _bad_scm/ || true | |
| 21 | - | ||
| 22 | - #if v8ver isn't v8, move the v8 folders | ||
| 23 | - #back to what they were | ||
| 24 | - if [ "$v8ver" != "v8" ]; then | ||
| 25 | - mv v8 $v8ver | ||
| 26 | - mv .v8old v8 | ||
| 27 | - fi | ||
| 16 | + find v8 -name ".git" | xargs rm -rf || true | ||
| 17 | + echo "git cleanup" | ||
| 18 | + git reset --hard HEAD | ||
| 19 | + git clean -fdq | ||
| 20 | + # unstash local changes | ||
| 21 | + git stash pop | ||
| 28 | 22 | exit 0 | |
| 29 | 23 | } | |
| 30 | 24 | ||
| 31 | 25 | cd deps | |
| 32 | - echo $gclient_string > .gclient | ||
| 33 | - if [ "$v8ver" != "v8" ]; then | ||
| 34 | - mv v8 .v8old | ||
| 35 | - mv $v8ver v8 | ||
| 26 | + # stash local changes | ||
| 27 | + git stash | ||
| 28 | + rm -rf v8 | ||
| 29 | + | ||
| 30 | + echo "Fetching V8 from chromium.googlesource.com" | ||
| 31 | + fetch v8 | ||
| 32 | + if [ "$?" -ne 0 ]; then | ||
| 33 | + echo "V8 fetch failed" | ||
| 34 | + exit 1 | ||
| 36 | 35 | fi | |
| 36 | + echo "V8 fetched" | ||
| 37 | + | ||
| 38 | + cd v8 | ||
| 39 | + | ||
| 40 | + echo "Checking out branch:$BRANCH" | ||
| 41 | + git checkout remotes/branch-heads/$BRANCH | ||
| 42 | + | ||
| 43 | + echo "Sync dependencies" | ||
| 37 | 44 | gclient sync | |
| 45 | + | ||
| 46 | + cd .. | ||
| 38 | 47 | cleanup | |
| Back | FazBrowse Home | New Git URL |
0 commit comments