2012-06-02 04:44:09 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e -u
|
|
|
|
|
|
|
|
CURRENT_VERSION=$1
|
|
|
|
RELEASE_VERSION=$2
|
|
|
|
|
2013-01-17 05:04:47 +00:00
|
|
|
for f in bin/lein bin/lein-pkg bin/lein.bat project.clj leiningen-core/project.clj; do
|
2012-06-02 04:44:09 +00:00
|
|
|
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 ..
|
|
|
|
|
2012-06-03 04:07:35 +00:00
|
|
|
bin/lein with-profile release uberjar
|
2012-06-02 04:44:09 +00:00
|
|
|
cp target/leiningen-$RELEASE_VERSION-standalone.jar $HOME/.lein/self-installs
|
|
|
|
|
|
|
|
cp bin/lein /tmp/lein-$RELEASE_VERSION
|
|
|
|
cd /tmp
|
|
|
|
|
2012-06-14 04:43:22 +00:00
|
|
|
if [ ! -r test-project ]; then
|
|
|
|
./lein-$RELEASE_VERSION new test-project
|
|
|
|
fi
|
2012-06-02 04:44:09 +00:00
|
|
|
|
2012-06-14 04:43:22 +00:00
|
|
|
cd test-project
|
|
|
|
|
|
|
|
time ../lein-$RELEASE_VERSION run -m clojure.main/main -e nil
|
|
|
|
time ../lein-$RELEASE_VERSION run -m clojure.main/main -e nil
|
|
|
|
time ../lein-$RELEASE_VERSION run -m clojure.main/main -e nil
|
|
|
|
|
|
|
|
echo "If these are under 3 seconds then you should be set to upload"
|
2013-01-11 00:59:36 +00:00
|
|
|
echo "target/leiningen-$RELEASE_VERSION-standalone.jar to S3."
|
2013-03-20 02:45:21 +00:00
|
|
|
echo "s3c me put -P target/leiningen-$RELEASE_VERSION-standalone.jar s3://leiningen/downloads/"
|
2012-06-02 04:44:09 +00:00
|
|
|
echo "Also deploy this release of leiningen-core to Clojars."
|
|
|
|
|
2013-04-12 17:02:18 +00:00
|
|
|
cd -
|
|
|
|
|
|
|
|
git commit -a -m "Release $RELEASE_VERSION"
|
|
|
|
git tag -s $RELEASE_VERSION -m "Release $RELEASE_VERSION"
|
|
|
|
|
2012-06-02 04:44:09 +00:00
|
|
|
# Still manual for now:
|
2012-08-26 01:41:32 +00:00
|
|
|
# cd leiningen-core; lein do clean, deploy clojars, marg
|
2013-01-11 19:06:09 +00:00
|
|
|
# deploy leiningen itself
|
2013-03-21 20:22:53 +00:00
|
|
|
# scp docs/uberdoc.html philhag@leiningen.org:leiningen.org/reference.html
|
2012-06-02 04:44:09 +00:00
|
|
|
# git push && git push --tags
|
2013-03-28 22:38:43 +00:00
|
|
|
# git checkout stable && git merge master && git push
|
2012-06-02 04:44:09 +00:00
|
|
|
# Drop version back to SNAPSHOT
|