forked from nytimes/vase.elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease
executable file
·38 lines (31 loc) · 942 Bytes
/
release
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
#!/bin/bash
#
# A script to kick off releasese.
#
# v1.1
type=$1
if [ "true" == "${DRONE}" ]; then
echo "Cannot run release from CI. Exiting."
exit 1
fi
if [ -z "${type}" ]; then
cat <<EOF
You must provide a release type. Must be of one of:
TYPE EXAMPLE
---- -------
major 1.2.4 -> 2.0.0
minor 1.2.4 -> 1.3.0
patch 1.2.4 -> 1.2.5
major-rc 2.7.9 -> 3.0.0-rc.0, 4.0.0-rc.3 -> 4.0.0-rc.4
minor-rc 2.7.9 -> 2.8.0-rc.0, 4.3.0-rc.0 -> 4.3.0-rc.1
major-release 4.0.0-rc.4 -> 4.0.0, 3.2.9 -> 4.0.0
minor-release 8.1.0-rc.4 -> 8.2.0, 5.9.4 -> 5.10.0
EOF
exit 1
fi
clojure -A:release $type --pom
version=`fgrep '<version>' pom.xml | head -1 | sed 's;.*<version>\(.*\)</version>.*;\1;'`
git add pom.xml
git commit -m "Update pom.xml for ${version}"
clojure -A:release $type --tag --prefix ""
git push --tags origin