-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
66 lines (55 loc) · 1.41 KB
/
Copy pathTaskfile.yml
File metadata and controls
66 lines (55 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# https://taskfile.dev
version: '3'
includes:
dev: ./Taskfile_dev.yml
vars:
BINFILE: gitlab-backup
tasks:
default:
desc: "List tasks"
preconditions:
- test -f .git/hooks/pre-commit
cmds:
- task -a
check-before-commit:
desc: "Run checks before committing"
preconditions:
- test -f .git/hooks/pre-commit
deps:
- test
- snapshot
cmds:
- task: lint
lint:
desc: "Run golangci-lint"
cmds:
- golangci-lint run
test:
desc: "Run unit tests with race detection"
cmds:
- go test -count=2 -race ./...
build:
desc: "Build both binaries (gitlab-backup and gitlab-restore)"
cmds:
- CGO_ENABLED=0 go build -o gitlab-backup ./cmd/gitlab-backup
- CGO_ENABLED=0 go build -o gitlab-restore ./cmd/gitlab-restore
image:
desc: "Build and push Docker image"
deps:
- build
cmds:
- docker build --no-cache --build-arg VERSION=development . -t ghcr.io/sgaunet/gitlab-backup:latest
- docker push ghcr.io/sgaunet/gitlab-backup:latest
doc:
desc: "Start godoc documentation server"
cmds:
- echo http://localhost:6060
- godoc -http=:6060
snapshot:
desc: "Create snapshot release with goreleaser"
cmds:
- GITLAB_TOKEN="" goreleaser --clean --snapshot
release:
desc: "Create production release with goreleaser"
cmds:
- GITLAB_TOKEN="" goreleaser --clean