From a1df6e9ceb95c19df707c2c9eb90924451310edd Mon Sep 17 00:00:00 2001 From: Benedek Fazekas Date: Sun, 12 Apr 2015 20:27:57 +0100 Subject: [PATCH] prepare 0.4.3 release - fix problem when there is no whitespace before the ns prefix in the ns body - adds build.sh for convenience --- README.md | 2 +- build.sh | 14 ++++++++++++++ project.clj | 2 +- src/leiningen/source_deps.clj | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 build.sh diff --git a/README.md b/README.md index 1a0fcc6..51fed0a 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It is an inlining tool which inlines your project's dependencies at packaging ti ## Usage -Put `[thomasa/mranderson "0.4.2"]` into the `:plugins` vector of your project.clj. +Put `[thomasa/mranderson "0.4.3"]` into the `:plugins` vector of your project.clj. Additionally you also need to mark some of the dependencies in your dependencies vector in the project's `project.clj` with `^:source-dep` meta tag. For example: diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..ba21013 --- /dev/null +++ b/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# runs source-deps and tests and then provided lein target with mranderson + +function check_result { + if [ $? -ne 0 ]; then + echo "FAILED" + exit 1 + fi +} + +lein do clean, source-deps :skip-javaclass-repackage true +check_result +lein with-profile plugin.mranderson/config "$@" diff --git a/project.clj b/project.clj index 885e38f..cb443c3 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject thomasa/mranderson "0.4.2" +(defproject thomasa/mranderson "0.4.3" :description "Leiningen plugin to download and use some dependencies as source." :url "https://github.com/benedekfazekas/mranderson" :license {:name "Eclipse Public License" diff --git a/src/leiningen/source_deps.clj b/src/leiningen/source_deps.clj index f22ca3c..72d6c08 100644 --- a/src/leiningen/source_deps.clj +++ b/src/leiningen/source_deps.clj @@ -71,7 +71,7 @@ (defn- update-file [file prefixes prefix] (let [old (slurp file) new (-> (str/replace old (re-pattern (str "(\\[\\s*)" prefix "(\\s+\\[?)")) (str "$1" (prefixes prefix) "$2")) - (str/replace (re-pattern (str "(\\s+)" prefix "([\\s\\.])")) (str "$1" (prefixes prefix) "$2")))] + (str/replace (re-pattern (str "(\\s+\\(?)" prefix "([\\s\\.])")) (str "$1" (prefixes prefix) "$2")))] (when-not (= old new) (spit file new))))