Skip to content

Commit c383a6e

Browse files
authored
Merge pull request #295 from shivam71/SubModules
Adding netbeans and netbeans-l10n as submodules
2 parents 08f304a + c37d57a commit c383a6e

File tree

6 files changed

+31
-27
lines changed

6 files changed

+31
-27
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,7 @@ jobs:
5555
uses: actions/checkout@v4
5656
with:
5757
persist-credentials: false
58-
submodules: false
59-
60-
- name: Checkout NetBeans
61-
uses: actions/checkout@v4
62-
with:
63-
repository: apache/netbeans
64-
path: netbeans
65-
ref: 23
66-
67-
- name: Checkout NetBeans l10n
68-
uses: actions/checkout@v4
69-
with:
70-
repository: apache/netbeans-l10n
71-
path: netbeans-l10n
72-
ref: ece00239dc7a208fba60703c2256ffd818da1646
58+
submodules: true
7359

7460
- name: Apply NetBeans patches
7561
run: ant apply-patches

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
build/
2-
netbeans/
3-
netbeans-l10n/
42
.DS_STORE
53
.idea/
64
*.iml

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "netbeans-l10n"]
2+
path = netbeans-l10n
3+
url = https://github.com/apache/netbeans-l10n.git
4+
[submodule "netbeans"]
5+
path = netbeans
6+
url = https://github.com/apache/netbeans.git

BUILD.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,7 @@
3535
## Fetching and building the code
3636

3737
```bash
38-
$ git clone https://github.com/oracle/javavscode.git
39-
$ cd javavscode/
40-
$ git clone https://github.com/apache/netbeans.git
41-
$ cd netbeans/
42-
$ git checkout 23
43-
$ cd ..
44-
$ git clone https://github.com/apache/netbeans-l10n.git
45-
$ cd netbeans-l10n
46-
$ git checkout ece00239dc7a208fba60703c2256ffd818da1646 # head commit in master
47-
$ cd ..
38+
$ git clone --recurse-submodules https://github.com/oracle/javavscode.git
4839
# the following target requires git executable to be on PATH:
4940
$ ant apply-patches
5041
$ ant build-netbeans
@@ -107,3 +98,24 @@ $ npm_config_https_proxy=http://your.proxy.com:port ant test-vscode-ext
10798

10899
when executing the tests for the first time. That shall overcome the proxy
109100
and download an instance of `code` to execute the tests with.
101+
102+
## Working with submodules
103+
This project uses [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) . In particular netbeans and netbeans-l10n are submodules pointing to specific commits in their respective repositories .
104+
### Switching Branches
105+
Add the --recurse-submodules flag to the git checkout command to update the submodules during the checkout.
106+
```bash
107+
git checkout --recurse-submodules <branch_name>
108+
```
109+
Note:- Merging branches with submodules pointing to different commits can be tricky. Refer the [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for more details on the same.
110+
### Changing submodules versions
111+
```bash
112+
# Fetching changes from remote submodule repositories
113+
git submodule update --remote
114+
# Changing the submodule version
115+
cd netbeans
116+
git checkout <commit_hash>
117+
cd ..
118+
# Committing the submodule version
119+
git add netbeans
120+
git commit -m "Updated netbeans"
121+
```

netbeans

Submodule netbeans added at 2985f1f

netbeans-l10n

Submodule netbeans-l10n added at ece0023

0 commit comments

Comments
 (0)