File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11version : 2
22jobs :
3- test_clj_9 :
4- working_directory : ~/datascript
5- docker :
6- - image : circleci/clojure:lein
7- steps :
8- - checkout
9- - restore_cache :
10- key : dependency-cache-{{ checksum "project.clj" }}
11- - run : lein with-profile 1.9 test-clj
12- - save_cache :
13- key : dependency-cache-{{ checksum "project.clj" }}
14- paths :
15- - ~/.m2
16-
173 test_clj_10 :
184 working_directory : ~/datascript
195 docker :
@@ -61,7 +47,6 @@ workflows:
6147 version : 2
6248 everything :
6349 jobs :
64- - test_clj_9
6550 - test_clj_10
6651 - build_cljs
6752 - test_cljs :
Original file line number Diff line number Diff line change 77 :url " https://github.com/tonsky/datascript"
88
99 :dependencies [
10- [org.clojure/clojure " 1.10.0 " :scope " provided" ]
10+ [org.clojure/clojure " 1.10.2 " :scope " provided" ]
1111 [org.clojure/clojurescript " 1.10.520" :scope " provided" ]
1212 [persistent-sorted-set " 0.1.2" ]
1313 ]
8888 ]}
8989
9090 :profiles {
91- :1.9 { :dependencies [[org.clojure/clojure " 1.9.0" :scope " provided" ]
92- [org.clojure/clojurescript " 1.9.946" :scope " provided" ]] }
9391 :dev { :source-paths [" test" " dev" ]
9492 :dependencies [[org.clojure/tools.nrepl " 0.2.13" ]
9593 [org.clojure/tools.namespace " 0.2.11" ]
9694 [lambdaisland/kaocha " 0.0-389" ]
9795 [lambdaisland/kaocha-cljs " 0.0-21" ]] }
98- :aot { :aot [#"datascript\. (?!query-v3).*" ]
99- :jvm-opts [" -Dclojure.compiler.direct-linking=true" ] }
10096 }
10197
10298 :clean-targets ^{:protect false } [
Original file line number Diff line number Diff line change 1- #! /usr/bin/env clojure
1+ #! /usr/bin/env clj
22
33" USAGE: ./release.clj <new-version>"
44
1919(defn current-version []
2020 (second (re-find #"def version \" ([0-9\. ]+)\" " (slurp " project.clj" ))))
2121
22- (def ^:dynamic *env* {})
23-
2422(defn sh [& args]
25- (apply println " Running" ( if ( empty? *env*) " " ( str :env " " *env*)) args)
26- (let [res (apply sh/sh ( concat args [ :env ( merge ( into {} ( System/getenv )) *env*)]) )]
23+ (apply println " Running" args)
24+ (let [res (apply sh/sh args)]
2725 (if (== 0 (:exit res))
2826 (do
2927 (println (:out res))
8381 (str/join " ,\n " ))
8482 " }" ))
8583
86- (def GITHUB_AUTH (System/getenv " GITHUB_AUTH " ))
84+ (def GITHUB_BASIC (System/getenv " GITHUB_BASIC " ))
8785
8886(defn github-release []
8987 (sh " cp" " release-js/datascript.js" (str " release-js/datascript-" new-v " .min.js" ))
9896 " name" new-v
9997 " target_commitish" " master"
10098 " body" changelog}
101- response (sh " curl" " -u" GITHUB_AUTH
99+ response (sh " curl" " -u" GITHUB_BASIC
102100 " -X" " POST"
103101 " --data" (map->json request)
104102 " https://api.github.com/repos/tonsky/datascript/releases" )
105103 [_ id] (re-find #"\" id\" : (\d +)" response)]
106- (sh " curl" " -u" GITHUB_AUTH
104+ (sh " curl" " -u" GITHUB_BASIC
107105 " -X" " POST"
108106 " -H" " Content-Type: application/javascript"
109107 " --data-binary" (str " @release-js/datascript-" new-v " .min.js" )
116114 (make-commit )
117115 (publish-npm )
118116 (github-release )
119- (binding [*env* {" DATASCRIPT_CLASSIFIER" " -aot1.9" }]
120- (sh " lein" " with-profile" " +aot,+1.9" " deploy" " clojars" ))
121117 (sh " lein" " deploy" " clojars" )
122118 (System/exit 0 ))
123119
You can’t perform that action at this time.
0 commit comments