Improves Fixup, Expand, Detail and Ignore Tags. Adds Priority Tag. A lot of git stuff below. [FIXUP] [[fixes]] sha = "2cfdcb10e2b2746ce7dc27b7864bd40c3005a638" newBody = ''' [EXPAND] [[messages]] messageBody = """ [IGNORE] checks = { compareBefore = "1.7-alpha-2" } # Only apply this if the commit being compared against is 1.7-alpha-2 or newer [IGNORE] [BREAKING] [DETAILS] details = [ \"Lots of QoL, Balance Changes and Bug Fixes from both GT 2.8 Update and Nomi Labs... Check your Recipes!\", \"**Please DO NOT revert any saves that have been loaded in this release to 1.7-alpha-2a or prior!**\", ] [DETAILS] [PRIORITY] priority = 20 [PRIORITY] """ [[messages]] messageBody = """ [COMBINE] commit = \"bd58b9072f45d647734ae66168cbd27bf9b2f220\" [COMBINE] [NO CATEGORY] """ [[messages]] messageBody = """ [FEATURE] [QOL] [DETAILS] details = [ \"Removes Anvil XP Scaling\", \"Custom Items, Blocks, and Multiblocks Improvements\", \"EIO Capacitor and Custom Capacitor Improvements\", \"Draconic Energy Core Improvements\", \"New ArchitectureCraft GUI for Sawbench & New Slopes (Comes from [GTNH's Fork](https://github.com/GTNewHorizons/ArchitectureCraft))\", \"Removes Bogo Feature in Bogo Sort\", \"Red Coal NBT Removal\", [\"Automatically Removed for all Red Coals Items, in AE2 Patterns and Elsewhere!\"], ] [DETAILS] """ [[messages]] messageBody = """ [QB] [DETAILS] detail = \"Genesis is Now Slowly Revealed\" [DETAILS] """ [[messages]] messageBody = """ [BUG] [DETAILS] details = [ \"Fixes NBT Recipe Problems\", \"Fixes Recycling Recipes\", \"Fixes HM Assembly Line Duplicate Recipe for UV Field Generator (#517)\", \"Fixes Some HM Assembly Line Recipes not having Research\", \"Fixes IV Quad/Nonuple Hatches & Buses being Uncraftable (#550)\", \"Fixes Missing ABS Recipes\", \"Fixes Language Override for Rhodium-Lumium Palladium\", \"Fixes Oxygen, Hydrogen and Nitrogen showing up as a Null Texture in JEI/HEI\", \"Fixes Multiblock Searching in JEI (#519)\", \"Removes Vanilla Ores from JEI\", \"Fixes Buckets showing up in JEI\", ] [DETAILS] [IGNORE] checks = { compareBefore = "1.7-alpha-2" } # Only apply this if the commit being compared against is 1.7-alpha-2 or newer [IGNORE] """ [[messages]] messageBody = """ [BUG] [DETAILS] details = [ \"Fixes NBT Recipe Problems\", \"Fixes Recycling Recipes\", \"Fixes Oxygen, Hydrogen and Nitrogen showing up as a Null Texture in JEI/HEI\", \"Fixes Multiblock Searching in JEI (#519)\", \"Removes Vanilla Ores from JEI\", \"Addresses Buckets showing up in JEI\", ] [DETAILS] [IGNORE] checks = { compareAfter = "1.7-alpha-2" } # Only apply this if the commit being compared against is 1.7-alpha-2 or older [IGNORE] """ [[messages]] messageBody = """ [BALANCING] [DETAILS] details = [ \"Added Cobaltite to the T3 Micro Miner\", \"Adds Recipe for Dragon Breath with High-Octane Gasoline (#629)\", \"Rebalance Processing Array Recipe (#501)\", \"Reduces Cost of Thermal Fluxbore (#392)\", [ \"Drill Head is now Cheaper, only requiring 5x Nomiquarters (25) instead of 5x Nomidollars (100) (Normal Mode)\", \"Fluxbore Head is now Cheaper, being Vanadium Steel Drill Head instead of Stainless Steel (Hard Mode)\", ], ] [DETAILS] """ [[messages]] messageBody = "[INTERNAL]" [EXPAND] ''' [[fixes]] sha = "bd58b9072f45d647734ae66168cbd27bf9b2f220" newTitle = "Update GT and Related Mods for 1.7" newBody = ''' [EXPAND] [[messages]] messageTitle = "Update GT to 2.8+, add Nomi Labs" messageBody = """ [BREAKING] [DETAILS] details = [ \"**Please DO NOT revert any saves that have been loaded in this release to 1.6.1a or prior!**\", \"**Lots of Recipes have been moved to the Assembly Line, and now require Assembly Line Research.**\", \"Adds Assembly Line Research\", \"Adds ME Hatches and Buses, for combining Multiblocks with AE Networks\", \"Adds Filtered Output Hatches\", \"Adds EU Multiblock Power Storage\", \"Adds Multiblock Transformer and Laser Power Transfer\", \"Adds Long Distance Pipes\", \"Creating Waypoints in the Prospector\", \"Fixing many Bugs\", \"And many more!\" ] [DETAILS] [PRIORITY] priority = 10 [PRIORITY] """ [[messages]] messageTitle = "Multiblock Changes" messageBody = """ [BREAKING] [DETAILS] details = [ \"Multiblocks accept a new **maximum** of 2 Energy Hatches.\", \"All Custom Multiblocks, such as Naquadah Reactors and Multiverse Projectors, now have **minimum casing requirements** and a **maintenance hatch**.\", \"Some Custom Multiblocks now have Distinct Mode\", \"All Custom Multiblocks now have custom Front Overlays\", \"Reworked & Improved Multiblock UIs\" ] [DETAILS] [PRIORITY] priority = 5 [PRIORITY] """ [EXPAND] ''' [FIXUP] [SKIP]
108 lines
2.9 KiB
TypeScript
108 lines
2.9 KiB
TypeScript
import { Commit, FixUpInfo, InputReleaseType, ParsedModInfo } from "../../types/changelogTypes";
|
|
import { getLastGitTag, getTags, isEnvVariableSet } from "../../util/util";
|
|
|
|
export default class ChangelogData {
|
|
since: string;
|
|
to: string;
|
|
releaseType: InputReleaseType;
|
|
isTest: boolean;
|
|
|
|
builder: string[];
|
|
commitList: Commit[];
|
|
|
|
commitFixes: Map<string, FixUpInfo>;
|
|
shaList: Set<string>;
|
|
|
|
// Map of a commit SHA to the commits which need to be added to its commit list.
|
|
combineList: Map<string, Commit[]>;
|
|
|
|
// Set of tags before 'to' (Target)
|
|
tags: Set<string>;
|
|
|
|
// Set of tags before 'since' (Compare)
|
|
compareTags: Set<string>;
|
|
|
|
// Map of project IDs to info text and/or details
|
|
modInfoList: Map<number, ParsedModInfo>;
|
|
|
|
/**
|
|
* A normal initialisation.
|
|
*/
|
|
async init(): Promise<void> {
|
|
this.since = getLastGitTag();
|
|
this.to = "HEAD";
|
|
|
|
// If this is a tagged build, fetch the tag before last.
|
|
if (isEnvVariableSet("GITHUB_TAG")) {
|
|
this.since = getLastGitTag(process.env.GITHUB_TAG);
|
|
this.to = process.env.GITHUB_TAG;
|
|
}
|
|
|
|
// Get Release Type
|
|
this.releaseType = "Release";
|
|
if (isEnvVariableSet("RELEASE_TYPE")) this.releaseType = process.env.RELEASE_TYPE as InputReleaseType;
|
|
|
|
// See if current run is test
|
|
if (isEnvVariableSet("TEST_CHANGELOG")) {
|
|
try {
|
|
this.isTest = JSON.parse(process.env.TEST_CHANGELOG.toLowerCase());
|
|
} catch (err) {
|
|
throw new Error("Test Changelog Env Variable set to Invalid Value.");
|
|
}
|
|
}
|
|
|
|
// Initialise Final Builder
|
|
this.builder = [];
|
|
|
|
// List of all commits to put into changelog commit section
|
|
this.commitList = [];
|
|
|
|
this.commitFixes = new Map<string, FixUpInfo>();
|
|
this.shaList = new Set<string>();
|
|
this.combineList = new Map<string, Commit[]>();
|
|
|
|
this.tags = new Set<string>(await getTags(this.to));
|
|
this.compareTags = new Set<string>(await getTags(this.since));
|
|
|
|
this.modInfoList = new Map<number, ParsedModInfo>();
|
|
}
|
|
|
|
shouldIterate(): boolean {
|
|
return isEnvVariableSet("COMPARE_TAG");
|
|
}
|
|
|
|
/**
|
|
* Gets the compare tags, or iterations. Also sets up the iteration environment.
|
|
* @return tags The Compare Tags
|
|
*/
|
|
getIterations(): string[] {
|
|
const iterations = process.env.COMPARE_TAG;
|
|
return iterations.split(",").map((tag) => tag.trim());
|
|
}
|
|
|
|
/**
|
|
* Setups the state for a iteration. Init must be called first.
|
|
*/
|
|
async setupIteration(compareTag: string): Promise<void> {
|
|
this.since = compareTag;
|
|
this.compareTags = new Set<string>(await getTags(this.since));
|
|
}
|
|
|
|
/**
|
|
* Resets the state for a future iteration. Init must be called first.
|
|
*/
|
|
resetForIteration(): void {
|
|
// Reset all lists, except builder
|
|
this.commitList = [];
|
|
|
|
this.commitFixes = new Map<string, FixUpInfo>();
|
|
this.shaList = new Set<string>();
|
|
this.combineList = new Map<string, Commit[]>();
|
|
|
|
this.modInfoList = new Map<number, ParsedModInfo>();
|
|
|
|
// Tags list is fine because the 'to' (Target) stays the same
|
|
// Other Tags list is generated at setup
|
|
}
|
|
}
|