forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont sent telemetry in forks (#21377)
Closed #20941 - Add enableTelemetry in package.json - Add function that updates the 'enableTelemetry' value in package.json - Update release pipelines
- Loading branch information
1 parent
84e67af
commit 3e5af44
Showing
7 changed files
with
58 additions
and
31 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
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,21 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
import json | ||
import pathlib | ||
import sys | ||
|
||
EXT_ROOT = pathlib.Path(__file__).parent.parent | ||
PACKAGE_JSON_PATH = EXT_ROOT / "package.json" | ||
|
||
def main(package_json: pathlib.Path) -> None: | ||
package = json.loads(package_json.read_text(encoding="utf-8")) | ||
package['enableTelemetry'] = True | ||
|
||
# Overwrite package.json with new data add a new-line at the end of the file. | ||
package_json.write_text( | ||
json.dumps(package, indent=4, ensure_ascii=False) + "\n", encoding="utf-8" | ||
) | ||
|
||
if __name__ == "__main__": | ||
main(PACKAGE_JSON_PATH, sys.argv[1:]) |
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
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