@@ -14,10 +14,10 @@ These are the differences between JavaParser and StubParser:
1414
1515To see the [ diffs between the forks] ( https://stackoverflow.com/questions/4927519/diff-a-git-fork ) ,
1616enter the root directory of the StubParser and perform the following commands:
17- ``` bash
17+ ``` sh
1818git remote add upstream https://github.com/javaparser/javaparser
1919git fetch upstream
20- git diff upstream/master HEAD
20+ git diff $( git merge-base upstream/master HEAD ) HEAD
2121```
2222
2323## Updating from upstream JavaParser
@@ -28,36 +28,41 @@ StubParser. Only developers, not users, of StubParser need to do this.
2828### Preparation
2929
30301 . Fork [ the StubParser project] ( https://github.com/typetools/stubparser ) to your GitHub account.
31- 3 . Clone the repository, using * one* of the following two commands:
32- ``` bash
31+ 2 . Clone the repository, using * one* of the following two commands:
32+
33+ ``` sh
3334git clone
[email protected] :{user.name}/stubparser.git
3435git clone https://github.com/{user.name}/stubparser
3536```
3637
3738### Updating
3839
39401 . Update from StubParser.
40- ``` bash
41+ ``` sh
4142cd stubparser
4243git pull --ff-only https://github.com/typetools/stubparser
4344```
44452 . Find an appropriate [ tag name] ( https://github.com/javaparser/javaparser/tags ) :
45- ``` bash
46+ ``` sh
4647export TAG_NAME=javaparser-parent-3.24.7
4748```
48- 3 . Create and checkout a new branch, via the below or ` gnb updating-${TAG_NAME} ` :
49- ``` bash
49+ 3 . Create and checkout a new branch, via ONE of the below :
50+ ``` sh
5051git checkout -b updating-${TAG_NAME}
5152```
53+ ``` sh
54+ gnb updating-${TAG_NAME}
55+ cd ../stubparser-branch-updating-${TAG_NAME}
56+ ```
52574 . Pull the upstream of [ the JavaParser project] ( https://github.com/javaparser/javaparser ) .
53- ``` bash
58+ ``` sh
5459git pull https://github.com/javaparser/javaparser ${TAG_NAME}
5560```
56- 5 . Resolve conflicts if required and commit it (but don't push yet).
57- 6 . Update the StubParser version to the JavaParser version to the version number in the ` <finalName> ` block of ` javaparser-core/pom.xml ` .
58- (There should not be "-SNAPSHOT" there or in ` <version> ` in ` pom.xml ` .)
61+ 5 . If there are conflicts, resolve them and commit (but don't push yet).
62+ 6 . Update the StubParser version number in the ` <finalName> ` block of ` javaparser-core/pom.xml ` .
63+ (There should not be "-SNAPSHOT" there or in ` <version> ` in the top-level ` pom.xml ` .)
59647 . Run Maven tests in the root directory:
60- ``` bash
65+ ``` sh
6166./mvnw install test
6267```
6368If any tests fail, fix them before continuing.
@@ -118,7 +123,7 @@ Complete the release at https://oss.sonatype.org/#stagingRepositories.
118123Commit and push your changes to Checker Framework.
119124
12012514 . Push commits to your fork of StubParser.
121- ``` bash
126+ ``` sh
122127git push
123128```
124129GitHub Actions CI will not run for your branch.
@@ -144,16 +149,16 @@ not for minor bug fixes), because it breaks the `mvn javadoc:javadoc` command.
144149 ` stubparserJar = ` line.
145150
146151
147- <!--
148- Note that edits to this readme should be done via `docs/readme.md`.
149- Modifying this file directly within the root directory risks it being overwritten.
150- -->
151-
152152## Original JavaParser README
153153
154154The remainder of this README file is the original JavaParser README.
155155
156156
157+ <!--
158+ Note that edits to this readme should be done via `docs/readme.md`.
159+ Modifying this file directly within the root directory risks it being overwritten.
160+ -->
161+
157162# JavaParser
158163
159164[ ![ Maven Central] ( https://img.shields.io/maven-central/v/com.github.javaparser/javaparser-core.svg )] ( http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.github.javaparser%22%20AND%20a%3A%22javaparser-core%22 )
0 commit comments