Skip to content

Commit

Permalink
[JENKINS-19636] - Allow wildcards for App file path (.ipa, .apk) and …
Browse files Browse the repository at this point in the history
…Symbol path.
  • Loading branch information
Jeremy Gale committed Mar 21, 2014
1 parent 62bd18e commit 1b21917
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/hockeyapp/HockeyappRecorder.java
Expand Up @@ -22,6 +22,7 @@
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.tools.ant.types.FileSet;
import org.json.simple.parser.JSONParser;
import org.kohsuke.stapler.DataBoundConstructor;
import hudson.scm.ChangeLogSet.Entry;
Expand Down Expand Up @@ -103,8 +104,10 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
tempDir.delete();
tempDir.mkdirs();

File file = getFileLocally(build.getWorkspace(),

This comment has been minimized.

Copy link
@recampbell

recampbell May 2, 2014

Member

FYI, this commit introduced JENKINS-22848

vars.expand(filePath), tempDir);
FileSet fileSet = Util.createFileSet(new File(build.getWorkspace().getRemote()),
vars.expand(filePath), null);
// Take the first one that matches the pattern
File file = new File(fileSet.iterator().next().toString());
listener.getLogger().println(file);

HttpClient httpclient = new DefaultHttpClient();
Expand Down Expand Up @@ -153,8 +156,10 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
entity.addPart("ipa", fileBody);

if (dsymPath != null) {
File dsymFile = getFileLocally(build.getWorkspace(),
vars.expand(dsymPath), tempDir);
FileSet dsymFileSet = Util.createFileSet(new File(build.getWorkspace().getRemote()),
vars.expand(dsymPath), null);
// Take the first one that matches the pattern
File dsymFile = new File(dsymFileSet.iterator().next().toString());
listener.getLogger().println(dsymFile);
FileBody dsymFileBody = new FileBody(dsymFile);
entity.addPart("dsym", dsymFileBody);
Expand Down
Expand Up @@ -3,4 +3,7 @@
You can include build variables here like <code>${BUILD_NUMBER}</code> and they'll be expanded at build time.<br/>
<p/>
e.g. "MyApp/build/Beta-iphoneos/MyApp-Beta-${BUILD_NUMBER}.dsym.zip if your use ${BUILD_NUMBER} as technical version number (CFBundleShortVersionString).
<p/>
Can use wildcards like 'module/dist/**/*.dSYM.zip'.
See <a href='http://ant.apache.org/manual/Types/fileset.html'> the @includes of Ant fileset</a> for the exact format.
</div>
Expand Up @@ -3,4 +3,7 @@
You can include build variables here like <code>${BUILD_NUMBER}</code> and they'll be expanded at build time.
<p/>
e.g. "MyApp/build/Beta-iphoneos/MyApp-Beta-${BUILD_NUMBER}.ipa if your use ${BUILD_NUMBER} as technical version number (CFBundleShortVersionString).
<p/>
Can use wildcards like 'module/dist/**/*.ipa'.
See <a href='http://ant.apache.org/manual/Types/fileset.html'> the @includes of Ant fileset</a> for the exact format.
</div>

1 comment on commit 1b21917

@friederbluemle
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks so much for this patch!

Please sign in to comment.