File tree Expand file tree Collapse file tree 2 files changed +30
-21
lines changed Expand file tree Collapse file tree 2 files changed +30
-21
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ cctest: all
112112	@out/$(BUILDTYPE ) /$@ 
113113
114114v8 :
115- 	tools/make-v8.sh v8 
115+ 	tools/make-v8.sh
116116	$(MAKE )  -C deps/v8 $(V8_ARCH ) .$(BUILDTYPE_LOWER )  $(V8_BUILD_OPTIONS ) 
117117
118118test : all
Original file line number Diff line number Diff line change 11#! /bin/bash
22
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 
117
128#  clean up if someone presses ctrl-c
139trap  cleanup INT
1410
1511function  cleanup()  {
1612  trap  - INT
17- 
1813  rm .gclient ||  true 
1914  rm .gclient_entries ||  true 
2015  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
2822  exit  0
2923}
3024
3125cd  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
3635fi 
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" 
3744gclient sync
45+ 
46+ cd  ..
3847cleanup
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments