Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 43 lines (32 sloc) 1.166 kB
#!/usr/bin/env bash
# This script must be run within the ClojureScript top-level project
# directory.
set -ex
cd `dirname $0`/..
POM_TEMPLATE="pom.template.xml"
POM_FILE="pom.xml"
# The command `git describe --match v0.0` will return a string like
#
# v0.0-856-g329708b
#
# where 856 is the number of commits since the v0.0 tag. It will always
# find the v0.0 tag and will always return the total number of commits (even
# if the tag is v0.0.1).
REVISION=`git --no-replace-objects describe --match v0.0`
# Extract the version number from the string. Do this in two steps so
# it is a little easier to understand.
REVISION=${REVISION:5} # drop the first 5 characters
REVISION=${REVISION:0:${#REVISION}-9} # drop the last 9 characters
TAG=r$REVISION
sed -e s/CLOJURESCRIPT_VERSION/0.0-$REVISION/ < "$POM_TEMPLATE" > "$POM_FILE"
# For Hudson server
if [ "$HUDSON" = "true" ]; then
mvn --fail-at-end -Psonatype-oss-release \
clean deploy nexus-staging:release
echo "Creating tag $TAG"
git tag -f "$TAG"
git push origin "$TAG"
else
echo "Skipping remote deployment and Git tag because we are not on Hudson."
mvn clean install
fi
Jump to Line
Something went wrong with that request. Please try again.