Skip to content

Commit 227cf50

Browse files
committed
Update README.md
Add information about Makefile in Makefile.
1 parent d9764ec commit 227cf50

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ GOCLEAN=$(GOCMD) clean
55
STRIPFLAGS=-ldflags="-s -w"
66
BINARY_FILE=GitLabBack
77

8+
ifeq ($(GOARCH),)
9+
GOARCH=amd64
10+
endif
11+
812
all: linux windows
913

1014
linux:
11-
GOOS=$@ $(GOBUILD) $(STRIPFLAGS) -o $(BINARY_FILE)_$@
15+
GOARCH=$(GOARCH) GOOS=$@ $(GOBUILD) $(STRIPFLAGS) -o $(BINARY_FILE)_$@_$(GOARCH)
1216

1317
windows:
14-
GOOS=$@ $(GOBUILD) $(STRIPFLAGS) -o $(BINARY_FILE)_$@
18+
GOARCH=$(GOARCH) GOOS=$@ $(GOBUILD) $(STRIPFLAGS) -o $(BINARY_FILE)_$@_$(GOARCH)
1519

1620
clean:
1721
$(GOCLEAN)
18-
rm -f $(BINARY_FILE)_linux
19-
rm -f $(BINARY_FILE)_windows
22+
rm -f $(BINARY_FILE)_*

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ ./GitLabBack
1818
$ ./GitLabBack -h
1919
Usage of GitLabBack:
2020
-config string
21-
Config path (default ".GitLabBack.json")
21+
Config path (default "~/.gitlabback")
2222
-dir string
2323
Backup directory
2424
-ssh
@@ -31,7 +31,12 @@ Usage of GitLabBack:
3131

3232
## Configuration
3333

34-
Default configuration file is ".GitLabBack.json".
34+
Default configuration file is ".gitlabback".
35+
36+
- baseURL Link to GitLab server (default: https://gitlab.com/)
37+
- token Private token
38+
- backupdir Your backup directory
39+
- ssh Clone with ssh (token is not needed)
3540

3641
```json
3742
{"baseURL":"","token":"YOUR TOKEN","backupdir":"","ssh":false}
@@ -44,3 +49,18 @@ If you have Golang 1.11.x+ installed, you can clone the repository and:
4449
```bash
4550
$ go build
4651
```
52+
53+
To ease the compilation process, the developer can use the provided Makefile.
54+
55+
```bash
56+
$ make # builds for linux and windows
57+
$ make linux # builds for linux
58+
$ make windows # builds for windows
59+
$ GOARCH=arm64 make linux # builds for arm64 linux
60+
```
61+
62+
Start off from fresh build.
63+
64+
```bash
65+
$ make clean # removes go binaries
66+
```

0 commit comments

Comments
 (0)