-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathTaskfile.yml
163 lines (136 loc) · 3.16 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
version: "3"
tasks:
gen:
cmds:
- task gen-go
- task gen-gorm
- task gen-torznab-categories
- task gen-gql-enums
- task gen-gql
- task gen-protoc
- task gen-mockery
- task gen-classifier-schema
- task gen-webui-graphql
gen-go:
cmds:
- go generate ./...
gen-gorm:
cmds:
- go run ./internal/dev gorm gen
gen-torznab-categories:
cmds:
- go run ./internal/torznab/gencategories/gencategories.go
gen-gql-enums:
cmds:
- go run ./internal/gql/enums/gen/genenums.go
gen-gql:
cmds:
- go run github.com/99designs/gqlgen generate --config ./internal/gql/gqlgen.yml
gen-protoc:
cmds:
- protoc --go_out=. ./internal/protobuf/bitmagnet.proto
gen-mockery:
cmds:
- go run github.com/vektra/mockery/v2
gen-classifier-schema:
cmds:
- go run . classifier schema --format json > ./bitmagnet.io/schemas/classifier-0.1.json
gen-webui-graphql:
dir: ./webui
cmds:
- npm run graphql:codegen
i18n-extract:
dir: ./webui
cmds:
- npm run i18n:extract
lint:
cmds:
# Removing golang-ci lint as the Nix package is currently broken
# - task lint-golangci
- task lint-webui
- task lint-prettier
lint-golangci:
cmds:
- golangci-lint run --timeout=10m
lint-webui:
dir: ./webui
cmds:
- npm run lint
lint-prettier:
cmds:
- prettier --check .
test:
cmds:
- task test-go
- task test-webui
test-go:
cmds:
- go test -v ./...
test-webui:
dir: ./webui
cmds:
- npm test
env:
CHROME_BIN: chromium
migrate:
cmds:
- go run ./internal/dev migrate up
build:
cmds:
- go build -ldflags "-X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)"
build-webui:
dir: ./webui
cmds:
- npm run build
build-docsite:
dir: ./bitmagnet.io
cmds:
- bundle install
- bundle exec jekyll build
install-webui:
dir: ./webui
cmds:
- npm ci
serve-webui:
dir: ./webui
cmds:
- ng serve --host {{.HOST}} --port {{.PORT}}
vars:
HOST: localhost
PORT: 3334
serve-docsite:
dir: ./bitmagnet.io
cmds:
- bundle exec jekyll serve --host {{.HOST}} --port {{.PORT}} --livereload
vars:
HOST: localhost
PORT: 3335
export-data:
cmds:
- |
pg_dump \
--column-inserts \
--data-only \
--on-conflict-do-nothing \
--rows-per-insert=1000 \
--table=metadata_sources \
--table=content \
--table=content_attributes \
--table=content_collections \
--table=content_collections_content \
--table=torrent_sources \
--table=torrents \
--table=torrent_files \
--table=torrent_hints \
--table=torrent_contents \
--table=torrent_tags \
--table=torrents_torrent_sources \
--table=key_values \
bitmagnet \
> export.sql
create-migration:
dir: ./migrations
cmds:
- goose -s create {{.NAME}} sql
vars:
NAME: migration