-
Notifications
You must be signed in to change notification settings - Fork 5
/
Taskfile.yml
61 lines (53 loc) · 1.26 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
# https://taskfile.dev
---
version: "3"
dotenv:
- .env
vars:
RUBY_VERSION: 3.3.5
tasks:
init:
desc: Initialize project
deps:
- up
cmds:
- rbenv install --skip-existing {{.RUBY_VERSION}}
- rbenv local {{.RUBY_VERSION}}
- bundle install
- bundle exec rake bootstrap
down:
desc: Stop local services
cmds:
- docker compose down
release:
desc: Publish gem with GitHub
preconditions:
- sh: git diff HEAD --quiet
msg: Refusing to release with local uncommitted changes
vars:
VERSION:
sh: bundle exec ruby -e 'puts "v#{ReplicaPools::VERSION}"'
cmds:
- gh release create {{.VERSION}} --generate-notes
release:manual:
desc: Release gem
cmds:
- bundle exec rake release
test:
desc: Run test suite
deps:
- up
cmds:
- bundle exec rake spec
up:
desc: Start local services
cmds:
# Bring up local MySQL
- docker compose up --detach
# Wait for MySQL to be available
- silent: true
cmd: >-
gum spin --spinner minidot --title 'Waiting for MySQL...' -- bash -c
'until docker compose run --rm mysql mysql --host mysql -e "select 1" mysql ;
do sleep 1 ;
done'