Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
clj-util-message-server/bin/install.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
40 lines (28 sloc)
952 Bytes
This file contains 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
#!/usr/bin/env bash | |
numArgs=$# | |
set -e -o pipefail | |
function die() { | |
MESG="${1:-Died}" | |
echo "${MESG}" >&2 | |
exit 1 | |
} | |
if [[ !$numArgs -gt 0 ]]; then | |
die "Please supply a version number e.g. 0.0.1" | |
fi | |
group="de.mpg.shh" | |
artifact="util-message-server" | |
version=$1 | |
lein clean | |
lein deps | |
lein jar | |
lein pom | |
test -f "target/${artifact}-${version}.jar" || die "Build failed: jar not found" | |
lein localrepo install -p pom.xml target/${artifact}-${version}.jar ${group}/${artifact} ${version} | |
# create sha1sums for the jar and pom | |
group_path=$(echo "${group}" | tr "." "/") | |
jar_path="${HOME}/.m2/repository/${group_path}/${artifact}/${version}/${artifact}-${version}.jar" | |
jar_sum_path="${jar_path}.sha1" | |
pom_path="${HOME}/.m2/repository/${group_path}/${artifact}/${version}/${artifact}-${version}.pom" | |
pom_sum_path="${pom_path}.sha1" | |
shasum ${jar_path} | cut -d ' ' -f 1 > ${jar_sum_path} | |
shasum ${pom_path} | cut -d ' ' -f 1 > ${pom_sum_path} |