-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
v8: update make-v8.sh to use git #9393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
c3deb42
3c54a7e
73e7c69
7d8effd
fd9fd66
0171280
60bcadb
971ef91
8c995f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,53 @@ | ||
| #!/bin/bash | ||
|
|
||
|
|
||
| git_origin=$(git config --get remote.origin.url | sed 's/.\+[\/:]\([^\/]\+\/[^\/]\+\)$/\1/') | ||
| git_branch=$(git rev-parse --abbrev-ref HEAD) | ||
| v8ver=${1:-v8} #default v8 | ||
| svn_prefix=https://github.com | ||
| svn_path="$svn_prefix/$git_origin/branches/$git_branch/deps/$v8ver" | ||
| #svn_path="$git_origin/branches/$git_branch/deps/$v8ver" | ||
| gclient_string="solutions = [{'name': 'v8', 'url': '$svn_path', 'managed': False}]" | ||
| if [ $# -eq 0 ]; then | ||
| # Default branch is master | ||
| BRANCH="master" | ||
| else | ||
| # eg: 5.4-lkgr | ||
| BRANCH="$1" | ||
| fi | ||
|
|
||
| # clean up if someone presses ctrl-c | ||
| trap cleanup INT | ||
|
|
||
| function cleanup() { | ||
| trap - INT | ||
|
|
||
| rm .gclient || true | ||
| rm .gclient_entries || true | ||
| rm -rf _bad_scm/ || true | ||
|
|
||
| #if v8ver isn't v8, move the v8 folders | ||
| #back to what they were | ||
| if [ "$v8ver" != "v8" ]; then | ||
| mv v8 $v8ver | ||
| mv .v8old v8 | ||
| if [ "$BRANCH" == "master" ]; then | ||
| echo "git cleanup if branch is master" | ||
|
||
| git reset --hard HEAD | ||
| git clean -fd >/dev/null | ||
|
||
| # Copy local files | ||
| rsync -a .v8old/ v8/ | ||
| fi | ||
| rm -rf .v8old | ||
| exit 0 | ||
| } | ||
|
|
||
| cd deps | ||
| echo $gclient_string > .gclient | ||
| if [ "$v8ver" != "v8" ]; then | ||
| mv v8 .v8old | ||
| mv $v8ver v8 | ||
| mv v8 .v8old | ||
|
|
||
| echo "Fetching v8 from chromium.googlesource.com" | ||
|
||
| fetch v8 | ||
| if [ "$?" -ne 0 ]; then | ||
| echo "V8 fetch failed" | ||
| exit 1 | ||
| fi | ||
| echo "V8 fetched" | ||
|
|
||
| cd v8 | ||
|
|
||
| echo "Checking out branch:$BRANCH" | ||
| if [ "$BRANCH" != "master" ]; then | ||
|
||
| git fetch | ||
| git checkout origin/$BRANCH | ||
| fi | ||
|
|
||
| echo "Sync dependencies" | ||
| gclient sync | ||
|
|
||
| cd .. | ||
| cleanup | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need a bit more doc with respect to this. I interpret this to be the v8 branch from which we are going to get the additional tools required to build. So while we may be testing Node.js in branch X, in this case the branch refers to the v8 branch to get the tools from. If my interpretation is correct, adding some explanation of that would be useful.