Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add bin/release.

  • Loading branch information...
commit 060ab177d2bee85bce8aac44300e47553a1535cb 1 parent 7b788b6
@technomancy authored
Showing with 46 additions and 18 deletions.
  1. +42 −0 bin/release
  2. +4 −2 leiningen-core/project.clj
  3. +0 −16 project.clj
View
42 bin/release
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+set -e -u
+
+CURRENT_VERSION=$1
+RELEASE_VERSION=$2
+
+for f in bin/lein bin/lein.bat project.clj leiningen-core/project.clj; do
+ sed -i s/$CURRENT_VERSION/$RELEASE_VERSION/ $f
+done
+
+rm -rf target classes leiningen-core/target leiningen-core/classes
+rm -rf $HOME/.lein/self-installs/leiningen-$RELEASE_VERSION-standalone.jar
+
+cd leiningen-core
+sed -i s/\;\;:aot/:aot/ project.clj
+lein1 clean, install
+sed -i s/:aot/\;\;:aot/ project.clj
+cd ..
+
+lein with-profile release uberjar
+cp target/leiningen-$RELEASE_VERSION-standalone.jar $HOME/.lein/self-installs
+
+cp bin/lein /tmp/lein-$RELEASE_VERSION
+cd /tmp
+
+time ./lein-$RELEASE_VERSION version
+time ./lein-$RELEASE_VERSION version
+time ./lein-$RELEASE_VERSION version
+
+echo "If these are under a second then you should be set to upload"
+echo "target/leiningen-$RELEASE_VERSION-standalone.jar to GitHub."
+echo "Also deploy this release of leiningen-core to Clojars."
+
+# Still manual for now:
+# cd leiningen-core; lein clean, deploy clojars, marg
+# scp docs/uberdoc.html leiningen.org:leiningen.org/reference.html
+# git commit -a -m "Release $RELEASE_VERSION"
+# git tag $RELEASE_VERSION
+# git push && git push --tags
+# git checkout preview && git reset --hard $RELEASE_VERSION && git push
+# Drop version back to SNAPSHOT
View
6 leiningen-core/project.clj
@@ -9,6 +9,8 @@
[ordered "1.2.0"]
[com.cemerick/pomegranate "0.0.12"
:exclusions [org.slf4j/slf4j-api]]]
+ ;; This is only used when releasing Leiningen. Can't put it in a
+ ;; profile since it must be installed using lein1
+ ;;:aot :all
:dev-resources-path "dev-resources"
- :profiles {:dev {:resource-paths ["dev-resources"]}
- :release {:aot :all}})
+ :profiles {:dev {:resource-paths ["dev-resources"]}})
View
16 project.clj
@@ -26,19 +26,3 @@
:offline (complement :online)}
:source-paths ["leiningen-core/src" "src"]
:eval-in :leiningen)
-
-;;; Release Checklist
-
-;; * update NEWS, bin/lein, bin/lein.bat, project.clj, leiningen-core/project.clj
-;; * publish leiningen-core to clojars
-;; * rm -rf target leiningen-core/target
-;; * temporarily add :aot :all to leiningen-core/project.clj; lein install
-;; * bin/lein with-profile release uberjar, copy standalone to ~/.lein/self-installs
-;; * ensure "time lein version" isn't bad
-;; * upload to github
-;; * test self-install
-;; * git tag
-;; * push, push tags, update stable branch
-;; * publish leiningen-core docs
-;; * announce on mailing list
-;; * bump version numbers back to snapshot
Please sign in to comment.
Something went wrong with that request. Please try again.