Permalink
Browse files

take the output file name as well

  • Loading branch information...
1 parent 0aed9e9 commit 65d3454fe3438475818ba9d3888f196ca3208a0b @kohsuke committed Mar 21, 2011
Showing with 4 additions and 7 deletions.
  1. +4 −7 msi/build-on-jenkins.sh
View
@@ -1,12 +1,9 @@
#!/bin/bash -ex
-if [ ! -e "$1" ]; then
- echo "Usage: build-on-jenkins path/to/war"
+if [ "$2" == "" ]; then
+ echo "Usage: build-on-jenkins path/to/war path/to/output/msi"
exit 1
fi
tar cvzf bundle.tgz FindJava.java build.sh jenkins.wxs
-java -jar jenkins-cli.jar dist-fork -z bundle.tgz -f jenkins.war="$1" -l windows -Z result.tgz bash -ex build.sh jenkins.war
+v=$(unzip -p "$1" META-INF/MANIFEST.MF | grep Implementation-Version | cut -d ' ' -f2 | tr -d '\r')
+java -jar jenkins-cli.jar dist-fork -z bundle.tgz -f jenkins.war="$1" -l windows -F "jenkins-$v.msi=$2" bash -ex build.sh jenkins.war
-# hack until we fix distfork to avoid pointless intermediate directory
-rm -rf distfork*
-tar xvzf result.tgz
-mv distfork*/jenkins-*.msi .

0 comments on commit 65d3454

Please sign in to comment.