Created
December 2, 2010 22:48
-
-
Save zk/726255 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; project.clj | |
(defproject caketest "0.0.1-SNAPSHOT" | |
:description "TODO: add summary of your project" | |
:dependencies [[clojure "1.2.0"] | |
[clojure-contrib "1.2.0"] | |
[clj-ssh "0.2.0"]] | |
:dev-dependencies [[swank-clojure "1.2.0"] | |
[clj-ssh "0.2.0"]] | |
:deploy {:hosts ["jd.getdillo.com"] | |
:username "root" | |
:repo "git@github.com:zkim/caketest.git"} | |
:main caketest.core) | |
;; tasks.clj | |
(ns tasks | |
(:use [cake] | |
[cake core] | |
[caketest.swish])) | |
(defn deploy-caketest [] | |
(println (ssh "cake kill -9" :dir "~/caketest")) | |
(println (ssh "rm -rf ./caketest" :dir "~/")) | |
(println (ssh "git clone git@github.com:zkim/caketest.git") :dir "~/") | |
(println (ssh "cake deps" :dir "~/caketest")) | |
(println (ssh "cake eval \"(use 'caketest.core) (stuff)\"") :dir "~/caketest")) | |
(undeftask stuff) | |
(deftask stuff | |
(with-server {:host "some-host" :username "root"} | |
(deploy-caketest))) | |
;;caketest.swish ns | |
(ns caketest.swish | |
(:use [clojure.contrib.string :only (as-str)] | |
[clojure.contrib.pprint]) | |
(:require [clj-ssh.ssh :as cljssh] | |
[clojure.contrib.logging :as logging] | |
[clojure.string :as string]) | |
(:import [clj-ssh.ssh.SshLogger])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment