Skip to content
This repository was archived by the owner on Jul 14, 2023. It is now read-only.

Commit 130ea45

Browse files
authored
Disable History.rst overriding (#877)
* Disable History.rst overriding * add protection for history.rst and yaml file
1 parent 2352caf commit 130ea45

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/generate/azgenerator.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ export async function processRequest(host: Host) {
3030
PathConstants.recordingFolder,
3131
),
3232
);
33+
session.protectFiles(
34+
path.join(configHandler.azOutputFolder, PathConstants.historyRstFile),
35+
);
3336
session.protectFiles(
3437
path.join(configHandler.azOutputFolder, PathConstants.readmeFile),
3538
);
39+
session.protectFiles(
40+
path.join(configHandler.azOutputFolder, PathConstants.linterExclusionsFile),
41+
);
3642
} while (model.SelectNextExtension());
3743
}
3844

src/generate/generators/ExtensionFull.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class AzExtensionFullGenerator extends GeneratorBase {
8585
await this.generateFullSingleAndAddtoOutput(new CliTopHelp(this.model));
8686
await this.generateFullSingleAndAddtoOutput(new CliTopMetadata(this.model));
8787
await this.generateFullSingleAndAddtoOutput(new CliReport(this.model));
88-
await this.generateFullSingleAndAddtoOutput(new CliExtHistory(this.model));
88+
await this.generateFullSingleAndAddtoOutput(new CliExtHistory(this.model), false);
8989
await this.generateFullSingleAndAddtoOutput(new CliExtReadme(this.model), false);
9090
await this.generateFullSingleAndAddtoOutput(new CliExtSetupCfg(this.model));
9191
await this.generateFullSingleAndAddtoOutput(new CliExtSetupPy(this.model));

src/utils/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export class PathConstants {
7575
public static readonly setupPyFile: string = 'setup.py';
7676
public static readonly setupCfgFile: string = 'setup.cfg';
7777
public static readonly historyRstFile: string = 'HISTORY.rst';
78+
public static readonly linterExclusionsFile: string = 'linter_exclusions.yml';
7879
public static readonly docSourceJsonFile: string = path.join(
7980
'/doc/sphinx/azhelpgen/doc_source_map.json',
8081
);

0 commit comments

Comments
 (0)