Created
July 3, 2016 18:47
-
-
Save wilkerlucio/f13e8c29425fcefe4ecc52bd27c0ed23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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