Files
bitmagnet/Taskfile.yml
T
mgdigital c16f76130c Classifier rewrite (#213)
The classifier has been re-implemented and now uses a DSL allowing for full customisation. Several bugs have also been fixed.

- Closes https://github.com/bitmagnet-io/bitmagnet/issues/182
- Closes https://github.com/bitmagnet-io/bitmagnet/issues/70
- Closes https://github.com/bitmagnet-io/bitmagnet/issues/68
- Hopefully fixes https://github.com/bitmagnet-io/bitmagnet/issues/126
2024-04-21 16:24:10 +01:00

98 lines
2.5 KiB
YAML

version: "3"
tasks:
gen:
cmds:
- go generate ./...
- go run ./internal/dev gorm gen
- go run ./internal/gql/enums/gen/genenums.go
- go run ./internal/torznab/gencategories/gencategories.go
- go run github.com/99designs/gqlgen generate --config ./internal/gql/gqlgen.yml
- protoc --go_out=. ./internal/protobuf/bitmagnet.proto
- go run github.com/vektra/mockery/v2
- go run . classifier schema --format json > ./bitmagnet.io/schemas/classifier-0.1.json
lint:
cmds:
- golangci-lint run
test:
cmds:
- go test ./...
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 -- -c embedded
build-docsite:
dir: ./bitmagnet.io
cmds:
- bundle install
- bundle exec jekyll build
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=torrents_torrent_sources \
--table=key_values \
bitmagnet \
> export.sql
create-migration:
dir: ./migrations
cmds:
- goose -s create {{.NAME}} sql
vars:
NAME: migration
install-protoc:
cmds:
- |
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v{{.VERSION}}/protoc-{{.VERSION}}-{{.PLATFORM}}.zip
sudo unzip -o protoc-{{.VERSION}}-{{.PLATFORM}}.zip -d /usr/local bin/protoc
sudo unzip -o protoc-{{.VERSION}}-{{.PLATFORM}}.zip -d /usr/local 'include/*'
rm -f protoc-{{.VERSION}}-{{.PLATFORM}}.zip
vars:
VERSION: 23.4
PLATFORM: osx-x86_64