Skip to content

Commit 5e10bd8

Browse files
committed
Add Makefile
1 parent b2b9aff commit 5e10bd8

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
TAG='patchmatch_test'
2+
BINARY_NAME=patchmatch
3+
INSTALL_PATH=/usr/local/bin
4+
5+
all: build
6+
7+
build:
8+
go build -o $(BINARY_NAME)
9+
10+
install: build
11+
install -m 755 $(BINARY_NAME) $(INSTALL_PATH)
12+
13+
clean:
14+
rm -f $(BINARY_NAME)
15+
16+
uninstall:
17+
rm -f $(INSTALL_PATH)/$(BINARY_NAME)
18+
19+
tests:
20+
docker build . --file test/Dockerfile --tag ${TAG}
21+
docker run -it ${TAG}
22+
docker image rm -f ${tag}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ index abcdef1..1234567 100644
5252
- `<regex>`: The regular expression pattern, following [RE2 Syntax](https://github.com/google/re2/wiki/Syntax)
5353
- `-k`: An optional flag that, if provided, keeps the changes that match the regex. Everything else is removed.
5454

55+
## Installation
56+
For OSX and Linux, simply run `make install`. This will add the binary to `/usr/local/bin`.
57+
You can compile it yourself using `make build`.
58+
Run tests using `make tests`.
5559

5660
## Which changes are removed?
5761
Because splitting changed lines is hard, Patchmatch removes blocks of changes entirely if they match the regular expression.

0 commit comments

Comments
 (0)