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,86 @@ 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+ > 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:
2461
2562``` ShellSession
26- $ go build -o . ./...
63+ $ make install
2764```
2865
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 ` ).
3068
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:
3371
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+ ```
3685
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
3898
3999The following command-line interface allows you to manage which repositories are
40100being managed by the bundle server.
@@ -73,7 +133,7 @@ being managed by the bundle server.
73133* ` git-bundle-server delete <route> ` : Remove the configuration for the given
74134 ` <route> ` and delete its repository data.
75135
76- ## Web Server Management
136+ ### Web server management
77137
78138Independent of the management of the individual repositories hosted by the
79139server, 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:
85145Finally, if you want to run the web server process directly in your terminal,
86146for debugging purposes, then you can run ` git-bundle-web-server ` .
87147
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+
88179## License
89180
90181This project is licensed under the terms of the MIT open source license. Please
0 commit comments