forked from rtircher/lein-haml-sass
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclojar-it
executable file
·56 lines (44 loc) · 950 Bytes
/
clojar-it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /bin/bash
if [[ -z $1 ]]
then
echo "Enter new version for git tag (and remember to bump project.clj and README.md versions)"
else
VERSION=$1
function clean_up {
echo "Deleting lein-haml-sass jars"
rm -rf target
echo "Removing pom.xml file"
rm -f pom.xml
}
clean_up
echo "Runing tests"
lein spec
RET_CODE=$?
if [ "$RET_CODE" == 0 ]
then
echo "Compiling project"
lein jar
RET_CODE=$?
fi
if [ "$RET_CODE" == 0 ]
then
echo "Creating pom.xml file for deployement"
lein pom
RET_CODE=$?
fi
if [ "$RET_CODE" == 0 ]
then
echo "Pushing library to clojars"
scp -i ~/.leiningen/id_rsa pom.xml target/lein-haml-sass*.jar [email protected]:
RET_CODE=$?
fi
if [ "$RET_CODE" == 0 ]
then
echo "Creating new tag v$VERSION"
git tag -a "v$VERSION" -m "Version $VERSION"
echo "Uploading tag"
git push --tags
fi
echo "Cleaning up"
clean_up
fi