Implement trigger handlers
This commit is contained in:
parent
c290a5caea
commit
297d779ea4
4 changed files with 70 additions and 24 deletions
29
tryme.scm
29
tryme.scm
|
@ -4,18 +4,19 @@
|
|||
(ordo play)
|
||||
(ordo task))
|
||||
|
||||
(define (tryme)
|
||||
(play (local-connection)
|
||||
(list
|
||||
(task "Create test directory"
|
||||
(install-directory "/home/ray/ordo-test"))
|
||||
(task "Create test file from string content"
|
||||
(install-file "/home/ray/ordo-test/foo" #:content "Hello, world!\n"))
|
||||
(task "Create test file from local source"
|
||||
(install-file "/home/ray/ordo-test/bar" #:local-src "/home/ray/ordo-test/foo"))
|
||||
(task "Create test file from remote source"
|
||||
(install-file "/home/ray/ordo-test/baz" #:remote-src "/home/ray/ordo-test/bar"))
|
||||
(task "Expect this to fail"
|
||||
(install-file "/root/ordo.txt" #:content "Hello from Ordo!")))))
|
||||
(define test-play
|
||||
(play "Test play"
|
||||
#:connection (local-connection)
|
||||
#:tasks (list
|
||||
(task "Create test directory"
|
||||
(install-directory "/home/ray/ordo-test"))
|
||||
(task "Create test file from string content"
|
||||
(install-file "/home/ray/ordo-test/foo" #:content "Hello, world!\n"))
|
||||
(task "Create test file from local source"
|
||||
(install-file "/home/ray/ordo-test/bar" #:local-src "/home/ray/ordo-test/foo"))
|
||||
(task "Create test file from remote source"
|
||||
(install-file "/home/ray/ordo-test/baz" #:remote-src "/home/ray/ordo-test/bar")
|
||||
#:triggers `(frobnicate)))
|
||||
#:handlers `((frobnicate . ,(task "Frobnicate" (const #t))))))
|
||||
|
||||
(tryme)
|
||||
;;(run-play test-play)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue