aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.sh
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-01-13 14:06:06 -0800
committerGitHub <noreply@github.com>2021-01-13 14:06:06 -0800
commit8414e15973097e70fe40149e922c402799804b3d (patch)
treeca46f3f317f0eef7924f3b76828868d51bb249cf /scripts/bootstrap.sh
parent4da47f758fb5e02fc017047e014d15174b85a848 (diff)
downloadvcpkg-8414e15973097e70fe40149e922c402799804b3d.tar.gz
vcpkg-8414e15973097e70fe40149e922c402799804b3d.zip
[vcpkg] Use a tag file rather than conditional compilation to permanently disable metrics. (#15470)
Diffstat (limited to 'scripts/bootstrap.sh')
-rw-r--r--scripts/bootstrap.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index fa1a64622..ba76f4f63 100644
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -280,13 +280,17 @@ buildDir="$vcpkgRootDir/toolsrc/build.rel"
rm -rf "$buildDir"
mkdir -p "$buildDir"
-(cd "$buildDir" && CXX="$CXX" "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1
+(cd "$buildDir" && CXX="$CXX" "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1
(cd "$buildDir" && "$cmakeExe" --build .) || exit 1
rm -rf "$vcpkgRootDir/vcpkg"
cp "$buildDir/vcpkg" "$vcpkgRootDir/"
-if ! [ "$vcpkgDisableMetrics" = "ON" ]; then
+if [ "$vcpkgDisableMetrics" = "ON" ]; then
+ touch "$vcpkgRootDir/vcpkg.disable-metrics"
+elif ! [ -f "$vcpkgRootDir/vcpkg.disable-metrics" ]; then
+ # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has
+ # opted out they should stay opted out.
cat <<EOF
Telemetry
---------