diff --git a/.gitignore b/.gitignore index e894865..eea0e79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,16 @@ -*jar -lib -logs -classes -target -snippets -doc/** -notes.txt +/target +/lib +/classes +/checkouts +/logs +/doc +doc-src/VERSIONS.md +doc-src/INTRO.md +pom.xml +pom.xml.asc +*.jar +*.class +.lein-deps-sum +.lein-failures +.lein-plugins +.lein-repl-history diff --git a/README.md b/README.md index 79ef3d8..a72f23d 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,17 @@ A library containing macros for use in clojure threading expressions (using ->). -See [reference documentation](http://pallet.github.com/thread-expr/autodoc/index.html) -and [annotated source](http://pallet.github.com/thread-expr/marginalia/uberdoc.html). +See +[reference documentation](http://pallet.github.com/thread-expr/autodoc/index.html) +and +[annotated source](http://pallet.github.com/thread-expr/marginalia/uberdoc.html). ## Examples **Threaded arg exposure:** -`arg->` exposes the threaded arg, binding it to the supplied variable. For example: +`arg->` exposes the threaded arg, binding it to the supplied variable. For +example: ```clojure (-> 2 @@ -27,7 +30,10 @@ Expands to: ;=> 6 ``` -Note the extra set of parens in the expansion; the threading macro feeds the current argument in as `arg`, binds it to the supplied var using `let`, and resumes threading for all forms inside of `arg->`. + +Note the extra set of parens in the expansion; the threading macro feeds the +current argument in as `arg`, binds it to the supplied var using `let`, and +resumes threading for all forms inside of `arg->`. **Threaded list comprehension:** @@ -55,15 +61,14 @@ Expands to: ## Installation thread-expr is distributed as a jar, and is available in the -[sonatype repository](http://oss.sonatype.org/content/repositories/releases/org/cloudhoist). +[clojars repository](http://clojars.org/com.palletops/thread-expr). -Installation is with maven or your favourite maven repository aware build tool. +Installation is with leiningen or your favourite maven repository aware build +tool. ### lein/cake project.clj - :dependencies [[org.cloudhoist/thread-expr "1.2.0"]] - :repositories {"sonatype" - "http://oss.sonatype.org/content/repositories/releases"} + :dependencies [[com.palletops/thread-expr "1.2.0"]] ### maven pom.xml @@ -77,8 +82,8 @@ Installation is with maven or your favourite maven repository aware build tool. - sonatype - http://oss.sonatype.org/content/repositories/releases + clojars + http://clojars.org/repo @@ -86,4 +91,4 @@ Installation is with maven or your favourite maven repository aware build tool. Licensed under [EPL](http://www.eclipse.org/legal/epl-v10.html) -Copyright 2011, 2012 Hugo Duncan. +Copyright 2011, 2012, 2013 Hugo Duncan. diff --git a/finish-release.sh b/finish-release.sh deleted file mode 100644 index 59e876c..0000000 --- a/finish-release.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# finish the release after updating release notes - -if [[ $# -lt 1 ]]; then - echo "usage: $(basename $0) new-version" >&2 - exit 1 -fi - -version=$1 - -echo "finish release of $version" - -echo -n "commiting release notes and readme. enter to continue:" && read x \ -&& git add ReleaseNotes.md README.md \ -&& git commit -m "Updated release notes and readme for $version" \ -&& echo -n "Peform release. enter to continue:" && read x \ -&& mvn release:clean \ -&& mvn release:prepare \ -&& mvn release:perform \ -&& git flow release finish -n $version \ -&& mvn nexus:staging-close \ -&& mvn nexus:staging-promote - diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 63f07e6..0000000 --- a/pom.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 4.0.0 - - org.cloudhoist - parent-pom - 0.1.3 - - org.cloudhoist - thread-expr - 1.2.1-SNAPSHOT - jar - thread-expr - - Thread-expr provides macros for use within a clojure threaded argument - expression (->). - - http://palletops.com - 2010 - - - scm:git:git://github.com/pallet/thread-expr.git - scm:git:ssh://git@github.com/pallet/thread-expr.git - https://github.com/pallet/thread-expr - - - - src - test - - - resources - - - - - test-resources - - - - - org.cloudhoist.plugin - zi - ${zi.version} - - - - - - - org.clojure - clojure - ${clojure.version} - - - org.clojure - tools.macro - 0.1.1 - - - - - - Hugo Duncan - hugoduncan - hugo -at- hugoduncan -dot- org - - PMC - Developer - - -5 - - - - - - Sam Ritchie - sritchie09 -at- gmail -dot- com - Twitter Inc - http://www.twitter.com/ - -7 - http://sritchie.github.com/ - - - - diff --git a/profiles.clj b/profiles.clj new file mode 100644 index 0000000..188e0f4 --- /dev/null +++ b/profiles.clj @@ -0,0 +1,18 @@ +{:dev {:dependencies [[ch.qos.logback/logback-classic "1.0.9"]] + :plugins [[lein-set-version "0.3.0"]]} + :doc {:dependencies [[com.palletops/pallet-codox "0.1.0-SNAPSHOT"]] + :plugins [[codox/codox.leiningen "0.6.4"] + [lein-marginalia "0.7.1"]] + :codox {:writer codox-md.writer/write-docs + :output-dir "doc/1.3/api" + :src-dir-uri "https://github.com/pallet/pallet-common/blob/develop" + :src-linenum-anchor-prefix "L"} + :aliases {"marg" ["marg" "-d" "doc/1.3/annotated"] + "codox" ["doc"] + "doc" ["do" "codox," "marg"]}} + :1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]} + :1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]} + :1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]} + :release + {:set-version + {:updates [{:path "README.md" :no-snapshot true}]}}} diff --git a/project.clj b/project.clj new file mode 100644 index 0000000..89094ce --- /dev/null +++ b/project.clj @@ -0,0 +1,8 @@ +(defproject com.palletops/thread-expr "1.3.0-SNAPSHOT" + :description "Thread-expr provides macros for use within a clojure threaded +argument expressions (-> and ->>)." + :url "http://palletops.com" + :license {:name "Eclipse Public License" + :url "http://www.eclipse.org/legal/epl-v10.html"} + :dependencies [[org.clojure/clojure "1.2.1"] + [org.clojure/tools.macro "0.1.1"]]) diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..e7d38d9 --- /dev/null +++ b/release.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# release thread-expr + +if [[ $# -lt 3 ]]; then + echo "usage: $(basename $0) previous-version new-version next-version" >&2 + exit 1 +fi + +previous_version=$1 +version=$2 +next_version=$3 + +echo "" +echo "Start release of $version, previous version is $previous_version" +echo "" +echo "" + +lein do clean, with-profile default:1.3:1.4:1.5 test && \ +git flow release start $version || exit 1 + +lein with-profile +release set-version ${version} :previous-version ${previous_version} \ + || { echo "set version failed" >2 ; exit 1; } + +echo "" +echo "" +echo "Changes since $previous_version" +git --no-pager log --pretty=changelog thread-expr-$previous_version.. +echo "" +echo "" +echo "Now edit project.clj, ReleaseNotes and README" + +$EDITOR project.clj +$EDITOR ReleaseNotes.md +$EDITOR README.md + +echo -n "commiting project.clj, release notes and readme. enter to continue:" \ +&& read x \ +&& git add project.clj ReleaseNotes.md README.md \ +&& git commit -m "Updated project.clj, release notes and readme for $version" \ +&& echo -n "Peform release. enter to continue:" && read x \ +&& lein do clean, install, test, deploy clojars \ +&& git flow release finish $version \ +&& echo "Now push to github. Don't forget the tags!" \ +&& lein with-profile +doc doc \ +&& lein with-profile +release set-version ${next_version} \ +&& git add project.clj \ +&& git commit -m "Updated version for next release cycle" diff --git a/start-release.sh b/start-release.sh deleted file mode 100644 index 3ab1253..0000000 --- a/start-release.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# start the release - -if [[ $# -lt 2 ]]; then - echo "usage: $(basename $0) previous-version new-version" >&2 - exit 1 -fi - -previous_version=$1 -version=$2 - -echo "" -echo "Start release of $version, previous version is $previous_version" -echo "" -echo "" - -git flow release start $version - -echo "" -echo "" -echo "Changes since $previous_version" -git log --pretty=changelog thread-expr-$previous_version.. -echo "" -echo "" -echo "Now edit ReleaseNotes and README" - -$EDITOR ReleaseNotes.md -$EDITOR README.md