@@ -59,26 +59,35 @@ You only need the below if you plan to try and keep this library up to date with
59
59
### Keeping up to date
60
60
61
61
``` bash
62
- cd $GOPATH /src/github.com/youtube/vitess/go
62
+ shopt -s nullglob
63
+ VITESS=${GOPATH?} /src/github.com/youtube/vitess/go/
64
+ XWB1989=${GOPATH?} /src/github.com/xwb1989/sqlparser/
63
65
64
66
# Create patches for everything that changed
65
67
LASTIMPORT=1b7879cb91f1dfe1a2dfa06fea96e951e3a7aec5
66
- git format-patch $LASTIMPORT vt/sqlparser
67
- git format-patch $LASTIMPORT sqltypes
68
- git format-patch $LASTIMPORT bytes2
69
- git format-patch $LASTIMPORT hack
68
+ for path in ${VITESS?} /{ vt/sqlparser,sqltypes,bytes2,hack} ; do
69
+ cd ${path}
70
+ git format-patch ${ LASTIMPORT?} .
71
+ done ;
70
72
71
- # Apply them to the repo
72
- cd $GOPATH /src/github.com/xwb1989/sqlparser
73
- git am -p4 ../../youtube/vitess/go/* .patch
73
+ # Apply patches to the dependencies
74
+ cd ${XWB1989?}
75
+ git am --directory dependency -p2 ${VITESS?} /{sqltypes,bytes2,hack}/* .patch
76
+
77
+ # Apply the main patches to the repo
78
+ cd ${XWB1989?}
79
+ git am -p4 ${VITESS?} /vt/sqlparser/* .patch
74
80
75
81
# If you encounter diff failures, manually fix them with
76
82
patch -p4 < .git/rebase-apply/patch
77
83
...
78
84
git add name_of_files
79
85
git am --continue
80
86
81
- # Finally update the LASTIMPORT in this README.
87
+ # Cleanup
88
+ rm ${VITESS?} /{sqltypes,bytes2,hack}/* .patch ${VITESS?} /* .patch
89
+
90
+ # and Finally update the LASTIMPORT in this README.
82
91
```
83
92
84
93
### Fresh install
0 commit comments