Skip to content

Commit

Permalink
Revert VCPKG_ROOT variable (actions#6449)
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-bershel committed Oct 24, 2022
1 parent c2112cb commit 88d253f
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,6 @@ function Build-PackageManagementEnvironmentTable {
@{
"Name" = "VCPKG_INSTALLATION_ROOT"
"Value" = $env:VCPKG_INSTALLATION_ROOT
},
@{
"Name" = "VCPKG_ROOT"
"Value" = $env:VCPKG_ROOT
}
) | ForEach-Object {
[PSCustomObject] @{
Expand Down
17 changes: 8 additions & 9 deletions images/linux/scripts/installers/vcpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
## Desc: Installs vcpkg
################################################################################

# Set env variables for vcpkg
VCPKG_ROOT=/usr/local/share/vcpkg
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_ROOT}" | tee -a /etc/environment
echo "VCPKG_ROOT=${VCPKG_ROOT}" | tee -a /etc/environment
# Set env variable for vcpkg
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environment

# Install vcpkg
git clone https://github.com/Microsoft/vcpkg $VCPKG_ROOT
git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT

$VCPKG_ROOT/bootstrap-vcpkg.sh
$VCPKG_ROOT/vcpkg integrate install
chmod 0777 -R $VCPKG_ROOT
ln -sf $VCPKG_ROOT/vcpkg /usr/local/bin
$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh
$VCPKG_INSTALLATION_ROOT/vcpkg integrate install
chmod 0777 -R $VCPKG_INSTALLATION_ROOT
ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin

invoke_tests "Tools" "Vcpkg"
17 changes: 8 additions & 9 deletions images/macos/provision/core/vcpkg.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh

# Set env variables for vcpkg
VCPKG_ROOT=/usr/local/share/vcpkg
echo "export VCPKG_INSTALLATION_ROOT=${VCPKG_ROOT}" | tee -a ~/.bashrc
echo "export VCPKG_ROOT=${VCPKG_ROOT}" | tee -a ~/.bashrc
# Set env variable for vcpkg
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
echo "export VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a ~/.bashrc

# Install vcpkg
git clone https://github.com/Microsoft/vcpkg $VCPKG_ROOT
$VCPKG_ROOT/bootstrap-vcpkg.sh
$VCPKG_ROOT/vcpkg integrate install
chmod -R 0777 $VCPKG_ROOT
ln -sf $VCPKG_ROOT/vcpkg /usr/local/bin
git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT
$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh
$VCPKG_INSTALLATION_ROOT/vcpkg integrate install
chmod -R 0777 $VCPKG_INSTALLATION_ROOT
ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin

invoke_tests "Common" "vcpkg"
4 changes: 0 additions & 4 deletions images/macos/software-report/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,6 @@ function Build-PackageManagementEnvironmentTable {
@{
"Name" = "VCPKG_INSTALLATION_ROOT"
"Value" = $env:VCPKG_INSTALLATION_ROOT
},
@{
"Name" = "VCPKG_ROOT"
"Value" = $env:VCPKG_ROOT
}
) | ForEach-Object {
[PSCustomObject] @{
Expand Down
1 change: 0 additions & 1 deletion images/win/scripts/Installers/Install-Vcpkg.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ Invoke-Expression "$InstallDir\$VcpkgExecPath integrate install"
Add-MachinePathItem $InstallDir
$env:Path = Get-MachinePath
setx VCPKG_INSTALLATION_ROOT $InstallDir /M
setx VCPKG_ROOT $InstallDir /M

Invoke-PesterTests -TestFile "Tools" -TestName "Vcpkg"
4 changes: 0 additions & 4 deletions images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,6 @@ function Build-PackageManagementEnvironmentTable {
@{
"Name" = "VCPKG_INSTALLATION_ROOT"
"Value" = $env:VCPKG_INSTALLATION_ROOT
},
@{
"Name" = "VCPKG_ROOT"
"Value" = $env:VCPKG_ROOT
}
)
if (Test-IsWin19) {
Expand Down
8 changes: 2 additions & 6 deletions images/win/scripts/Tests/Tools.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,9 @@ Describe "Vcpkg" {
It "env variable VCPKG_INSTALLATION_ROOT is set" {
$env:VCPKG_INSTALLATION_ROOT | Should -Not -BeNullOrEmpty
}

It "env variable VCPKG_ROOT is set" {
$env:VCPKG_ROOT | Should -Not -BeNullOrEmpty
}

It "VCPKG_ROOT directory" {
$env:VCPKG_ROOT | Should -Exist
It "VCPKG_INSTALLATION_ROOT directory" {
$env:VCPKG_INSTALLATION_ROOT | Should -Exist
}
}

Expand Down

0 comments on commit 88d253f

Please sign in to comment.