-
Notifications
You must be signed in to change notification settings - Fork 38
/
Taskfile.yml
50 lines (48 loc) · 1.45 KB
/
Taskfile.yml
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
---
version: '3'
env:
GIT_CHGLOG_URL: https://github.com/git-chglog/git-chglog/releases/download
GIT_CHGLOG_VERSION: v0.15.1/git-chglog_0.15.1_linux_amd64.tar.gz
CHANGELOG_NEXT_TAG: 7.5.2
tasks:
changelog:
cmds:
- |
git fetch -p -P
curl \
-L ${GIT_CHGLOG_URL}/${GIT_CHGLOG_VERSION} \
-o /tmp/git-chglog.tar.gz
tar -xvf /tmp/git-chglog.tar.gz -C /tmp
chmod +x /tmp/git-chglog
/tmp/git-chglog \
-o docs/CHANGELOG.md \
--config configs/chglog/config.yml \
--next-tag ${CHANGELOG_NEXT_TAG}
sed -i "s|\/\([0-9]\+\.\)\{2\}[0-9]\+|/${CHANGELOG_NEXT_TAG}|g" \
./docs/quickstarts/snippets/n3dr/DOWNLOAD.md
sed -i "s|version:.*|version: ${CHANGELOG_NEXT_TAG}|" \
./build/package/snap/snapcraft.yaml
integration-tests:
cmds:
- |
go test \
-coverprofile=coverage.cov \
--tags=integration \
-v \
-count=1 \
--cover \
-race \
-p=4 \
./...
go tool cover -func=coverage.cov > coverage-functions.out
go tool cover -html=coverage.cov -o coverage.html
open ./coverage.html
lint:
cmds:
- |
go install github.com/golangci/golangci-lint/cmd/[email protected]
~/go/bin/golangci-lint --version
~/go/bin/golangci-lint run \
-v \
--timeout 2m30s \
--config .golangci.yml