Some deployment adjustments

This commit is contained in:
Aaron Mueller 2014-09-28 17:54:44 +02:00
parent 06b298c376
commit a5f8ef702f
2 changed files with 11 additions and 6 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
rsync -uva --delete --exclude=.git --exclude=target . clojurecup@luduverse.clojurecup.com:/home/clojurecup/luduverse rsync -uva --delete --exclude=.git --exclude=target --exclude=resources/ld-images . clojurecup@luduverse.clojurecup.com:/home/clojurecup/luduverse
ssh clojurecup@luduverse.clojurecup.com 'cd /home/clojurecup/luduverse && /home/clojurecup/bin/lein immutant deploy' ssh clojurecup@luduverse.clojurecup.com 'cd /home/clojurecup/luduverse && /home/clojurecup/bin/lein immutant deploy'

View file

@ -13,7 +13,7 @@
(defn base-path (defn base-path
;([] (str (noir-io/resource-path) "img")) ;([] (str (noir-io/resource-path) "img"))
([] "resources/img") ([] "resources/ld-images")
([competition-id] (str (base-path) "/ld" competition-id "/"))) ([competition-id] (str (base-path) "/ld" competition-id "/")))
(defn create-file-structure [competition-id] (defn create-file-structure [competition-id]
@ -58,7 +58,12 @@
number (last (first (re-seq #"shot([0-9]+)" image-url))) number (last (first (re-seq #"shot([0-9]+)" image-url)))
raw-image-path (image-name competition-id "raw" id number)] raw-image-path (image-name competition-id "raw" id number)]
(if-not (fs/exists? raw-image-path) (if-not (fs/exists? raw-image-path)
(do (try
(save-image-from-url image-url raw-image-path) (do
(sourceimage->fullscreen raw-image-path (image-name competition-id "fullscreen" id number)) (save-image-from-url image-url raw-image-path)
(sourceimage->thumb raw-image-path (image-name competition-id "thumbs" id number))))))) (sourceimage->fullscreen raw-image-path (image-name competition-id "fullscreen" id number))
(sourceimage->thumb raw-image-path (image-name competition-id "thumbs" id number)))
(catch Exception e
(do
(print (str competition-id ": " id))
(print (.getMessage e)))))))))