Some deployment adjustments
This commit is contained in:
parent
06b298c376
commit
a5f8ef702f
2 changed files with 11 additions and 6 deletions
|
@ -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'
|
||||||
|
|
|
@ -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)
|
||||||
|
(try
|
||||||
(do
|
(do
|
||||||
(save-image-from-url image-url raw-image-path)
|
(save-image-from-url image-url raw-image-path)
|
||||||
(sourceimage->fullscreen raw-image-path (image-name competition-id "fullscreen" 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)))))))
|
(sourceimage->thumb raw-image-path (image-name competition-id "thumbs" id number)))
|
||||||
|
(catch Exception e
|
||||||
|
(do
|
||||||
|
(print (str competition-id ": " id))
|
||||||
|
(print (.getMessage e)))))))))
|
||||||
|
|
Loading…
Reference in a new issue