-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
86 lines (70 loc) · 2.42 KB
/
Taskfile.yml
File metadata and controls
86 lines (70 loc) · 2.42 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3'
tasks:
deploy:
cmds:
- task: tag
- task: tag-push
semver:
cmds:
- autogit semver
log:
cmds:
- git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit {{.CLI_ARGS}}
tag-latest:
cmds:
- git describe --tags
tag-all:
cmds:
- git fetch --all --tags # fetching remote tags
- git tag # list tags
build-version:
cmds:
- AUTOGIT_LOG_LEVEL=WARN autogit semver --publish > settings/version.txt || echo 'not installed autogit' > settings/version.txt
build:test:
cmds:
- mkdir -p dist
- rm dist/autogit-linux-amd64 | true
- GOOS=linux GOARCH=amd64 go build -v -o dist/autogit-linux-amd64 main.go
build:
cmds:
- task: build-version
- mkdir -p dist
- rm dist/* | true
- GOOS=linux GOARCH=amd64 go build -v -o dist/autogit-linux-amd64 main.go
- GOOS=linux GOARCH=arm64 go build -v -o dist/autogit-linux-arm64 main.go
# - GOOS=linux GOARCH=386 go build -v -o dist/autogit-linux-386 main.go
# - GOOS=linux GOARCH=arm go build -v -o dist/autogit-linux-arm main.go
- GOOS=windows GOARCH=amd64 go build -v -o dist/autogit-windows-amd64.exe main.go
# - GOOS=windows GOARCH=arm64 go build -v -o dist/autogit-windows-arm64.exe main.go
# - GOOS=windows GOARCH=386 go build -v -o dist/autogit-windows-386.exe main.go
# - GOOS=windows GOARCH=arm go build -v -o dist/autogit-windows-arm.exe main.go
- GOOS=darwin GOARCH=amd64 go build -v -o dist/autogit-macos-amd64 main.go
- GOOS=darwin GOARCH=arm64 go build -v -o dist/autogit-macos-arm64 main.go
test:
cmds:
- go test ./... -coverprofile=cover.out {{.CLI_ARGS}}
env:
AUTOGIT_PROJECT_FOLDER:
sh: echo "$(pwd)"
test:cover:
go tool cover -html=cover.out
doc-web:
cmds:
- godoc -http=:6060
changelog:
cmds:
- autogit changelog {{.CLI_ARGS}}
hook:dev:
cmds:
- sudo rm /usr/local/bin/autogit | true
- sudo ln -s {{.PWD}}/docs/dev/autogit /usr/local/bin/autogit
- sudo chmod 777 /usr/local/bin/autogit
- go run . hook activate --global
hook:prod:
cmds:
- sudo rm /usr/local/bin/autogit | true
- sudo ln -s {{.PWD}}/dist/autogit-linux-amd64 /usr/local/bin/autogit
- go run . hook activate --global
vars:
PWD:
sh: echo "$(pwd)"