Skip to content

Commit 95547dc

Browse files
kopporsubhramitThiloteE
authored
Refine gg instructions (#570)
Co-authored-by: Subhramit Basu <subhramit.bb@live.in> Co-authored-by: ThiloteE <73715071+ThiloteE@users.noreply.github.com>
1 parent b30406a commit 95547dc

2 files changed

Lines changed: 36 additions & 25 deletions

File tree

en/.gitbook/assets/pr-13182.png

39.6 KB
Loading

en/contributing/README.md

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
We are really happy that you are interested in contributing to JabRef. Please take your time to look around here. We especially invite you to look into our [community members page](https://discourse.jabref.org/t/community-members/1868?u=koppor) where members introduce themselves.
44

5-
## I would like to try out a feature introduced at pull request.
5+
## I would like to try out a feature introduced at pull request
66

77
In JabRef, there are dozens of bug fixes and new features introduced using GitHub's pull request mechansim.
88
You can browse all at <https://github.com/JabRef/jabref/pulls>.
@@ -12,12 +12,11 @@ Improving on changes in active pull requests is much easier than fixing them lat
1212
If you are familiar with the command line on your OS, then it is very easy to try out pull requests and give feedback.
1313
In the following, we try to give a minimal set of installation instructions to be able to run a contribution from a fork.
1414

15-
Required tooling:
15+
### Required tooling
1616

17-
- [GitHubCLI](https://cli.github.com/) - A command-line client for GitHub. You can install it using the installer linked on their [homepage](https://cli.github.com/) or the commands given at the [installation hints](https://github.com/cli/cli#installation).
1817
- [`gg.cmd`](https://github.com/eirikb/gg) - A cross-platform and cross-architecture version manager. Download [`gg.cmd`](https://github.com/eirikb/gg/releases/latest/download/gg.cmd) and store it in your home (or `Downloads`) directory.
1918

20-
Initial setup:
19+
### Initial setup
2120

2221
- Windows:
2322
- Open PowerShell
@@ -27,9 +26,10 @@ Initial setup:
2726
- Get `gg.cmd`
2827
- `wget ggcmd.io -OutFile gg.cmd`
2928
- Clone JabRef
30-
- `./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CloneJabRef.java JabRef`
31-
- Make `gg.cmd` available in `JabRef` directory
32-
- `cd JabRef`
29+
- `.\gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CloneJabRef.java jabref`
30+
- When JBang asks you for trust, you can choose "Trust once" by pressing <kbd>1</kbd> and then <kbd>Enter</kbd>
31+
- Make `gg.cmd` available in `jabref` source directory
32+
- `cd jabref`
3333
- `move ..\gg.cmd .`
3434
- Linux:
3535
- Open a shell
@@ -40,34 +40,45 @@ Initial setup:
4040
- `wget ggcmd.io/gg.cmd`
4141
- Alternative: `curl -L ggcmd.io > gg.cmd`
4242
- Clone JabRef
43-
- `sh ./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CloneJabRef.java JabRef`
44-
- NOTE: You can also use the native git client: `git clone --recurse-submodules https://github.com/JabRef/jabref.git JabRef` for achieving the same result.
45-
- Make `gg.cmd` available in `JabRef` directory
46-
- `cd JabRef`
43+
- `sh ./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CloneJabRef.java jabref`
44+
- NOTE: You can also use the native git client: `git clone --recurse-submodules https://github.com/JabRef/jabref.git jabref` for achieving the same result.
45+
- Make `gg.cmd` available in `jabref` source directory
46+
- `cd jabref`
4747
- `mv ../gg.cmd .`
4848

49-
Now you are all set: You have a directory `JabRef` containing the recent updates and also `gg.cmd` which you will need later for executing a JabRef build.
49+
Now you are all set: You have a directory `jabref` containing the recent updates and also `gg.cmd` which you will need later for executing a JabRef build.
5050

51-
Try a branch:
51+
### Try a branch
5252

53-
1. `cd` into the `JabRef` directory: `cd c:\git-repositories\JabRef`
54-
2. Checkout out the pull request: `gh pr checkout 13111` - where `13111` is the PR number, in this case [pr#13111](https://github.com/JabRef/jabref/pull/13111).
55-
3. Compile and run JabRef: `gg.cmd gradle run :jabgui:run` (on Linux and macOS, you need to prefix it with `sh`: `gg.cmd gradle run :jabgui:run`). This will also download the necessary JDK and gradle distribution. On the first run, please give the system enough time to accommodate and wait until the JabRef window launches. Depending on your hardware, this may take minutes.
53+
1. `cd` into the `jabref` source directory: `cd c:\git-repositories\jabref`
54+
2. Checkout out the pull request: `sh ./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CheckoutPR.java 13182` - where `13182` is the PR number, in this case [pr#13182](https://github.com/JabRef/jabref/pull/13182).
5655

57-
Alternatives:
56+
- Instead of the number, you can also copy and paste the branch identifier output by GitHub: `sh ./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CheckoutPR.java Yubo-Cao:walkthrough`.
57+
![pr-13182](../.gitbook/assets/pr-13182.png)
5858

59-
1. You don't want to use `gg.cmd`: You have the project clone ready and have some Java JDK available: In the `JabRef` directory, execute `./gradlew run`.
60-
2. You don't want to use GitHub's `gh` tool: You can use the "usual" `git clone ...`, `git remote add ...`, `git fetch ...`, and `git checkout ...` commands to checkout a pull request from a fork.
59+
3. Compile and run JabRef: `sh ./gg.cmd gradle run :jabgui:run`. This will also download the necessary JDK and a gradle distribution. On the first run, please give the system enough time to accommodate and wait until the JabRef window launches. Depending on your hardware, this may take a few minutes.
6160

62-
**I would like to improve the help page.**
61+
On Windows, instead of `sh ./gg.cmd` use `.\gg.cmd`.
62+
63+
#### Alternatives
64+
65+
1. In case you don't want to use `gg.cmd`: You can install [JBang](https://www.jbang.dev/) for yourself and execute the commands directly.
66+
2. In case you don't want to use `JBang`:
67+
68+
- You have the project clone ready and have some Java JDK available: In the `JabRef` directory, execute `./gradlew run`.
69+
- Install `gh` (the [GitHub CLI](https://cli.github.com/), a command-line client for GitHub) by using the installer linked on their [homepage](https://cli.github.com/) or the commands given at the [installation hints](https://github.com/cli/cli#installation).
70+
71+
3. In case you don't want to use `gh`: You can use the "usual" `git clone ...`, `git remote add ...`, `git fetch ...`, and `git checkout ...` commands to checkout a pull request from a fork.
72+
73+
## I would like to improve the help page
6374

6475
Please see [How to Improve the Help Page](how-to-improve-the-help-page.md)
6576

66-
**I would like to help translating JabRef to another language.**
77+
## I would like to help to translate JabRef to another language
6778

6879
We encourage you to read about [translating the JabRef user interface](how-to-translate-the-ui.md).
6980

70-
**I would like to keep Wikipedia pages up-to-date.**
81+
## I would like to keep Wikipedia pages up-to-date
7182

7283
JabRef improves -- and Wikipedia pages should keep up!
7384

@@ -88,16 +99,16 @@ For changes in a specific language, go to the related page, and simply click on
8899

89100
If there is no page for your own language, you can easily create one.
90101

91-
**I have some cool feature requests.**
102+
## I have some cool feature requests
92103

93104
[Come discuss it!](http://discourse.jabref.org)
94105

95-
**Can I make a donation? How?**
106+
## Can I make a donation? How?
96107

97108
Donations keep us going! You can use PayPal or bank transfers. Your institution/company can contribute too, through bank transfer for example. All details are provided at [https://donations.jabref.org](https://donations.jabref.org).
98109

99110
Our team consists of volunteers. To provide better support, we are currently trying to get a funded developer on board. Please consider donating money!
100111

101-
**I would like to contribute code. How to?**
112+
## I would like to contribute code. How to?
102113

103114
Please head to our [Contributing Guide](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md#contributing).

0 commit comments

Comments
 (0)