mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Split up the CHANGES.txt file into several others for easier automated releases and maintainability
This commit is contained in:
@@ -67,20 +67,29 @@ public enum CSubmenuReleaseNotes implements ICDoc {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content of CHANGES.txt.
|
||||
* Returns content of README.txt (release) or CHANGES.txt (snapshot).
|
||||
*/
|
||||
private static String getReleaseNotes() {
|
||||
// !! Linux is case-sensitive so file name and extension need to match exactly !!
|
||||
final String filename = ForgeConstants.CHANGES_FILE;
|
||||
|
||||
final String filename = ForgeConstants.CHANGES_FILE_NO_RELEASE;
|
||||
final String filePath = FileUtil.pathCombine(System.getProperty("user.dir"), filename);
|
||||
|
||||
//The file packaged with full releases is not the same as the one for snapshots
|
||||
final String filenameRelease = ForgeConstants.CHANGES_FILE;
|
||||
final String filePathRelease = FileUtil.pathCombine(System.getProperty("user.dir"), filenameRelease);
|
||||
|
||||
String notes;
|
||||
|
||||
if (FileUtil.doesFileExist(filePath)) {
|
||||
notes = filePath + "\n\n" + FileUtil.readFileToString(filePath);
|
||||
} else if (FileUtil.doesFileExist(filePathRelease)) {
|
||||
notes = filePathRelease + "\n\n" + FileUtil.readFileToString(filePathRelease);
|
||||
} else {
|
||||
notes = filePath + "\nis MISSING!";
|
||||
}
|
||||
|
||||
return notes;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@@ -31,14 +31,14 @@ import net.miginfocom.swing.MigLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* Displays contents of CHANGES.txt file.
|
||||
/**
|
||||
* Displays contents of README.txt (release) or CHANGES.txt (snapshot) file.
|
||||
*
|
||||
* @version $Id$
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum VSubmenuReleaseNotes implements IVSubmenu<CSubmenuReleaseNotes> {
|
||||
/** */
|
||||
|
||||
SINGLETON_INSTANCE;
|
||||
|
||||
// Fields used with interface IVDoc
|
||||
@@ -49,10 +49,7 @@ public enum VSubmenuReleaseNotes implements IVSubmenu<CSubmenuReleaseNotes> {
|
||||
private SkinnedTextArea tar;
|
||||
private final FScrollPane scroller;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
private VSubmenuReleaseNotes() {
|
||||
VSubmenuReleaseNotes() {
|
||||
pnlMain.setOpaque(false);
|
||||
pnlMain.setLayout(new MigLayout("insets 0, gap 0, wrap 2"));
|
||||
|
||||
@@ -165,4 +162,5 @@ public enum VSubmenuReleaseNotes implements IVSubmenu<CSubmenuReleaseNotes> {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user