4848# ## Disable sharing files by default (it causes things not to work properly)
4949CYGWIN=nontsec
5050
51+ . dist-lib.sh
52+
5153# ## Overrideable vars
5254test " $KEYFILE " || KEYFILE=rabbit-mock.snk
5355test " $RABBIT_VSN " || RABBIT_VSN=0.0.0.0
6971 DOTNET_PROGRAM_PREPEND=
7072fi
7173
72- RELEASE_PATTERN=^[0-9]+\. [0-9]+\. [0-9]+$
73- if [[ $RABBIT_VSN =~ $RELEASE_PATTERN ]] ; then
74- RABBIT_VSN=$RABBIT_VSN .0
75- fi
74+ assembly-version $RABBIT_VSN
7675
7776function main {
7877 # ## Remove everything in the release dir and create the dir again
@@ -151,15 +150,6 @@ function cp-license-to {
151150}
152151
153152
154- function safe-rm-deep-dir {
155- # ## Workaround for the path-too-long bug in cygwin
156- if [ -e " $1 " ]; then
157- mv -f $1 /tmp/del
158- rm -rf /tmp/del
159- fi
160- }
161-
162-
163153function src-dist {
164154 # ## Copy files to be zipped to tmp/srcdist/
165155 mkdir -p tmp/srcdist/docs/specs tmp/srcdist/lib
@@ -181,7 +171,7 @@ function src-dist {
181171 cd tmp/srcdist
182172 zip -r ../../$RELEASE_DIR /$NAME_VSN .zip . -x \* .snk \* .resharper \* .csproj.user
183173 cd ../..
184-
174+
185175 # ## Remove tmp/srcdist
186176 rm -rf tmp/srcdist
187177}
@@ -215,7 +205,7 @@ function dist-target-framework {
215205
216206 # ## Build
217207 $MSBUILD RabbitMQDotNetClient.sln /t:Build /property:Configuration=" Release"
218-
208+
219209 # ## Copy bin files to be zipped to tmp/dist/
220210 cp projects/client/RabbitMQ.Client/build/bin/RabbitMQ.Client.xml tmp/dist/bin/
221211 cp projects/client/RabbitMQ.Client/build/bin/RabbitMQ.Client.dll tmp/dist/bin/
@@ -224,15 +214,15 @@ function dist-target-framework {
224214 done
225215 test " $BUILD_WCF " && cp projects/wcf/RabbitMQ.ServiceModel/build/bin/RabbitMQ.ServiceModel.dll tmp/dist/bin/
226216 cp-license-to tmp/dist/
227-
217+
228218 # ## Zip tmp/dist
229219 cd tmp/dist
230220 zip -r ../../$RELEASE_DIR /$NAME_VSN -$TARGET_FRAMEWORK .zip .
231221 cd ../..
232222
233223 # ## Remove tmp/dist
234224 rm -rf tmp/dist
235-
225+
236226 # ## Restore Local.props
237227 rm -f ./Local.props
238228 test " $LOCAL_PROPS_EXISTS " && mv ./Local.props.user ./Local.props || true
@@ -244,7 +234,7 @@ function gen-props {
244234 else
245235 USING_MONO=" false"
246236 fi
247- sed -e " s:@VERSION@:$RABBIT_VSN :g" \
237+ sed -e " s:@VERSION@:$ASSEMBLY_VSN :g" \
248238 -e " s:@KEYFILE@:$KEYFILE :g" \
249239 -e " s:@USINGMONO@:$USING_MONO :g" \
250240 < $1 > $2
@@ -266,14 +256,14 @@ function gendoc-dist {
266256
267257 cd $PROJECT_DIR
268258
269- # ## Generate XMLs with ndocproc
259+ # ## Generate XMLs with ndocproc
270260 $DOTNET_PROGRAM_PREPEND $RELATIVE_DIR /lib/ndocproc-bin/bin/ndocproc.exe \
271261 /nosubtypes \
272262 $EXTRA_NDOCPROC_ARGS \
273263 $RELATIVE_DIR /tmp/gendoc/xml \
274264 $XML_SOURCE_FILE \
275265 $RELATIVE_DIR /docs/namespaces.xml
276-
266+
277267 cd $RELATIVE_DIR
278268
279269 # ## Zip ndocproc's output
@@ -282,17 +272,17 @@ function gendoc-dist {
282272 zip -r ../../../$RELEASE_DIR /$ZIP_TMP_XML_DOC_FILENAME .
283273 cd ../../..
284274 fi
285-
275+
286276 # ## Transform to html, using xsltproc
287277 genhtml index index
288278 genhtml namespace- namespace
289279 genhtml type- type
290-
280+
291281 # ## Remove generated XMLs and copy remaining files to be added to the .zip
292282 rm -rf tmp/gendoc/xml
293283 cp lib/ndocproc-bin/xsl/style.css tmp/gendoc/html/
294284 cp-license-to tmp/gendoc/
295-
285+
296286 # ## Zip tmp/gendoc
297287 cd tmp/gendoc
298288 zip -r ../../$RELEASE_DIR /$ZIP_DESTINATION_FILENAME .
0 commit comments