Debian Codegraph @

BUILD.md

raw
1 Building fzf
2 ============
3
4 Build instructions
5 ------------------
6
7 ### Prerequisites
8
9 - Go 1.23 or above
10
11 ### Using Makefile
12
13 ```sh
14 # Build fzf binary for your platform in target
15 make
16
17 # Build fzf binary and copy it to bin directory
18 make install
19
20 # Build fzf binaries and archives for all platforms using goreleaser
21 make build
22
23 # Publish GitHub release
24 make release
25 ```
26
27 > [!WARNING]
28 > Makefile uses git commands to determine the version and the revision
29 > information for `fzf --version`. So if you're building fzf from an
30 > environment where its git information is not available, you have to manually
31 > set `$FZF_VERSION` and `$FZF_REVISION`.
32 >
33 > e.g. `FZF_VERSION=0.24.0 FZF_REVISION=tarball make`
34
35 > [!TIP]
36 > To build fzf with profiling options enabled, set `TAGS=pprof`
37 >
38 > ```sh
39 > TAGS=pprof make clean install
40 > fzf --profile-cpu /tmp/cpu.pprof --profile-mem /tmp/mem.pprof \
41 > --profile-block /tmp/block.pprof --profile-mutex /tmp/mutex.pprof
42 > ```
43
44 Running tests
45 -------------
46
47 ```sh
48 # Run go unit tests
49 make test
50
51 # Run integration tests (requires to be on tmux)
52 make itest
53
54 # Run a single test case
55 ruby test/runner.rb --name test_something
56 ```
57
58 Third-party libraries used
59 --------------------------
60
61 - [rivo/uniseg](https://github.com/rivo/uniseg)
62 - Licensed under [MIT](https://raw.githubusercontent.com/rivo/uniseg/master/LICENSE.txt)
63 - [mattn/go-shellwords](https://github.com/mattn/go-shellwords)
64 - Licensed under [MIT](http://mattn.mit-license.org)
65 - [mattn/go-isatty](https://github.com/mattn/go-isatty)
66 - Licensed under [MIT](http://mattn.mit-license.org)
67 - [tcell](https://github.com/gdamore/tcell)
68 - Licensed under [Apache License 2.0](https://github.com/gdamore/tcell/blob/master/LICENSE)
69 - [fastwalk](https://github.com/charlievieth/fastwalk)
70 - Licensed under [MIT](https://raw.githubusercontent.com/charlievieth/fastwalk/master/LICENSE)
71
72 License
73 -------
74
75 [MIT](LICENSE)