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

Commit

Permalink
Disable History.rst overriding (#877)
Browse files Browse the repository at this point in the history
* Disable History.rst overriding

* add protection for history.rst and yaml file
  • Loading branch information
kairu-ms authored Aug 11, 2021
1 parent 2352caf commit 130ea45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/generate/azgenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ export async function processRequest(host: Host) {
PathConstants.recordingFolder,
),
);
session.protectFiles(
path.join(configHandler.azOutputFolder, PathConstants.historyRstFile),
);
session.protectFiles(
path.join(configHandler.azOutputFolder, PathConstants.readmeFile),
);
session.protectFiles(
path.join(configHandler.azOutputFolder, PathConstants.linterExclusionsFile),
);
} while (model.SelectNextExtension());
}

Expand Down
2 changes: 1 addition & 1 deletion src/generate/generators/ExtensionFull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class AzExtensionFullGenerator extends GeneratorBase {
await this.generateFullSingleAndAddtoOutput(new CliTopHelp(this.model));
await this.generateFullSingleAndAddtoOutput(new CliTopMetadata(this.model));
await this.generateFullSingleAndAddtoOutput(new CliReport(this.model));
await this.generateFullSingleAndAddtoOutput(new CliExtHistory(this.model));
await this.generateFullSingleAndAddtoOutput(new CliExtHistory(this.model), false);
await this.generateFullSingleAndAddtoOutput(new CliExtReadme(this.model), false);
await this.generateFullSingleAndAddtoOutput(new CliExtSetupCfg(this.model));
await this.generateFullSingleAndAddtoOutput(new CliExtSetupPy(this.model));
Expand Down
1 change: 1 addition & 0 deletions src/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class PathConstants {
public static readonly setupPyFile: string = 'setup.py';
public static readonly setupCfgFile: string = 'setup.cfg';
public static readonly historyRstFile: string = 'HISTORY.rst';
public static readonly linterExclusionsFile: string = 'linter_exclusions.yml';
public static readonly docSourceJsonFile: string = path.join(
'/doc/sphinx/azhelpgen/doc_source_map.json',
);
Expand Down

0 comments on commit 130ea45

Please sign in to comment.