1
- # ` git-bundle-server ` : Manage a self-hosted bundle server
1
+ # Git Bundle Server
2
2
3
3
[ bundle-uris ] : https://github.com/git/git/blob/next/Documentation/technical/bundle-uri.txt
4
4
[ codeowners ] : CODEOWNERS
@@ -15,26 +15,86 @@ This repository is under active development, and loves contributions from the
15
15
community :heart : . Check out [ CONTRIBUTING] [ contributing ] for details on getting
16
16
started.
17
17
18
- ## Cloning and Building
18
+ ## Getting Started
19
19
20
- Be sure to clone inside the ` src ` directory of your ` GOROOT ` .
20
+ ### Installing
21
21
22
- Once there, you can build the ` git-bundle-server ` and ` git-bundle-web-server `
23
- executables with
22
+ > :warning : Installation on Windows is currently unsupported :warning :
23
+
24
+ <!-- Common sources -->
25
+ [ releases ] : https://github.com/github/git-bundle-server/releases
26
+
27
+ #### Linux
28
+
29
+ Debian packages (for x86_64 systems) can be downloaded from the
30
+ [ Releases] [ releases ] page and installed with:
31
+
32
+ ``` bash
33
+ sudo dpkg -i /path/to/git-bundle-server_VVV-RRR_amd64.deb
34
+
35
+ # VVV: version
36
+ # RRR: package revision
37
+ ```
38
+
39
+ #### MacOS
40
+
41
+ Packages for both Intel and M1 systems can be downloaded from the
42
+ [ Releases] [ releases ] page (identified by the ` amd64 ` vs ` arm64 ` filename suffix,
43
+ respectively). The package can be installed by double-clicking the downloaded
44
+ file, or on the command line with:
45
+
46
+ ``` bash
47
+ sudo installer -pkg /path/to/git-bundle-server_VVV-RRR_AAA.pkg -target /
48
+
49
+ # VVV: version
50
+ # RRR: package revision
51
+ # AAA: platform architecture (amd64 or arm64)
52
+ ```
53
+
54
+ #### From source
55
+
56
+ > To avoid environment issues building and executing Go code, we recommend that
57
+ > you clone inside the ` src ` directory of your ` GOROOT ` .
58
+
59
+ You can also install the bundle server application from source on any Unix-based
60
+ system. To install to the system root, clone the repository and run:
24
61
25
62
``` ShellSession
26
- $ go build -o . ./...
63
+ $ make install
27
64
```
28
65
29
- ## Testing and Linting
66
+ Note that you will likely be prompted for a password to allow installing to
67
+ root-owned directories (e.g. ` /usr/local/bin ` ).
30
68
31
- To run the project's unit tests, navigate to the repository root directory and
32
- run ` go test -v ./... ` .
69
+ To install somewhere other than the system root, you can manually specify an
70
+ ` INSTALL_ROOT ` when building the ` install ` target:
33
71
34
- To run the project's linter, navigate to the repository root directory and run
35
- ` go vet ./... ` .
72
+ ``` ShellSession
73
+ $ make install INSTALL_ROOT=< /your/install/root>
74
+ ```
75
+
76
+ ### Uninstalling
77
+
78
+ #### From Debian package
79
+
80
+ To uninstall ` git-bundle-server ` if it was installed from a Debian package, run:
81
+
82
+ ``` ShellSession
83
+ $ sudo dpkg -r git-bundle-server
84
+ ```
36
85
37
- ## Bundle Management through CLI
86
+ #### Everything else
87
+
88
+ All other installation methods include an executable script that uninstalls all
89
+ bundle server resources. On MacOS & Linux, run:
90
+
91
+ ``` ShellSession
92
+ $ /usr/local/git-bundle-server/uninstall.sh
93
+ ```
94
+
95
+ ## Usage
96
+
97
+ ### Repository management
38
98
39
99
The following command-line interface allows you to manage which repositories are
40
100
being managed by the bundle server.
@@ -73,7 +133,7 @@ being managed by the bundle server.
73
133
* ` git-bundle-server delete <route> ` : Remove the configuration for the given
74
134
` <route> ` and delete its repository data.
75
135
76
- ## Web Server Management
136
+ ### Web server management
77
137
78
138
Independent of the management of the individual repositories hosted by the
79
139
server, you can manage the web server process itself using these commands:
@@ -85,6 +145,37 @@ server, you can manage the web server process itself using these commands:
85
145
Finally, if you want to run the web server process directly in your terminal,
86
146
for debugging purposes, then you can run ` git-bundle-web-server ` .
87
147
148
+ ## Local development
149
+
150
+ ### Building
151
+
152
+ > To avoid environment issues building and executing Go code, we recommend that
153
+ > you clone inside the ` src ` directory of your ` GOROOT ` .
154
+
155
+ In the root of your cloned repository, you can build the ` git-bundle-server ` and
156
+ ` git-bundle-web-server ` executables a few ways.
157
+
158
+ The first is to use GNU Make; from the root of the repository, simply run:
159
+
160
+ ``` ShellSession
161
+ $ make
162
+ ```
163
+
164
+ If you do not have ` make ` installed on your system, you may instead run (again
165
+ from the repository root):
166
+
167
+ ``` ShellSession
168
+ $ go build -o bin/ ./...
169
+ ```
170
+
171
+ ### Testing and Linting
172
+
173
+ To run the project's unit tests, navigate to the repository root directory and
174
+ run ` go test -v ./... ` .
175
+
176
+ To run the project's linter, navigate to the repository root directory and run
177
+ ` go vet ./... ` .
178
+
88
179
## License
89
180
90
181
This project is licensed under the terms of the MIT open source license. Please
0 commit comments