Skip to content

Commit

Permalink
Add 'releaseTimestamp' with second resolution to plugin-versions.json (
Browse files Browse the repository at this point in the history
…#636)

Co-authored-by: Daniel Beck <[email protected]>
  • Loading branch information
daniel-beck and daniel-beck authored Aug 30, 2022
1 parent 98872a1 commit da50214
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import io.jenkins.update_center.HPI;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Locale;

public class PluginVersionsEntry {
@JSONField
Expand All @@ -24,6 +26,8 @@ public class PluginVersionsEntry {
public final String version;
@JSONField
public final String compatibleSinceVersion;
@JSONField
public final String releaseTimestamp;

@JSONField
public final List<HPI.Dependency> dependencies;
Expand All @@ -39,5 +43,8 @@ public class PluginVersionsEntry {
buildDate = hpi.getTimestampAsString();
dependencies = hpi.getDependencies();
compatibleSinceVersion = hpi.getCompatibleSinceVersion();
releaseTimestamp = TIMESTAMP_FORMATTER.format(hpi.getTimestamp());
}

private static final SimpleDateFormat TIMESTAMP_FORMATTER = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.00Z'", Locale.US);
}

0 comments on commit da50214

Please sign in to comment.