Merge pull request #1708 from dibir-magomedsaygitov/v-dimago/copy-windows-public-scripts-content

[Windows] Add Windows related scripts from MMS-Provisioner
This commit is contained in:
Maxim Lobanov
2020-10-05 11:16:11 +03:00
committed by GitHub
6 changed files with 39 additions and 0 deletions

View File

@@ -82,6 +82,11 @@
"source": "{{ template_dir }}/scripts/SoftwareReport",
"destination": "{{user `image_folder`}}"
},
{
"type": "file",
"source": "{{ template_dir }}/post-generation",
"destination": "C:/post-generation"
},
{
"type": "file",
"source": "{{ template_dir }}/scripts/Tests",

View File

@@ -82,6 +82,11 @@
"source": "{{ template_dir }}/scripts/SoftwareReport",
"destination": "{{user `image_folder`}}"
},
{
"type": "file",
"source": "{{ template_dir }}/post-generation",
"destination": "C:/post-generation"
},
{
"type": "file",
"source": "{{ template_dir }}/scripts/Tests",

View File

@@ -0,0 +1,8 @@
$latestPath = [System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)
$dotnetPath = "$env:USERPROFILE\.dotnet\tools"
if (-not $latestPath.Contains($dotnetPath))
{
$latestPath = "$dotnetPath;$latestPath"
[System.Environment]::SetEnvironmentVariable('PATH', $latestPath, [System.EnvironmentVariableTarget]::Machine)
}

View File

@@ -0,0 +1,12 @@
# Create Rust junction points to cargo and rustup folder
$cargoTarget = "$env:USERPROFILE\.cargo"
if (-not (Test-Path $cargoTarget))
{
New-Item -ItemType Junction -Path $cargoTarget -Target "C:\Rust\.cargo"
}
$rustupTarget = "$env:USERPROFILE\.rustup"
if (-not (Test-Path $rustupTarget))
{
New-Item -ItemType Junction -Path $rustupTarget -Target "C:\Rust\.rustup"
}

View File

@@ -0,0 +1,4 @@
$vsInstallRoot = Get-VisualStudioPath
$devEnvPath = "$vsInstallRoot\Common7\IDE\devenv.exe"
cmd.exe /c "`"$devEnvPath`" /updateconfiguration"

View File

@@ -40,5 +40,10 @@ Choco-Install -PackageName hub
Add-MachinePathItem "C:\Program Files\Git\bin"
# Add well-known SSH host keys to ssh_known_hosts
ssh-keyscan -t rsa github.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
ssh-keyscan -t rsa ssh.dev.azure.com >> "C:\Program Files\Git\etc\ssh\ssh_known_hosts"
Invoke-PesterTests -TestFile "Git" -TestName "Git"
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Hub CLI"