forked from zkoss/zkspringboot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupVer
executable file
·44 lines (39 loc) · 842 Bytes
/
upVer
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
#!/bin/bash
# release
#
#{{IS_NOTE
# Purpose:
#
# Description:
#
# History:
# Tue Mar 3 11:11:09 2011, Created by Jimmy
#}}IS_NOTE
#
#Copyright (C) 2011 Potix Corporation. All Rights Reserved.
#
#{{IS_RIGHT
#}}IS_RIGHT
#
maindir="$(pwd)"
echo "Working directory $maindir"
oldVersion=$1
newVersion=$2
isFL=$3
if [ "$oldVersion" == "" ] || [ "$newVersion" == "" ] ; then
echo "Usage: upVer [ oldVersion ] [ newVersion ] [options]"
echo "Available options: FL."
exit 1
fi
function upVer {
if [ "$isFL" == "FL" ] ; then
targetVersion=$newVersion"-SNAPSHOT"
else
targetVersion=$newVersion
fi
sed -i "/version>/,/<\//s/>$oldVersion.*<\//>$targetVersion<\//" $1/pom.xml
echo "$1 pom.xml"
grep -n --color=auto $targetVersion $1/pom.xml
}
upVer zkspringboot-autoconfig
upVer zkspringboot-starter