Browse Source

installer scripts handle -t differently in git clones now than in svn checkouts.

./release.sh -t will now get the release name from `git describe --tags` (fixes issue 2588)
tags/0.6.3m1rc3
Shane Mc Cormack 15 years ago
parent
commit
43ddce58ef

+ 11
- 6
installer/jar/makeJar.sh View File

@@ -119,13 +119,18 @@ while test -n "$1"; do
119 119
 			;;
120 120
 		--tag|-t)
121 121
 			shift
122
-			REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
123
-			CHECKTAG=`echo ${1} | egrep "${REGEX}"`
124
-			if [ "" = "${CHECKTAG}" ]; then
125
-				echo "Specified tag ("${1}") is invalid."
126
-				exit 1;
122
+			if [ ${isSVN} -eq 1 ]; then
123
+				REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
124
+				CHECKTAG=`echo ${1} | egrep "${REGEX}"`
125
+				if [ "" = "${CHECKTAG}" ]; then
126
+					echo "Specified tag ("${1}") is invalid."
127
+					exit 1;
128
+				fi;
129
+				TAGGED="${1}"
130
+			else
131
+				TAGGED=`git describe --tags`
132
+				TAGGED=${TAGGED%%-*}
127 133
 			fi;
128
-			TAGGED="${1}"
129 134
 			;;
130 135
 	esac
131 136
 	shift

+ 11
- 6
installer/linux/makeInstallerLinux.sh View File

@@ -186,13 +186,18 @@ while test -n "$1"; do
186 186
 			;;
187 187
 		--tag|-t)
188 188
 			shift
189
-			REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
190
-			CHECKTAG=`echo ${1} | egrep "${REGEX}"`
191
-			if [ "" = "${CHECKTAG}" ]; then
192
-				echo "Specified tag ("${1}") is invalid."
193
-				exit 1;
189
+			if [ ${isSVN} -eq 1 ]; then
190
+				REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
191
+				CHECKTAG=`echo ${1} | egrep "${REGEX}"`
192
+				if [ "" = "${CHECKTAG}" ]; then
193
+					echo "Specified tag ("${1}") is invalid."
194
+					exit 1;
195
+				fi;
196
+				TAGGED="${1}"
197
+			else
198
+				TAGGED=`git describe --tags`
199
+				TAGGED=${TAGGED%%-*}
194 200
 			fi;
195
-			TAGGED="${1}"
196 201
 			;;
197 202
 	esac
198 203
 	shift

+ 11
- 6
installer/osx/makeInstallerOSX.sh View File

@@ -172,13 +172,18 @@ while test -n "$1"; do
172 172
 			;;
173 173
 		--tag|-t)
174 174
 			shift
175
-			REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
176
-			CHECKTAG=`echo ${1} | egrep "${REGEX}"`
177
-			if [ "" = "${CHECKTAG}" ]; then
178
-				echo "Specified tag ("${1}") is invalid."
179
-				exit 1;
175
+			if [ ${isSVN} -eq 1 ]; then
176
+				REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
177
+				CHECKTAG=`echo ${1} | egrep "${REGEX}"`
178
+				if [ "" = "${CHECKTAG}" ]; then
179
+					echo "Specified tag ("${1}") is invalid."
180
+					exit 1;
181
+				fi;
182
+				TAGGED="${1}"
183
+			else
184
+				TAGGED=`git describe --tags`
185
+				TAGGED=${TAGGED%%-*}
180 186
 			fi;
181
-			TAGGED="${1}"
182 187
 			;;
183 188
 	esac
184 189
 	shift

+ 11
- 7
installer/release.sh View File

@@ -33,7 +33,7 @@ showHelp() {
33 33
 	if [ ${isSVN} -eq 1 ]; then
34 34
 		echo "-b,  --branch                       <release> is a branch"
35 35
 	else
36
-		echo "-t,  --tag <release>                This is a tagged release"
36
+		echo "-t,  --tag                          This is a tagged release"
37 37
 	fi;
38 38
 	echo "     --jar <file>                   Use <file> instead of compiling a jar."
39 39
 	echo "     --fulljar <file>               Use <file> instead of compiling a jar, and don't run makeJar on it."
@@ -112,13 +112,17 @@ while test -n "$1"; do
112 112
 			;;
113 113
 		--tag|-t)
114 114
 			shift
115
-			REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
116
-			CHECKTAG=`echo ${1} | egrep "${REGEX}"`
117
-			if [ "" = "${CHECKTAG}" ]; then
118
-				echo "Specified tag ("${1}") is invalid."
119
-				exit 1;
115
+			if [ ${isSVN} -eq 1 ]; then
116
+				REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
117
+				CHECKTAG=`echo ${1} | egrep "${REGEX}"`
118
+				if [ "" = "${CHECKTAG}" ]; then
119
+					echo "Specified tag ("${1}") is invalid."
120
+					exit 1;
121
+				fi;
122
+				TAGGED="-t ${1} "
123
+			else
124
+				TAGGED="-t "
120 125
 			fi;
121
-			TAGGED="-t ${1} "
122 126
 			;;
123 127
 	esac
124 128
 	shift

+ 11
- 6
installer/windows/makeInstallerWindows.sh View File

@@ -205,13 +205,18 @@ while test -n "$1"; do
205 205
 			;;
206 206
 		--tag|-t)
207 207
 			shift
208
-			REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
209
-			CHECKTAG=`echo ${1} | egrep "${REGEX}"`
210
-			if [ "" = "${CHECKTAG}" ]; then
211
-				echo "Specified tag ("${1}") is invalid."
212
-				exit 1;
208
+			if [ ${isSVN} -eq 1 ]; then
209
+				REGEX="^[0-9]+(\.[0-9]+(\.[0-9]+)?)?$"
210
+				CHECKTAG=`echo ${1} | egrep "${REGEX}"`
211
+				if [ "" = "${CHECKTAG}" ]; then
212
+					echo "Specified tag ("${1}") is invalid."
213
+					exit 1;
214
+				fi;
215
+				TAGGED="${1}"
216
+			else
217
+				TAGGED=`git describe --tags`
218
+				TAGGED=${TAGGED%%-*}
213 219
 			fi;
214
-			TAGGED="${1}"
215 220
 			;;
216 221
 	esac
217 222
 	shift

Loading…
Cancel
Save