Skip to content

Commit

Permalink
Merge pull request #2 from athos/feature/migrate-to-build-clj
Browse files Browse the repository at this point in the history
Migrate to build-clj
  • Loading branch information
athos authored Aug 21, 2023
2 parents 42a48eb + 9b812bb commit ccd332d
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/classes
/checkouts
profiles.clj
pom.xml
pom.xml.asc
/pom.xml
/pom.xml.asc
*.jar
*.class
/.cpcache
Expand Down
27 changes: 27 additions & 0 deletions build.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
(ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]))

(def lib 'dev.athos/type-infer)
(def version "0.1.2")
(def tag (b/git-process {:git-args "rev-parse HEAD"}))

(defn clean [opts]
(bb/clean opts))

(defn jar [opts]
(-> opts
(assoc :src-pom "template/pom.xml"
:lib lib :version version :scm {:tag tag})
(clean)
(bb/jar)))

(defn install [opts]
(-> opts
(assoc :lib lib :version version)
(bb/install)))

(defn deploy [opts]
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))
7 changes: 6 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
:main-opts ["-m" "cognitect.test-runner"]}
:coverage
{:extra-deps {cloverage/cloverage {:mvn/version "1.2.2"}}
:main-opts ["-m" "cloverage.coverage" "-p" "src" "-s" "test" "--codecov"]}}}
:main-opts ["-m" "cloverage.coverage" "-p" "src" "-s" "test" "--codecov"]}
:build
{:deps
{io.github.clojure/tools.build {:git/tag "v0.9.5" :git/sha "24f2894"}
io.github.seancorfield/build-clj {:git/tag "v0.9.2" :git/sha "9c9f078"}}
:ns-default build}}}
24 changes: 24 additions & 0 deletions template/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>type-infer</name>
<description>A Clojure utility to inspect static types inferred by the Clojure compiler</description>
<url>https://github.com/athos/type-infer</url>
<licenses>
<license>
<name>EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
</license>
</licenses>
<developers>
<developer>
<id>athos</id>
<name>Shogo Ohta</name>
</developer>
</developers>
<scm>
<url>https://github.com/athos/type-infer</url>
<connection>scm:git:git://github.com/athos/type-infer.git</connection>
<developerConnection>scm:git:ssh://[email protected]/athos/type-infer.git</developerConnection>
</scm>
</project>

0 comments on commit ccd332d

Please sign in to comment.