From f4a37a12ce27eb1f0506e0e69e39a26a2ea050d7 Mon Sep 17 00:00:00 2001 From: "Yen-Chin,Lee" Date: Sun, 12 Nov 2017 12:02:51 +0800 Subject: [PATCH 01/13] Create LICENSE file --- LICENSE | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cf1ab25 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to From d4a56f22d89e1404524e6cd324934eec8fb57476 Mon Sep 17 00:00:00 2001 From: Vincent Cantin Date: Sat, 24 Feb 2018 20:46:23 +0800 Subject: [PATCH 02/13] typo fixes --- resources/templates/md/posts/2018-02-24.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/templates/md/posts/2018-02-24.md b/resources/templates/md/posts/2018-02-24.md index ef90097..6a9285a 100644 --- a/resources/templates/md/posts/2018-02-24.md +++ b/resources/templates/md/posts/2018-02-24.md @@ -4,7 +4,7 @@ :tags ["clojure"] :toc true} -## ClojrueTW 活動 +## ClojureTW 活動 - [Lambda Island](https://lambdaisland.com/) 的作者 [plexus](https://twitter.com/plexus) 將於 2/25 於 Moz工寮為我們分享 Clojure 的 REPL 使用以及技巧,有興趣的人請到 [活動頁面](https://www.meetup.com/Clojure-tw/events/247467501/) 報名。 @@ -32,7 +32,7 @@ - 中國的 [Clojure 群組](http://clojure-china.org/t/meetup/789) 在最近的聚會分享了 [函数式语言Clojure在生产环境中的应用》](https://pan.baidu.com/s/1kWRs0Dp) 以及 [《Clojure实战——快速实现单页面应用》](https://pan.baidu.com/s/1o9K0H9S) 兩份投影片。 -## ClojureScrtipt +## ClojureScript - [A visual overview of the similarities and differences between ClojureScript and JavaScript](https://medium.freecodecamp.org/here-is-a-quick-overview-of-the-similarities-and-differences-between-clojurescript-and-javascript-c5bd51c5c007): 視覺化的圖片,來看看 ClojureScript 和 Javascript 相似以及不同的比較圖吧! @@ -42,4 +42,4 @@ - [7 Practical Tips for Cheating at Design](https://medium.com/refactoring-ui/7-practical-tips-for-cheating-at-design-40c736799886): 提供一些改善UI/UX 設計的技巧 -- [Visual CV](https://www.visualcv.com/) 提供了許多履歷的模板以及工具,讓你快速打照漂亮的履歷。 \ No newline at end of file +- [Visual CV](https://www.visualcv.com/) 提供了許多履歷的模板以及工具,讓你快速打照漂亮的履歷。 From 8eb5b6f8d67f9f20ee9214ec70d83b8bdf955e71 Mon Sep 17 00:00:00 2001 From: "Yen-Chin,Lee" Date: Mon, 21 May 2018 09:09:02 +0800 Subject: [PATCH 03/13] Update 2018-05-20.md --- resources/templates/md/posts/2018-05-20.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/md/posts/2018-05-20.md b/resources/templates/md/posts/2018-05-20.md index e11cb28..485a173 100644 --- a/resources/templates/md/posts/2018-05-20.md +++ b/resources/templates/md/posts/2018-05-20.md @@ -59,4 +59,4 @@ A workshop to practice building custom transducers through a series of small exe • 備註 -在活動正式開始之前,歡迎有任何問題到 ClojureTW 的臉書 (https://www.facebook.com/groups/Clojure.Taiwan/)/Telegram 頻道 (https://t.me/clojuretw)詢問。 \ No newline at end of file +在活動正式開始之前,歡迎有任何問題到 [ClojureTW 的臉書](https://www.facebook.com/groups/Clojure.Taiwan/)/[Telegram 頻道](https://t.me/clojuretw)詢問。 From bb3f522e0ef4bc6b030977b5ddc676497faf82cd Mon Sep 17 00:00:00 2001 From: "Yen-Chin,Lee" Date: Sun, 27 May 2018 23:03:25 +0800 Subject: [PATCH 04/13] little fix up --- resources/templates/md/posts/2018-05-27.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/md/posts/2018-05-27.md b/resources/templates/md/posts/2018-05-27.md index 480ec31..7a8821d 100644 --- a/resources/templates/md/posts/2018-05-27.md +++ b/resources/templates/md/posts/2018-05-27.md @@ -26,4 +26,4 @@ Clojure 目前已經有兩套工具支援使用者呼叫 GraalVM 的 `native-ima - [WebAssembly 对比 JavaScript 及其使用场景](https://github.com/Troland/how-javascript-works/blob/master/webassembly.md) - [A Year in Computer Vision](http://www.themtank.org/a-year-in-computer-vision): 對於機器視覺過去一年進展的概述 \ No newline at end of file +- [A Year in Computer Vision](http://www.themtank.org/a-year-in-computer-vision): 對於機器視覺過去一年進展的概述 From f7c1079726ec6c30cdb765f6c3987807e4872794 Mon Sep 17 00:00:00 2001 From: Vincent Cantin Date: Mon, 28 May 2018 08:40:58 +0800 Subject: [PATCH 05/13] Fixed typo --- resources/templates/md/posts/2018-05-27.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/md/posts/2018-05-27.md b/resources/templates/md/posts/2018-05-27.md index 7a8821d..efb8d76 100644 --- a/resources/templates/md/posts/2018-05-27.md +++ b/resources/templates/md/posts/2018-05-27.md @@ -14,7 +14,7 @@ - [Dynadoc](https://github.com/oakes/Dynadoc): 也是一套新的 Clojure/Script 文檔產生工具。 -## GrallVM +## GraalVM Clojure 目前已經有兩套工具支援使用者呼叫 GraalVM 的 `native-image` 命令將程式編譯成本地端的執行檔囉~ From 992cc275df15ca08361395eec338cdef3a48dc27 Mon Sep 17 00:00:00 2001 From: "Yen-Chin,Lee" Date: Sun, 2 Sep 2018 21:37:03 +0800 Subject: [PATCH 06/13] Update 2018-09-02.md --- resources/templates/md/posts/2018-09-02.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/md/posts/2018-09-02.md b/resources/templates/md/posts/2018-09-02.md index 58cbddc..77a92f7 100644 --- a/resources/templates/md/posts/2018-09-02.md +++ b/resources/templates/md/posts/2018-09-02.md @@ -10,8 +10,8 @@ # 其他 -- [[好文翻譯] 你在找的是 SRE 還是 DevOps?](https://medium.com/kkstream/%E5%A5%BD%E6%96%87%E7%BF%BB%E8%AD%AF-%E4%BD%A0%E5%9C%A8%E6%89%BE%E7%9A%84%E6%98%AF-sre-%E9%82%84%E6%98%AF-devops-2ded43c2852) +- [你在找的是 SRE 還是 DevOps?](https://medium.com/kkstream/%E5%A5%BD%E6%96%87%E7%BF%BB%E8%AD%AF-%E4%BD%A0%E5%9C%A8%E6%89%BE%E7%9A%84%E6%98%AF-sre-%E9%82%84%E6%98%AF-devops-2ded43c2852) - [2018 台北捷運房租地圖:在哪個捷運站附近租屋最便宜?](https://medium.com/@manzoo/2018-taipei-metro-rent-map-1ac22ae18fd7) -- [Jib, a Java Container Image Builder from Google](https://www.infoq.com/news/2018/08/jib): 目前 Jib 可以用在 Maven 以及 Gradle 上,對於 Clojure 的使用者而前,也可以透過這兩套系統去試試看 Jib。 \ No newline at end of file +- [Jib, a Java Container Image Builder from Google](https://www.infoq.com/news/2018/08/jib): 目前 Jib 可以用在 Maven 以及 Gradle 上,對於 Clojure 的使用者而前,也可以透過這兩套系統去試試看 Jib。 From 5ba9f8ca7ee1914b1d98a6eab6ee0ae8b15b63fe Mon Sep 17 00:00:00 2001 From: "Yen-Chin,Lee" Date: Sun, 14 Oct 2018 20:20:00 +0800 Subject: [PATCH 07/13] fix typo --- resources/templates/md/posts/2018-10-14.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/templates/md/posts/2018-10-14.md b/resources/templates/md/posts/2018-10-14.md index c09570e..781a76b 100644 --- a/resources/templates/md/posts/2018-10-14.md +++ b/resources/templates/md/posts/2018-10-14.md @@ -10,7 +10,7 @@ ## ClojureSctipt -- [Finding a Balance](https://www.infoq.com/presentations/clojurescript-choices): ClojureScript 主要維護者 Davbif Nolen 演講關於設計維護 ClojureScript 時候的一些抉擇。 +- [Finding a Balance](https://www.infoq.com/presentations/clojurescript-choices): ClojureScript 主要維護者 David Nolen 演講關於設計維護 ClojureScript 時候的一些抉擇。 ## 整理 @@ -22,4 +22,4 @@ * [吳恩達新書手稿完工,現在開放免費下載](https://mp.weixin.qq.com/s/3C3BvaXHqNo9MMXy-06ovg): 下載請到 https://www.mlyearning.org/ 填上 mail 等資訊即可 -* [JDK11正式發佈!史上最全所有特性完整解讀](https://mp.weixin.qq.com/s/Yz8V3inWN8uErKM-IdMFWQ): JDK11 已經出來囉~ \ No newline at end of file +* [JDK11正式發佈!史上最全所有特性完整解讀](https://mp.weixin.qq.com/s/Yz8V3inWN8uErKM-IdMFWQ): JDK11 已經出來囉~ From b43d538305604bb4b0d09363ee41e7cb5036f07e Mon Sep 17 00:00:00 2001 From: Vincent Cantin Date: Mon, 15 Oct 2018 17:15:32 +0800 Subject: [PATCH 08/13] Update 2018-10-14.md typo fixed --- resources/templates/md/posts/2018-10-14.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/templates/md/posts/2018-10-14.md b/resources/templates/md/posts/2018-10-14.md index 781a76b..fa51cfc 100644 --- a/resources/templates/md/posts/2018-10-14.md +++ b/resources/templates/md/posts/2018-10-14.md @@ -8,7 +8,7 @@ - [Clojure 1.10.0-RC1 釋出](https://groups.google.com/d/msg/clojure/sqUFgjDbi3k/UhCBQeiEAgAJ) -## ClojureSctipt +## ClojureScript - [Finding a Balance](https://www.infoq.com/presentations/clojurescript-choices): ClojureScript 主要維護者 David Nolen 演講關於設計維護 ClojureScript 時候的一些抉擇。 From e9840c31bfc3c2dac4ba96129ec862a5b4f30dfd Mon Sep 17 00:00:00 2001 From: Laurence Chen Date: Fri, 27 Dec 2019 11:57:17 +0800 Subject: [PATCH 09/13] 2019-12-27: done --- resources/templates/md/posts/2019-12-27.md | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 resources/templates/md/posts/2019-12-27.md diff --git a/resources/templates/md/posts/2019-12-27.md b/resources/templates/md/posts/2019-12-27.md new file mode 100644 index 0000000..763c6e8 --- /dev/null +++ b/resources/templates/md/posts/2019-12-27.md @@ -0,0 +1,25 @@ +{:title "ClojureTW 週報 2019-12-27" +:layout :post +:author "coldnew" +:tags ["clojure"] +:toc true} + +# ClojureTW + +* 今年我們幾乎每週三都會在伯朗咖啡聚會。具體聚會的地點及詳細時間請關注 [meetup](https://www.meetup.com/Clojure-tw/events/) 的通知。 + +# Real world use cases in Taiwan + +* [台北市市立聯合醫院](https://tpech.gov.taipei) + +市立聯合醫院的用藥單位的資料庫系統,會定期匯出 Excel 格式的檔案,讓藥師做查核、並且補足缺漏的欄位。然而, M$ 的 Wizard 卻因為某些不明的原因,無法順利匯入修改完畢的 Excel 。市立聯合醫院的藥師使用 Clojure 將 Excel 轉換成 SQL 語法之後,資料就可以順利匯入了。Excel 轉成 SQL 的 [Github](https://github.com/humorless/pharmacy) + +* [台灣連線](https://linecorp.com/zh-hant/) + +台灣連線的 Corporate Business Department 需要一個 Sales-Pipeline System 。這個系統是用 Clojure/Datomic 來實作的。 上線之後,韓國總公司的工程師看到這個 Clojure/Datomic 的實作,對 Clojure 表示讚嘆。 + +* [詠麗電子](https://invistron.com.tw) + +詠麗電子的網站,是用 Clojure + boot + perun 做成的純靜態網站,所以網頁非常流暢。網站的原始資料,不是由人工做輸入,而是透過 web scraping 的方式,從詠麗電子在 Taiwan Trade 的[舊站](https://invistron.en.taiwantrade.com/),直接撈回。Web Scraping 是用 Clojure + etaoin + clj-soup/clojure-soup 來實作的。Web Scraping 的 [Github](https://github.com/humorless/invistron-web-scraping) + + From 2248cb7235e30e42bd16a0fa31b6012efb9b7558 Mon Sep 17 00:00:00 2001 From: Yen-Chin Lee Date: Fri, 27 Dec 2019 12:20:32 +0800 Subject: [PATCH 10/13] Adding auto-generated CircleCI 2.0 config file --- .circleci/config.yml | 106 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..487d546 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,106 @@ +# This configuration was automatically generated from a CircleCI 1.0 config. +# It should include any build commands you had along with commands that CircleCI +# inferred from your project structure. We strongly recommend you read all the +# comments in this file to understand the structure of CircleCI 2.0, as the idiom +# for configuration has changed substantially in 2.0 to allow arbitrary jobs rather +# than the prescribed lifecycle of 1.0. In general, we recommend using this generated +# configuration as a reference rather than using it in production, though in most +# cases it should duplicate the execution of your original 1.0 config. +version: 2 +jobs: + build: + working_directory: ~/clojure-tw/weekly + parallelism: 1 + shell: /bin/bash --login + # CircleCI 2.0 does not support environment variables that refer to each other the same way as 1.0 did. + # If any of these refer to each other, rewrite them so that they don't or see https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables . + environment: + CIRCLE_ARTIFACTS: /tmp/circleci-artifacts + CIRCLE_TEST_REPORTS: /tmp/circleci-test-results + # In CircleCI 1.0 we used a pre-configured image with a large number of languages and other packages. + # In CircleCI 2.0 you can now specify your own image, or use one of our pre-configured images. + # The following configuration line tells CircleCI to use the specified docker image as the runtime environment for you job. + # We have selected a pre-built image that mirrors the build environment we use on + # the 1.0 platform, but we recommend you choose an image more tailored to the needs + # of each job. For more information on choosing an image (or alternatively using a + # VM instead of a container) see https://circleci.com/docs/2.0/executor-types/ + # To see the list of pre-built images that CircleCI provides for most common languages see + # https://circleci.com/docs/2.0/circleci-images/ + docker: + - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 + command: /sbin/init + steps: + # Machine Setup + # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + # The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out. + - checkout + # Prepare for artifact and test results collection equivalent to how it was done on 1.0. + # In many cases you can simplify this from what is generated here. + # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/' + - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS + # This is based on your 1.0 configuration file or project settings + - run: + working_directory: ~/clojure-tw/weekly + command: 'echo ''Asia/Taipei'' | sudo tee -a /etc/timezone; sudo dpkg-reconfigure -f noninteractive tzdata; sudo service mysql restart; sudo service postgresql restart; ' + - run: + working_directory: ~/clojure-tw/weekly + command: sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/jdk1.8.0" >> $BASH_ENV + # Dependencies + # This would typically go in either a build or a build-and-test job when using workflows + # Restore the dependency cache + - restore_cache: + keys: + # This branch if available + - v1-dep-{{ .Branch }}- + # Default branch if not + - v1-dep-master- + # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly + - v1-dep- + # This is based on your 1.0 configuration file or project settings + - run: wget -O lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein + - run: chmod 755 lein + - run: ./lein -v + - run: ./lein deps + - run: npm install + # The following line was run implicitly in your 1.0 builds based on what CircleCI inferred about the structure of your project. In 2.0 you need to be explicit about which commands should be run. In some cases you can discard inferred commands if they are not relevant to your project. + - run: if [ -z "${NODE_ENV:-}" ]; then export NODE_ENV=test; fi + - run: export PATH="~/clojure-tw/weekly/node_modules/.bin:$PATH" + - run: npm install + - run: lein deps + # Save dependency cache + - save_cache: + key: v1-dep-{{ .Branch }}-{{ epoch }} + paths: + # This is a broad list of cache paths to include many possible development environments + # You can probably delete some of these entries + - vendor/bundle + - ~/virtualenvs + - ~/.m2 + - ~/.ivy2 + - ~/.bundle + - ~/.go_workspace + - ~/.gradle + - ~/.cache/bower + # These cache paths were specified in the 1.0 config + - ~/.m2 + - ~/.lein + - ./node_modules + # Test + # This would typically be a build job when using workflows, possibly combined with build + # This is based on your 1.0 configuration file or project settings + - run: ./lein run + # Deployment + # Your existing circle.yml file contains deployment steps. + # The config translation tool does not support translating deployment steps + # since deployment in CircleCI 2.0 are better handled through workflows. + # See the documentation for more information https://circleci.com/docs/2.0/workflows/ + # Teardown + # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each + # Save test results + - store_test_results: + path: /tmp/circleci-test-results + # Save artifacts + - store_artifacts: + path: /tmp/circleci-artifacts + - store_artifacts: + path: /tmp/circleci-test-results From 4177115cee66e4a6066f49bb9b2d448771712b25 Mon Sep 17 00:00:00 2001 From: Yen-Chin Lee Date: Fri, 27 Dec 2019 12:36:40 +0800 Subject: [PATCH 11/13] circle-ci: try to fix "Unable to runt the job runner" issue Signed-off-by: Yen-Chin Lee --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 487d546..c76e907 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,7 @@ jobs: # https://circleci.com/docs/2.0/circleci-images/ docker: - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 - command: /sbin/init + steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each @@ -41,7 +41,7 @@ jobs: # This is based on your 1.0 configuration file or project settings - run: working_directory: ~/clojure-tw/weekly - command: 'echo ''Asia/Taipei'' | sudo tee -a /etc/timezone; sudo dpkg-reconfigure -f noninteractive tzdata; sudo service mysql restart; sudo service postgresql restart; ' + command: 'echo ''Asia/Taipei'' | sudo tee -a /etc/timezone; sudo dpkg-reconfigure -f noninteractive tzdata; ' - run: working_directory: ~/clojure-tw/weekly command: sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/jdk1.8.0" >> $BASH_ENV From 4a36a492b240084d32f1ce97577a4fc85c8cdb6c Mon Sep 17 00:00:00 2001 From: Yen-Chin Lee Date: Fri, 27 Dec 2019 12:40:49 +0800 Subject: [PATCH 12/13] remove circle-ci 1.0 config file Signed-off-by: Yen-Chin Lee --- circle.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 circle.yml diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 6ecc91e..0000000 --- a/circle.yml +++ /dev/null @@ -1,32 +0,0 @@ -general: - branches: - ignore: - - gh-pages - -machine: - timezone: Asia/Taipei - java: - version: oraclejdk8 - -dependencies: - pre: - - wget -O lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein - - chmod 755 lein - - ./lein -v - - ./lein deps - - npm install - cache_directories: - - ~/.m2 - - ~/.lein - -test: - override: - - ./lein run - -deployment: - publish: - branch: master - commands: - - ./lein run - - sed -i 's%https://${GH_TOKEN}@${GH_REF}%git@github.com:clojure-tw/weekly.git%g' deploy.sh - - ./deploy.sh From e85f026477ae4fcdc710c25036d621ed23c66e0d Mon Sep 17 00:00:00 2001 From: Yen-Chin Lee Date: Fri, 27 Dec 2019 13:01:36 +0800 Subject: [PATCH 13/13] Use ugly metho to fix for circle-ci 2.0 I'll migrate to github-action to replace the circle-ci. Signed-off-by: Yen-Chin Lee --- .circleci/config.yml | 36 ++++++++++++++++++++++++++++++++++++ deploy.sh | 1 - 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c76e907..53fdd8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,3 +104,39 @@ jobs: path: /tmp/circleci-artifacts - store_artifacts: path: /tmp/circleci-test-results + + deploy: + working_directory: ~/clojure-tw/weekly + docker: + - image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37 + steps: + - checkout + - restore_cache: + keys: + - v1-dependencies-{{ checksum "project.clj" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - run: + command: sudo update-alternatives --set java /usr/lib/jvm/jdk1.8.0/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/jdk1.8.0/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/jdk1.8.0" >> $BASH_ENV + # This is based on your 1.0 configuration file or project settings + - run: sudo apt-get install curl && curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs + - run: wget -O lein https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein + - run: chmod 755 lein + - run: ./lein -v + - run: ./lein deps + - run: npm install + - run: ./lein run + - run: sed -i 's%https://${GH_TOKEN}@${GH_REF}%git@github.com:clojure-tw/weekly.git%g' deploy.sh + - run: ./deploy.sh + +workflows: + version: 2 + ci: + jobs: + - build + - deploy: + filters: + branches: + only: master + requires: + - build \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index b520c77..f10dead 100755 --- a/deploy.sh +++ b/deploy.sh @@ -21,7 +21,6 @@ mkdir $OUT cp -R ./build/dist/* $OUT cp ./resources/public/weekly/*.xml $OUT cp ./resources/assets/google9d6ebc58aae14a99.html $OUT -cp -f circle.yml $OUT if hash html-minifier; then html-minifier --input-dir $OUT --output-dir $OUT --collapse-whitespace --file-ext html fi