File tree Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Expand file tree Collapse file tree 2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,18 @@ GOCLEAN=$(GOCMD) clean
5
5
STRIPFLAGS=-ldflags ="-s -w"
6
6
BINARY_FILE =GitLabBack
7
7
8
+ ifeq ($(GOARCH ) ,)
9
+ GOARCH=amd64
10
+ endif
11
+
8
12
all : linux windows
9
13
10
14
linux :
11
- GOOS=$@ $(GOBUILD ) $(STRIPFLAGS ) -o $(BINARY_FILE ) _$@
15
+ GOARCH= $( GOARCH ) GOOS=$@ $(GOBUILD ) $(STRIPFLAGS ) -o $(BINARY_FILE ) _$@ _ $( GOARCH )
12
16
13
17
windows :
14
- GOOS=$@ $(GOBUILD ) $(STRIPFLAGS ) -o $(BINARY_FILE ) _$@
18
+ GOARCH= $( GOARCH ) GOOS=$@ $(GOBUILD ) $(STRIPFLAGS ) -o $(BINARY_FILE ) _$@ _ $( GOARCH )
15
19
16
20
clean :
17
21
$(GOCLEAN )
18
- rm -f $(BINARY_FILE ) _linux
19
- rm -f $(BINARY_FILE ) _windows
22
+ rm -f $(BINARY_FILE ) _*
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ $ ./GitLabBack
18
18
$ ./GitLabBack -h
19
19
Usage of GitLabBack:
20
20
-config string
21
- Config path (default " .GitLabBack.json " )
21
+ Config path (default " ~/.gitlabback " )
22
22
-dir string
23
23
Backup directory
24
24
-ssh
@@ -31,7 +31,12 @@ Usage of GitLabBack:
31
31
32
32
## Configuration
33
33
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)
35
40
36
41
``` json
37
42
{"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:
44
49
``` bash
45
50
$ go build
46
51
```
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
+ ```
You can’t perform that action at this time.
0 commit comments