Skip to content

Commit

Permalink
Link release notes and changelog to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
gerundt committed Mar 1, 2023
1 parent 84d83a3 commit f1b8741
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 29 deletions.
4 changes: 2 additions & 2 deletions htdocs/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<li><a href="https://manual.winmerge.org/jp/"><?php __e('Japanese');?></a></li>
</ul>
</li>
<li><a href="/docs/releasenotes.php"><?php __e('Release Notes');?></a></li>
<li><a href="/docs/changelog.php"><?php __e('Change Log');?></a></li>
<li><a href="<?php print($page->getStableRelease()->getReleaseNotes());?>"><?php __e('Release Notes');?></a></li>
<li><a href="<?php print($page->getStableRelease()->getChangeLog());?>"><?php __e('Change Log');?></a></li>
</ul>
</li>
<li><a href="/downloads/"><?php __e('Downloads');?></a></li>
Expand Down
13 changes: 3 additions & 10 deletions htdocs/docs/changelog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
include('../engine/engine.inc');

$page = new Page;
$page->setDescription(__('The change log is a more complete list of changes in the last WinMerge releases.'));
$page->setKeywords(__('WinMerge, change log, changes, release, tracker item, revision number'));
$page->printHead(__('Change Log'), TAB_DOCS);
$changelog = $page->getContentFromHtmlFile('ChangeLog.html');
if ($changelog == '')
$page->printPara(__('The change log is currently not available...'));
else
print($changelog);
$page->printFoot();
?>

header(sprintf('Location: %s', $page->getStableRelease()->getChangeLog()), true, 301);
exit();
9 changes: 5 additions & 4 deletions htdocs/docs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
include('../engine/engine.inc');

$page = new Page;
$stablerelease = $page->getStableRelease();
$page->setDescription(__('Documentation from WinMerge like manual, release notes, change log and Development Wiki.'));
$page->setKeywords(__('WinMerge, documentation, manual, release notes, known issues, change log, Development Wiki'));
$page->printHead(__('Documentation'), TAB_DOCS);
Expand All @@ -16,10 +17,10 @@
<li><a href="https://manual.winmerge.org/jp/" class="button is-small"><?php __e('Japanese');?></a></li>
</ul>
<?php
$page->printLinkedSubHeading(__('Release Notes'), $translations->prepareLink('releasenotes.php'));
$page->printPara(__('The <a href="%1$s">release notes</a> are a short summary of important changes, enhancements, bug fixes and <a href="%2$s">known issues</a> in the current WinMerge release.', $translations->prepareLink('releasenotes.php'), $translations->prepareLink('releasenotes.php#known-issues')));
$page->printLinkedSubHeading(__('Change Log'), $translations->prepareLink('changelog.php'));
$page->printPara(__('The <a href="%s">change log</a> is a more complete list of changes in the last WinMerge releases.', $translations->prepareLink('changelog.php')));
$page->printLinkedSubHeading(__('Release Notes'), $stablerelease->getReleaseNotes());
$page->printPara(__('The <a href="%1$s">release notes</a> are a short summary of important changes, enhancements, bug fixes and <a href="%2$s">known issues</a> in the current WinMerge release.', $stablerelease->getReleaseNotes(), $stablerelease->getKnownIssues()));
$page->printLinkedSubHeading(__('Change Log'), $stablerelease->getChangeLog());
$page->printPara(__('The <a href="%s">change log</a> is a more complete list of changes in the last WinMerge releases.', $stablerelease->getChangeLog()));
//$page->printLinkedSubHeading(__('Development Wiki'), 'http://wiki.winmerge.org/');
//$page->printPara(__('The <a href="%s">Development Wiki</a> contains much information about the WinMerge development.', 'http://wiki.winmerge.org/'));

Expand Down
15 changes: 3 additions & 12 deletions htdocs/docs/releasenotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
include('../engine/engine.inc');

$page = new Page;
$page->setDescription(__('The release notes are a short summary of important changes, enhancements, bug fixes and known issues in the current WinMerge release.'));
$page->setKeywords(__('WinMerge, release notes, summary, changes, enhancements, bug fixes, known issues, release'));
$page->printHead(__('Release Notes'), TAB_DOCS);
$releasenotes = $page->getContentFromHtmlFile('ReleaseNotes.html', '#href="ChangeLog.html"#si', 'href="changelog.php"');
if ($releasenotes == '') {
$page->printHeading(__('Release Notes'));
$page->printPara(__('The release notes are currently not available...'));
}
else
print($releasenotes);
$page->printFoot();
?>

header(sprintf('Location: %s', $page->getStableRelease()->getReleaseNotes()), true, 301);
exit();
2 changes: 1 addition & 1 deletion htdocs/downloads/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$page->printPara(__('The easiest way to install WinMerge is to download and run the Installer. Read the <a href="%s">online manual</a> for help using it.', 'https://manual.winmerge.org/en/Install.html'));
$page->printSubHeading(__('WinMerge %s', $stablerelease->getVersionNumber()));
$page->printPara(__('The current WinMerge version is <strong>%1$s</strong> and was released at <strong>%2$s</strong>.', $stablerelease->getVersionNumber(), $stablerelease->getDate()),
__('For detailed info on what is new, read the <a href="%1$s">change log</a> and the <a href="%2$s">release notes</a>.', $translations->prepareLink('/docs/changelog.php'), $translations->prepareLink('/docs/releasenotes.php')));
__('For detailed info on what is new, read the <a href="%1$s">change log</a> and the <a href="%2$s">release notes</a>.', $stablerelease->getChangeLog(), $stablerelease->getReleaseNotes()));
?>
<div class="table-scrollable">
<table class="table is-striped">
Expand Down
3 changes: 3 additions & 0 deletions htdocs/engine/page.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
$this->_stablerelease->addDownload('exe64.zip', 'https://github.com/WinMerge/winmerge/releases/download/v2.16.28/winmerge-2.16.28-x64-exe.zip', 10747584, 'e1c6dca744b2022dc0f3a105164d29f151373fa067411e579e6e005ba7a98b8b');
$this->_stablerelease->addDownload('exearm64.zip', 'https://github.com/WinMerge/winmerge/releases/download/v2.16.28/winmerge-2.16.28-ARM64-exe.zip', 10190321, '3740d6c1ed74b5f412490cedf2e28295f1bf07d8eee653530f94203c0db3f716');
$this->_stablerelease->addDownload('src.7z', 'https://github.com/WinMerge/winmerge/releases/download/v2.16.28/winmerge-2.16.28-full-src.7z', 14191248, 'f481cecbc9d5b5a16d085780b9060b25adb8a5c50edebd2s6ddcd2fd39dce13e0');
$this->_stablerelease->setReleaseNotes('https://github.com/WinMerge/winmerge/releases/tag/v2.16.28');
$this->_stablerelease->setKnownIssues('https://github.com/WinMerge/winmerge/releases/tag/v2.16.26#known-issues');
$this->_stablerelease->setChangeLog('https://github.com/WinMerge/winmerge/blob/v2.16.28/Docs/Users/ChangeLog.md');
}

/**
Expand Down
49 changes: 49 additions & 0 deletions htdocs/engine/release.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
var $_versionnumber;
var $_date;
var $_downloads, $_downloadsizes, $_downloadsha256sums;
var $_releasenotes, $_knownissues, $_changeLog;

/**
* Constructor
Expand All @@ -26,6 +27,9 @@
$this->_downloads = array();
$this->_downloadsizes = array();
$this->_downloadsha256sums = array();
$this->_releasenotes = '';
$this->_knownissues = '';
$this->_changeLog = '';
}

/**
Expand Down Expand Up @@ -122,6 +126,51 @@
return basename($this->_downloads[$id]);
}

/**
* set the release notes URL from the release
* @param string $url release notes URL
*/
function setReleaseNotes($url) {
$this->_releasenotes = $url;
}

/**
* get the release notes URL from the release
*/
function getReleaseNotes() {
return $this->_releasenotes;
}

/**
* set the known issues URL from the release
* @param string $url known issues URL
*/
function setKnownIssues($url) {
$this->_knownissues = $url;
}

/**
* get the known issues URL from the release
*/
function getKnownIssues() {
return $this->_knownissues;
}

/**
* set the change log URL from the release
* @param string $url known issues URL
*/
function setChangeLog($url) {
$this->_changeLog = $url;
}

/**
* get the change log URL from the release
*/
function getChangeLog() {
return $this->_changeLog;
}

/**
* format the size
*/
Expand Down

0 comments on commit f1b8741

Please sign in to comment.