#lang racket-makefile

(require git
         package-zipper)

(target all
        (displayln "use (make clean) or (make package)"))

(target clean
        (for-each (λ (f) (displayln f) (rm-f f)) (list-files "." #px"([.]bak|~)$" #:recursive #t))
        (for-each (λ (d) (displayln d) (rm-rf d)) (list-dirs "." #px"(compiled|doc)$" #:recursive #t))
        (for-each (λ (f) (displayln f) (rm-f f)) (list-files "scrbl" #px"[.](css|js|html)$"))
        )

(target package
        (deps clean)
        (zip-package))

(target main
        (displayln "Committing pending changes")
        (git 'add '-A)
        (git 'commit (git-prompt))
        (displayln "Switching back to main branch")
        )



