Skip to content

Instantly share code, notes, and snippets.

@wilkerlucio
Created July 3, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilkerlucio/f13e8c29425fcefe4ecc52bd27c0ed23 to your computer and use it in GitHub Desktop.
Save wilkerlucio/f13e8c29425fcefe4ecc52bd27c0ed23 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e -u
# Created publish-local script that publish the repo to your ~/.m2/repository
# using your projects name and current version
# It assumes that you are:
# - in the same directory as the project.clj
# - the project name and version string are on the first line
project_name=$(head -n 1 project.clj | cut -d' ' -f2)
simple_project_name=$(echo $project_name | sed 's/.*\///')
version=$(head -n 1 project.clj | cut -d' ' -f3 | sed 's/"//g')
lein do jar, pom, localrepo install -p pom.xml \
target/${simple_project_name}-${version}.jar \
${project_name} ${version}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment