gvsig-geoprocess / org.gvsig.geoprocess / tags / org.gvsig.geoprocess-2.2.14 / distrib @ 608
History | View | Annotate | Download (1.7 KB)
1 |
#/bin/bash |
---|---|
2 |
|
3 |
#USER= |
4 |
#PASS= |
5 |
|
6 |
REPO="https://devel.gvsig.org/svn/gvsig-geoprocess" |
7 |
|
8 |
INCREMENT=3 #1:major number 2:minor number 3:bug number |
9 |
PARAMETERS_LIN="-Dnative-platform=linux -Dnative-compiler=gcc4 -Dnative-arch=i386 -Dnative-distribution=all -Dlibrary-type=dynamic -Dnative_classifier=linux-all-gcc4-i386-dynamic -Dnative_classifier=linux-all-gcc4-i386-dynamic -Dmaven.test.skip" |
10 |
|
11 |
VERSION_TO_FIX=`cat pom.xml | grep "<version>" | head -n 1 | sed 's/<version>//g' | sed 's/-SNAPSHOT<\/version>//g'`; |
12 |
MAJOR_NUMBER=`echo $VERSION_TO_FIX | cut -d"." -f 1`; |
13 |
MINOR_NUMBER=`echo $VERSION_TO_FIX | cut -d"." -f 2`; |
14 |
BUG_NUMBER=`echo $VERSION_TO_FIX | cut -d"." -f 3`; |
15 |
|
16 |
VERSION_TO_FIX=$MAJOR_NUMBER"."$MINOR_NUMBER"."$BUG_NUMBER |
17 |
|
18 |
if [ $INCREMENT -eq 1 ]; then |
19 |
MAJOR_NUMBER=$((MAJOR_NUMBER+1)); |
20 |
fi |
21 |
|
22 |
if [ $INCREMENT -eq 2 ]; then |
23 |
MINOR_NUMBER=$((MINOR_NUMBER+1)); |
24 |
fi |
25 |
|
26 |
if [ $INCREMENT -eq 3 ]; then |
27 |
BUG_NUMBER=$((BUG_NUMBER+1)); |
28 |
fi |
29 |
|
30 |
NEXT_DEV_VERSION=$MAJOR_NUMBER"."$MINOR_NUMBER"."$BUG_NUMBER"-SNAPSHOT" |
31 |
|
32 |
echo Fixed version:$VERSION_TO_FIX |
33 |
echo New development version:$NEXT_DEV_VERSION |
34 |
#VERSION_TO_FIX=2.2.2 |
35 |
#NEXT_DEV_VERSION=2.2.3-SNAPSHOT |
36 |
|
37 |
#mvn release:prepare -B -DdryRun=false -Dtag=v$VERSION_TO_FIX -DreleaseVersion=$VERSION_TO_FIX -DdevelopmentVersion=$NEXT_DEV_VERSION -DpreparationGoals="clean install" -Dusername=$USER -Dpassword=$PASS -DignoreSnapshots=true -Darguments=$PARAMETERS_LIN |
38 |
|
39 |
read -p "¿Prepare de $i correcto? ¿Continuar? s/n: " CONTINUE |
40 |
if [ "$CONTINUE" == "n" ]; then |
41 |
mvn release:rollback |
42 |
exit; |
43 |
fi |
44 |
|
45 |
mvn release:perform -Dusername=$USER -Dpassword=$PASS -Darguments=$PARAMETERS_LIN |
46 |
|
47 |
read -p "¿Perform de $i correcto? ¿Continuar? s/n: " CONTINUE |
48 |
if [ "$CONTINUE" == "n" ]; then |
49 |
mvn release:rollback |
50 |
exit; |
51 |
fi |
52 |
|