diff --git a/README.md b/README.md index 59f1912..3d862bf 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,13 @@ -# clojure-humanize +# org.clj-commons/humanize +[![Clojars Project](https://img.shields.io/clojars/v/org.clj-commons/humanize.svg)](https://clojars.org/org.clj-commons/humanize) ![clojure.yml](https://github.com/clj-commons/humanize/actions/workflows/clojure.yml/badge.svg?event=push) +[![cljdoc badge](https://cljdoc.org/badge/org.clj-commons/humanize)](https://cljdoc.org/d/org.clj-commons/humanize) A Clojure(script) library to produce human-readable strings for numbers, dates, and more based on similar libraries in other languages -## Installation - -__([via Clojars](https://clojars.org/clojure-humanize))__ - -[![Clojars Project](http://clojars.org/clojure-humanize/latest-version.svg)](http://clojars.org/clojure-humanize) - ## Usage * [numberword](#numberword) diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..3a6c9b4 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +1.0-beta-1 diff --git a/build.clj b/build.clj index 8208a76..ccd3862 100644 --- a/build.clj +++ b/build.clj @@ -1,48 +1,31 @@ +;; clj -T:build + (ns build - (:require [clojure.tools.build.api :as b] - [deps-deploy.deps-deploy :as dd])) + (:require [clojure.tools.build.api :as build] + [net.lewisship.build :as b] + [clojure.string :as str])) -(def lib 'org.clj-commons/humanize) -(def version "1.0-beta-1") +(def lib 'org.clj-commons/pretty) +(def version (-> "VERSION.txt" slurp str/trim)) -(def base-opts - {:lib lib - :basis (b/create-basis {:project "deps.edn"}) - :src ["src"] - :class-dir "target/classes"}) +(def jar-params {:project-name lib + :version version}) -(defn clean [_] - (b/delete {:path "target"}) - (b/delete {:path "cljs-test-runner-out"})) +(defn clean + [_params] + (build/delete {:path "target"})) (defn jar - "Build a JAR." - [opts] - (let [{:keys [src class-dir] :as opts'} (-> base-opts - (merge opts) - (assoc :jar-file (format "target/%s-%s.jar" (name lib) version) - :version version))] - (b/write-pom opts') - (b/copy-dir {:src-dirs src - :target-dir class-dir}) - (b/jar opts') - opts')) - -(defn deploy-clojars - "Deploy to Clojars." - [{:keys [jar-file class-dir] :as opts}] - (let [opts' (merge opts - {:installer :remote - :artifact (b/resolve-path jar-file) - :pom-file (b/pom-path {:lib lib - :class-dir class-dir})})] - (dd/deploy opts') - opts')) + [_params] + (b/create-jar jar-params)) (defn deploy - "Build and deploy the JAR to Clojars. Defaults to a snapshot, - specify :release true for a final release." - [opts] - (-> opts - jar - deploy-clojars)) + [_params] + (clean nil) + (b/deploy-jar (assoc (jar nil) :sign-artifacts? false))) + +(defn codox + [_params] + (b/generate-codox {:project-name lib + :version version})) + diff --git a/deps.edn b/deps.edn index 50ded82..d856d90 100644 --- a/deps.edn +++ b/deps.edn @@ -3,6 +3,10 @@ com.widdindustries/cljc.java-time {:mvn/version "0.1.21"} henryw374/js-joda {:mvn/version "3.2.0-0"}} :paths ["src"] + + :net.lewisship.build/scm + {:url "https://github.com/clj-commons/humanize"} + :aliases ;; clj -X:test {:test {:extra-paths ["test"]