GithubHelp home page GithubHelp logo

lein-release's Introduction

Leiningen Release Plug-in

The release plug-in automatically manages your project’s version and deploys the built artifact for you.

The plug-in performs the following steps:

1. Modify the project.clj to drop the “-SNAPSHOT” suffix
2. Add the project.clj to the SCM system
3. Commit the project.clj to the SCM system
4. Tag the project with projectName-version
5. If the project jar file does not exist, it builds it with lein jar and lein pom
6. Performs a Deploy (see the Deploy section below)
7. Increments the project minor version number and re-adds the “-SNAPSHOT” suffix
8. Add the project.clj to the SCM system
9. Commit the project.clj to the SCM system

Usage

   lein plugin install lein-release/lein-release 1.0.0
   lein release

Configuration

The plug-in supports a :lein-release map in the project.clj

:scm

:lein-release {:scm :git}

This can be used to specify the SCM (version control) system. The release plug-in attempts to auto-detect the version control system by inspecting the current working directory (eg, for the .git directory). If this does not work for your project you can specify the SCM system explicitly.

:deploy-via

:lein-release {:deploy-via :clojars}

This can be used to explicitly specify the deployment strategy that will be used. The currently supported values for this are:

  • :clojars
  • :lein-deploy
  • :lein-install

The release plugin attempts to detect whether to use :lein-deploy or :lein-install by inspecting the project.clj. If a :repositories key is present in the project.clj :lein-deploy will be used. Otherwise :lein-install will be used. :clojars will only be used if it is explicitly specified in the project.clj.

Example Configuration

(defproject org.clojars.relaynetwork/clj-avro "1.0.9-SNAPSHOT"
      :description "Avro Wrapper for Clojure"
      :dev-dependencies [[swank-clojure "1.4.2"]]
      :plugins [[lein-release "1.0.0-SNAPSHOT"]]
      :lein-release {:deploy-via :clojars}
      :local-repo-classpath true
      :dependencies [[org.clojure/clojure "1.2.0"]
                     ;; [org.apache.avro/avro "1.5.4"]
                     [org.apache.avro/avro "1.6.1"]
                     [org.clojure/clojure-contrib "1.2.0"]
                     [org.clojars.kyleburton/clj-etl-utils        "1.0.41"]])

Deploy

The deployment strategy is determined by the following:

  • if :deploy-via is specified in the configuration, its value is used
  • if the project.clj has a :repositories setting, then :lein-deploy is used
  • otherwise :lein-install is used

Deployment to clojars is handled by shelling out and running:

scp project-VERSION.jar pom.xml [email protected]:

Deployment via Leiningen is handled by shelling out (for a deploy or install respectively).

Supported SCM Systems

Currently only git is supported. Provisions have been made in the plug-in to support more SCM systems in the future. Patches are welcome!

Limitations

The plug-in uses simple heuristics (regexes!) to modify the version string in the project.clj. If you have multiple lines (or comments) that look like a defproject it may not be able to succeed. This approach was taken in order to not rewrite the entire project.clj file and thus loose things like formatting, indentation or comments.

Authors

Kyle Burton <[email protected]>
Paul Santa Clara

License

Copyright © Relay Network LLC

Distributed under the Eclipse Public License, the same as Clojure.

lein-release's People

Contributors

joelittlejohn avatar kyleburton avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.