Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,19 @@ private boolean writePackageMetadata( List<StoreResource> firstLevelFiles, Artif
}

// Generate tarball url if missing
String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname
if ( versionMetadata.getDist() == null )
{
String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname
//logger.debug( "Generate dist tarball: {}", tarball );
versionMetadata.setDist( new Dist( tarball ) );
versionMetadata.setDist( new Dist( tarball ) );
} else {
// Detect bad tarball and replace with correct one
if ( versionMetadata.getDist().getTarball() == null || !versionMetadata.getDist().getTarball().endsWith(packagePath.getTarPath()) )
{
Dist dist = versionMetadata.getDist();
dist.setTarball( tarball );
versionMetadata.setDist( dist );
}
}
}
catch ( IOException e )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class Dist

private final String shasum;

private final String tarball;
private String tarball;

private final String integrity;

Expand Down Expand Up @@ -69,6 +69,11 @@ public String getTarball()
return tarball;
}

public void setTarball( String tarball )
{
this.tarball = tarball;
}

public String getIntegrity()
{
return integrity;
Expand Down
Loading