Skip to content

Commit

Permalink
Revert "generate assemblyinfo.cs for new module (#1376)"
Browse files Browse the repository at this point in the history
This reverts commit f925a81.
  • Loading branch information
dolauli committed Sep 24, 2024
1 parent 694cced commit bf53c2a
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 90 deletions.
2 changes: 0 additions & 2 deletions powershell/generators/gitignore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
Expand Down
11 changes: 0 additions & 11 deletions powershell/internal/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export class Project extends codeDomProject {
public uxFolder!: string;
public serviceName!: string;
public moduleName!: string;
public title!: string;
public rootModuleName!: string;
public csproj!: string;
public nuspec!: string;
Expand All @@ -152,10 +151,6 @@ export class Project extends codeDomProject {
public readme!: string;
public afterBuildTasksPath!: string;
public afterBuildTasksArgs!: string;
public assemblyInfoFolder!: string;
public assemblyCompany!: string;
public assemblyProduct!: string;
public assemblyCopyright!: string;
public dllName!: string;
public dll!: string;
public psd1!: string;
Expand Down Expand Up @@ -289,7 +284,6 @@ export class Project extends codeDomProject {
this.serviceName = this.model.language.default.serviceName;
this.subjectPrefix = this.model.language.default.subjectPrefix;
this.moduleName = await this.state.getValue('module-name');
this.title = await this.state.getValue('title');
this.rootModuleName = await this.state.getValue('root-module-name', '');
this.dllName = await this.state.getValue('dll-name');
// Azure PowerShell data plane configuration
Expand Down Expand Up @@ -346,11 +340,6 @@ export class Project extends codeDomProject {
const afterBuildTasksArgsDictionary: Dictionary<string> = await this.state.getValue<Dictionary<string>>('after-build-tasks-args', {});
this.afterBuildTasksArgs = JSON.stringify(afterBuildTasksArgsDictionary);

this.assemblyInfoFolder = await this.state.getValue('assemblyInfo-folder', '');
this.assemblyCompany = await this.state.getValue('assembly-company', '');
this.assemblyProduct = await this.state.getValue('assembly-product', '');
this.assemblyCopyright = await this.state.getValue('assembly-copyright', '');

// excluded properties in table view
const excludedList = <Array<string>>(
values(
Expand Down
3 changes: 0 additions & 3 deletions powershell/plugins/powershell-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ export async function powershellV2(service: Host | TspHost, state?: ModelState<P
await project.state.protectFiles(project.examplesFolder);
await project.state.protectFiles(project.resourcesFolder);
await project.state.protectFiles(project.uxFolder);
if (project.azure) {
await project.state.protectFiles(project.assemblyInfoFolder);
}

// wait for all the generation to be done
await copyRequiredFiles(project);
Expand Down
8 changes: 1 addition & 7 deletions powershell/resources/assets/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,11 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

$assemblyInfoPath = Join-Path $PSScriptRoot 'Properties' 'AssemblyInfo.cs'
if (-not (Test-Path $assemblyInfoPath) -And [System.Convert]::ToBoolean('${$project.azure}')) {
Write-Host -ForegroundColor Green 'Creating assembly info...'
New-AssemblyInfo
}

if (-not $DisableAfterBuildTasks){
$afterBuildTasksPath = Join-Path $PSScriptRoot '${$project.afterBuildTasksPath}'
$afterBuildTasksArgs = ConvertFrom-Json '${$project.afterBuildTasksArgs}' -AsHashtable
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
Write-Host -ForegroundColor Green 'Executing after build tasks...'
Write-Host -ForegroundColor Green 'Running after build tasks...'
. $afterBuildTasksPath @afterBuildTasksArgs
}
}
Expand Down
1 change: 0 additions & 1 deletion powershell/resources/built-time-cmdlets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<Compile Include="psruntime\BuildTime\Cmdlets\ExportExampleStub.cs" />
<Compile Include="psruntime\BuildTime\Cmdlets\GetModuleGuid.cs" />
<Compile Include="psruntime\BuildTime\Cmdlets\ExportPsd1.cs" />
<Compile Include="psruntime\BuildTime\Cmdlets\NewAssemblyInfo.cs" />
<Compile Include="psruntime\BuildTime\Cmdlets\GetCommonParameter.cs" />
<Compile Include="psruntime\BuildTime\Models\PsHelpMarkdownOutputs.cs" />
<Compile Include="psruntime\BuildTime\Models\PsMarkdownTypes.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ protected override void ProcessRecord()
else
{
var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList();
if (!String.IsNullOrEmpty(aliasesList))
{
if (!String.IsNullOrEmpty(aliasesList)) {
sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}");
}
}
Expand Down

This file was deleted.

0 comments on commit bf53c2a

Please sign in to comment.