5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 14:06:21 +00:00

feat: reuse tasks

This commit is contained in:
f 2024-01-08 17:25:00 -03:00
parent baec1f93d0
commit ce2fd301b4
No known key found for this signature in database

View file

@ -32,7 +32,7 @@ tasks:
- "env"
- "credentials"
cmds:
- "{{.HAINISH}} bundle"
- "go-task bundle"
sources:
- "Gemfile"
generates:
@ -58,9 +58,9 @@ tasks:
cmds:
- "git lfs fetch"
- "git lfs checkout"
- "{{.HAINISH}} RAILS_ENV=production bundle exec rails webpacker:clobber"
- "{{.HAINISH}} RAILS_ENV=production bundle exec rails assets:precompile"
- "{{.HAINISH}} RAILS_ENV=production bundle exec rails assets:clean"
- "go-task bundle rails -- webpacker:clobber RAILS_ENV=production"
- "go-task bundle rails -- assets:precompile RAILS_ENV=production"
- "go-task bundle rails -- assets:clean RAILS_ENV=production"
sources:
- "package.json"
- "yarn.lock"
@ -102,7 +102,7 @@ tasks:
deps:
- "database"
cmds:
- "{{.HAINISH}} bundle exec rails db:prepare"
- "go-task rails -- db:prepare"
serve:
desc: "Run Rails development server"
deps:
@ -110,13 +110,35 @@ tasks:
- "gems"
cmds:
- ": == Development server running at https://panel.{{.SUTTY_WITH_PORT}} =="
- "{{.HAINISH}} bundle exec rails server"
- "go-task rails -- server"
status:
- "test -f tmp/pids/server.pid"
- "pgrep -F tmp/pids/server.pid"
yarn:
desc: "Yarn. Call with: go-task yarn -- arguments"
deps:
- "node-modules"
cmds:
- "{{.HAINISH}} yarn {{.CLI_ARGS}}"
bundle:
desc: "Bundle. Call with: go-task bundle -- arguments"
deps:
- "gems"
cmds:
- "{{.HAINISH}} bundle {{.CLI_ARGS}}"
rails:
desc: "Rails. Call with: go-task rails -- arguments"
deps:
- "prepare"
cmds:
- "go-task bundle -- exec rails {{.CLI_ARGS}}"
console:
desc: "Rails console"
cmds:
- "go-task rails -- console"
doc:
desc: "Build documentation"
deps:
- "gems"
cmds:
- "{{.HAINISH}} bundle exec yardoc -o public/doc app lib config db"
- "go-task bundle -- exec yardoc -o public/doc app lib config db"