Skip to content

Commit ecbc272

Browse files
committed
we need a Makefile
.. and update README
1 parent 81ec38d commit ecbc272

4 files changed

Lines changed: 252 additions & 214 deletions

File tree

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
all: check git-good
2+
3+
check:
4+
pnpm run lint
5+
6+
clean:
7+
rm -rf dist
8+
9+
nodegit:
10+
pnpm run build:native
11+
12+
git-good: nodegit
13+
pnpm run build

README.md

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
# git-good
2+
23
Just a simple git client using electron and nodegit, focus on lightweight and performance
34

5+
Build for linux:
6+
7+
```bash
8+
pnpm install
9+
10+
# make sure nodegit dependencies are installed and build nodegit against node
11+
# pnpm does not clone with submodules so need to re-clone the nodegit repo
12+
rm -rf node_modules/nodegit && \
13+
mkdir node_modules/nodegit && \
14+
pushd node_modules/nodegit && { \
15+
git clone --recurse-submodules https://github.com/weedz/nodegit . && \
16+
# `--ignore-scripts` or something (gyp) will try to build
17+
pnpm install --ignore-scripts && \
18+
JOBS=max pnpm run rebuild \
19+
}; popd;
20+
21+
make
22+
pnpm start
23+
```
24+
425
## Build from source
526

627
Follow instructions from <https://github.com/nodegit/nodegit>.
728

829
### Linux
930

10-
```
11-
JOBS=max npm_config_openssl_bin_url=skip pnpm run electron-rebuild
12-
pnpm run dist
31+
```bash
32+
make
1333
```
1434

1535
### Arch Linux
@@ -19,15 +39,18 @@ PKGBUILD is available from <https://github.com/weedz/git-good-pkgbuild>.
1939
### Ubuntu/debian
2040

2141
To successfully build/link nodegit on linux you will need the following packages:
22-
```
42+
43+
```plain
2344
build-essential
2445
libssh-dev
2546
libkrb5-dev
2647
```
2748

2849
### Windows
2950

30-
Install <https://github.com/Microsoft/vcpkg> (C and C++ package manager for windows), needed for openssl dependency. Then install the `openssl` package with:
51+
Install <https://github.com/Microsoft/vcpkg> (C and C++ package manager for windows),
52+
needed for openssl dependency. Then install the `openssl` package with:
53+
3154
```bash
3255
> vcpgk install openssl
3356
```
@@ -37,7 +60,9 @@ Install <https://github.com/Microsoft/vcpkg> (C and C++ package manager for wind
3760
Follow instuctions here, <https://github.com/Microsoft/vcpkg>.
3861

3962
1. Clone to something like `C:\dev\vcpkg`. And run the "bootstrap" script.
40-
2. On windows we need `openssl@1.1.1`. In order to install this with `vcpkg` we need a `vcpkg.json` file. Create the following file in `C:\dev`:
63+
2. On windows we need `openssl@1.1.1`. In order to install this with `vcpkg`
64+
we need a `vcpkg.json` file. Create the following file in `C:\dev`:
65+
4166
```json
4267
{
4368
"dependencies": [
@@ -52,26 +77,26 @@ Follow instuctions here, <https://github.com/Microsoft/vcpkg>.
5277
]
5378
}
5479
```
80+
5581
(What is `builtin-baseline`, <https://learn.microsoft.com/en-us/vcpkg/users/examples/versioning.getting-started#builtin-baseline>)
5682
And run `.\vcpkg\vcpkg.exe install` in `C:\dev`.
57-
3. Make sure to use correct Visual Studio version, <https://github.com/nodejs/node-gyp#on-windows>. Does not build with msvs2022. Need msvs2019: `npm config set msvs_version 2019`
58-
4. Seems like the "postinstall" script for `nodegit` will fail on windows. But the `electron-rebuild` script will succeed.
83+
3. Make sure to use correct Visual Studio version, <https://github.com/nodejs/node-gyp#on-windows>.
84+
Does not build with msvs2022. Need msvs2019: `npm config set msvs_version 2019`
85+
4. Seems like the "postinstall" script for `nodegit` will fail on windows.
86+
But the `electron-rebuild` script will succeed.
5987

6088
## Start
6189

6290
Install node modules:
91+
6392
```bash
64-
$ pnpm install
93+
pnpm install
6594
```
6695

6796
Then run
68-
```bash
69-
$ pnpm run build
70-
```
71-
to bundle javascript-files and move assets to the `dist/` directory.
7297

73-
Now run
7498
```bash
75-
$ pnpm run dist
99+
pnpm run build
76100
```
77-
to compile all the native dependencies etc. You can run this with `CC="ccache gcc" JOBS=max pnpm run dist` (omit `CC="ccache gcc"` if you don't have `ccache` installed) to speed up compile time.
101+
102+
to bundle javascript-files and move assets to the `dist/` directory.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@
2222
],
2323
"license": "GPL-3.0-or-later",
2424
"devDependencies": {
25-
"@types/node": "^22.19.2",
25+
"@types/node": "^22.19.3",
2626
"@types/nodegit": "^0.28.9",
2727
"@weedzcokie/store": "^2.0.3",
2828
"electron": "38.7.2",
29-
"esbuild": "^0.27.1",
30-
"oxlint": "^1.32.0",
31-
"oxlint-tsgolint": "^0.8.5",
29+
"esbuild": "^0.27.2",
30+
"oxlint": "^1.35.0",
31+
"oxlint-tsgolint": "^0.10.0",
3232
"preact": "^10.28.0",
3333
"typescript": "^5.9.3"
3434
},
35+
"dependencies": {
36+
"nodegit": "github:weedz/nodegit#master"
37+
},
3538
"resolutions": {
3639
"@electron/get": "^4",
3740
"node-abi": "^4"
@@ -72,8 +75,5 @@
7275
"node": ">=22",
7376
"pnpm": ">=10"
7477
},
75-
"dependencies": {
76-
"nodegit": "github:weedz/nodegit#master"
77-
},
78-
"packageManager": "pnpm@10.25.0+sha512.5e82639027af37cf832061bcc6d639c219634488e0f2baebe785028a793de7b525ffcd3f7ff574f5e9860654e098fe852ba8ac5dd5cefe1767d23a020a92f501"
78+
"packageManager": "pnpm@10.26.1+sha512.664074abc367d2c9324fdc18037097ce0a8f126034160f709928e9e9f95d98714347044e5c3164d65bd5da6c59c6be362b107546292a8eecb7999196e5ce58fa"
7979
}

0 commit comments

Comments
 (0)