mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-08-04 01:15:27 +02:00
manual refactoring + versioninfo xml refactoring
This commit is contained in:
@@ -8095,7 +8095,7 @@ public class Kst4ContestApplication extends Application implements StatusUpdateL
|
|||||||
vbxUpdateWindow.getChildren().add(upd_gridPaneUpd);
|
vbxUpdateWindow.getChildren().add(upd_gridPaneUpd);
|
||||||
upd_gridPaneUpd.add(lblUpdateInfo, 0,0,1,1);
|
upd_gridPaneUpd.add(lblUpdateInfo, 0,0,1,1);
|
||||||
upd_gridPaneUpd.add(lblUpdateInfo2, 0,1,1,1);
|
upd_gridPaneUpd.add(lblUpdateInfo2, 0,1,1,1);
|
||||||
upd_gridPaneUpd.add(new Label("kst4Contest " + ApplicationConstants.APPLICATION_CURRENT_VERSION), 1,1,1,1);
|
upd_gridPaneUpd.add(new Label("KST4Contest " + ApplicationConstants.APPLICATION_CURRENT_VERSION), 1,1,1,1);
|
||||||
upd_gridPaneUpd.add(lblUpdateInfo3, 0,2,1,1);
|
upd_gridPaneUpd.add(lblUpdateInfo3, 0,2,1,1);
|
||||||
upd_gridPaneUpd.add(new Label("KST4Contest " + chatcontroller.getUpdateInformation().getLatestVersionForDisplay()), 1,2,1,1);
|
upd_gridPaneUpd.add(new Label("KST4Contest " + chatcontroller.getUpdateInformation().getLatestVersionForDisplay()), 1,2,1,1);
|
||||||
upd_gridPaneUpd.add(lblUpdateInfoChanges, 0,3,1,1);
|
upd_gridPaneUpd.add(lblUpdateInfoChanges, 0,3,1,1);
|
||||||
|
|||||||
@@ -133,20 +133,35 @@ module.exports = async function () {
|
|||||||
parts.push("<praktiKST>");
|
parts.push("<praktiKST>");
|
||||||
|
|
||||||
const latestTag = stable ? stable.tagName : null;
|
const latestTag = stable ? stable.tagName : null;
|
||||||
const winFilename = latestTag ? `praktiKST-${latestTag}-windows-x64.zip` : "";
|
|
||||||
|
|
||||||
parts.push(" <latestVersion>");
|
parts.push(" <latestVersion>");
|
||||||
if (stable) {
|
if (stable) {
|
||||||
const latestIssues = await getIssuesForRelease("1970-01-01T00:00:00Z", stable.publishedAt);
|
const latestIssues = await getIssuesForRelease(
|
||||||
parts.push(` <versionNumber>${escapeXml(toAppVersionNumber(latestTag))}</versionNumber>`);
|
"1970-01-01T00:00:00Z",
|
||||||
|
stable.publishedAt
|
||||||
|
);
|
||||||
|
|
||||||
|
// Kept for application versions that still expect the old numeric format.
|
||||||
|
parts.push(
|
||||||
|
` <versionNumber>${escapeXml(toAppVersionNumber(latestTag))}</versionNumber>`
|
||||||
|
);
|
||||||
|
|
||||||
|
// Used by current application versions for correct semantic comparison
|
||||||
|
// and display, for example 1.41.1 instead of 1.411.
|
||||||
|
parts.push(
|
||||||
|
` <semanticVersion>${escapeXml(toSemanticVersion(latestTag))}</semanticVersion>`
|
||||||
|
);
|
||||||
|
|
||||||
|
parts.push(" <adminMessage></adminMessage>");
|
||||||
|
parts.push(
|
||||||
|
` <majorChanges>${escapeXml(latestIssues.added.slice(0, 300))}</majorChanges>`
|
||||||
|
);
|
||||||
|
|
||||||
|
// The release page is deliberately platform-neutral. The application
|
||||||
|
// cannot know whether the user needs Windows, Linux or macOS packages.
|
||||||
parts.push(
|
parts.push(
|
||||||
` <latestVersionPathOnWebserver>https://github.com/${REPO}/releases/tag/${latestTag}</latestVersionPathOnWebserver>`
|
` <latestVersionPathOnWebserver>https://github.com/${REPO}/releases/tag/${latestTag}</latestVersionPathOnWebserver>`
|
||||||
);
|
);
|
||||||
parts.push(" <adminMessage></adminMessage>");
|
|
||||||
parts.push(` <majorChanges>${escapeXml(latestIssues.added.slice(0, 300))}</majorChanges>`);
|
|
||||||
parts.push(
|
|
||||||
` <latestVersionPathOnWebserver>https://github.com/${REPO}/releases/download/${latestTag}/${winFilename}</latestVersionPathOnWebserver>`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
parts.push(" </latestVersion>");
|
parts.push(" </latestVersion>");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user