Skip to content

Commit

Permalink
Merge remote-tracking branch 'b2jrock/JENKINS-22848' into merge
Browse files Browse the repository at this point in the history
Conflicts:
	src/main/java/hockeyapp/HockeyappRecorder.java
  • Loading branch information
ungerts committed May 25, 2014
2 parents 209accf + 276eded commit d06fdf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -9,7 +9,7 @@
<artifactId>hockeyapp</artifactId>
<name>HockeyApp Plugin</name>
<description>Uploads iOS, Mac or Android apps to hockeyapp.net</description>
<version>1.0.7-SNAPSHOT</version>
<version>2.0.0.SNAPSHOT</version>
<packaging>hpi</packaging>

<!-- get every artifact through maven.glassfish.org, which proxies all the artifacts that we need -->
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/hockeyapp/HockeyappRecorder.java
Expand Up @@ -316,11 +316,9 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
tempDir.delete();
tempDir.mkdirs();

String expandedFilePath = vars.expand(filePath);
build.getWorkspace().copyRecursiveTo(expandedFilePath, null, new FilePath(tempDir));
FileSet fileSet = Util.createFileSet(tempDir, expandedFilePath, null);
// Take the first one that matches the pattern
File file = new File(fileSet.iterator().next().toString());
FilePath remoteWorkspace = new FilePath(launcher.getChannel(), build.getWorkspace().getRemote());
FilePath[] remoteFiles = remoteWorkspace.list(vars.expand(filePath));
File file = getFileLocally(remoteWorkspace,remoteFiles[0].getName(),tempDir);
listener.getLogger().println(file);

float fileSize = file.length();
Expand Down Expand Up @@ -355,11 +353,9 @@ public boolean perform(AbstractBuild<?, ?> build, Launcher launcher,
entity.addPart("ipa", fileBody);

if (dsymPath != null) {
String dsymFilePath = vars.expand(dsymPath);
build.getWorkspace().copyRecursiveTo(dsymFilePath, null, new FilePath(tempDir));
FileSet dsymFileSet = Util.createFileSet(tempDir, dsymFilePath, null);
FilePath remoteDsymFiles[] = remoteWorkspace.list(vars.expand(dsymPath));
// Take the first one that matches the pattern
File dsymFile = new File(dsymFileSet.iterator().next().toString());
File dsymFile = getFileLocally(remoteWorkspace,remoteDsymFiles[0].getName(),tempDir);
listener.getLogger().println(dsymFile);
FileBody dsymFileBody = new FileBody(dsymFile);
entity.addPart("dsym", dsymFileBody);
Expand Down

0 comments on commit d06fdf8

Please sign in to comment.