1- # ` git-bundle-server ` : Manage a self-hosted bundle server
1+ # Git Bundle Server
22
33[ bundle-uris ] : https://github.com/git/git/blob/next/Documentation/technical/bundle-uri.txt
44[ codeowners ] : CODEOWNERS
@@ -15,26 +15,83 @@ This repository is under active development, and loves contributions from the
1515community :heart : . Check out [ CONTRIBUTING] [ contributing ] for details on getting
1616started.
1717
18- ## Cloning and Building
18+ ## Getting Started
1919
20- Be sure to clone inside the ` src ` directory of your ` GOROOT ` .
20+ ### Installing
2121
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+ You can also install the bundle server application from source on any Unix-based
57+ system. To install to the system root, clone the repository and run:
2458
2559``` ShellSession
26- $ go build -o . ./...
60+ $ make install
2761```
2862
29- ## Testing and Linting
63+ Note that you will likely be prompted for a password to allow installing to
64+ root-owned directories (e.g. ` /usr/local/bin ` ).
3065
31- To run the project's unit tests, navigate to the repository root directory and
32- run ` go test -v ./... ` .
66+ To install somewhere other than the system root, you can manually specify an
67+ ` INSTALL_ROOT ` when building the ` install ` target:
3368
34- To run the project's linter, navigate to the repository root directory and run
35- ` go vet ./... ` .
69+ ``` ShellSession
70+ $ make install INSTALL_ROOT=< /your/install/root>
71+ ```
72+
73+ ### Uninstalling
74+
75+ #### From Debian package
76+
77+ To uninstall ` git-bundle-server ` if it was installed from a Debian package, run:
78+
79+ ``` ShellSession
80+ $ sudo dpkg -r git-bundle-server
81+ ```
3682
37- ## Bundle Management through CLI
83+ #### Everything else
84+
85+ All other installation methods include an executable script that uninstalls all
86+ bundle server resources. On MacOS & Linux, run:
87+
88+ ``` ShellSession
89+ $ /usr/local/git-bundle-server/uninstall.sh
90+ ```
91+
92+ ## Usage
93+
94+ ### Repository management
3895
3996The following command-line interface allows you to manage which repositories are
4097being managed by the bundle server.
@@ -73,7 +130,7 @@ being managed by the bundle server.
73130* ` git-bundle-server delete <route> ` : Remove the configuration for the given
74131 ` <route> ` and delete its repository data.
75132
76- ## Web Server Management
133+ ### Web server management
77134
78135Independent of the management of the individual repositories hosted by the
79136server, you can manage the web server process itself using these commands:
@@ -85,6 +142,37 @@ server, you can manage the web server process itself using these commands:
85142Finally, if you want to run the web server process directly in your terminal,
86143for debugging purposes, then you can run ` git-bundle-web-server ` .
87144
145+ ## Local development
146+
147+ ### Building
148+
149+ > To avoid environment issues building and executing Go code, we recommend that
150+ > you clone inside the ` src ` directory of your ` GOROOT ` .
151+
152+ In the root of your cloned repository, you can build the ` git-bundle-server ` and
153+ ` git-bundle-web-server ` executables a few ways.
154+
155+ The first is to use GNU Make; from the root of the repository, simply run:
156+
157+ ``` ShellSession
158+ $ make
159+ ```
160+
161+ If you do not have ` make ` installed on your system, you may instead run (again
162+ from the repository root):
163+
164+ ``` ShellSession
165+ $ go build -o bin/ ./...
166+ ```
167+
168+ ### Testing and Linting
169+
170+ To run the project's unit tests, navigate to the repository root directory and
171+ run ` go test -v ./... ` .
172+
173+ To run the project's linter, navigate to the repository root directory and run
174+ ` go vet ./... ` .
175+
88176## License
89177
90178This project is licensed under the terms of the MIT open source license. Please
0 commit comments