This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 174
Missing copyright headers and disable telemetry #2
Merged
+129
−105
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ba0a71e
disabling telemetry unless TELEMETRY is defined in the VS extension
512bc45
forgot a couple of copyright headers
b9fd678
editing PRIVACY.md to specify that the VS extension does collect data…
e46c118
going over the vs code extension folder
da855c2
replacing the setVersionNr script
1678649
Merge branch 'oss' into beheim/oss
64179d6
typo and gitignore
eacd59b
setting the vsix version
9a45f75
semver
a159651
...ps script
4563519
handling telemetry for VS Code
c0b05cd
semver fix
785494c
missing comma
47040bc
Merge branch 'oss' into beheim/oss
bettinaheim 0a8dd04
version requirement 2.1
f211600
Merge branch 'beheim/oss' of https://github.com/microsoft/qsharp-comp…
215efb1
switching back to .net core 2.1
7913e6d
forgot something
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,55 @@ | ||
| param( | ||
| [string] | ||
| $AssemblyVersion = $Env:ASSEMBLY_VERSION, | ||
|
|
||
| [string] | ||
| $SemverVersion = $Env:SEMVER_VERSION, | ||
|
|
||
| [string] | ||
| $NuGetVersion = $Env:NUGET_VERSION, | ||
|
|
||
| [string] | ||
| $VsixVersion = $Env:VSIX_VERSION, | ||
|
|
||
| [switch] | ||
| $EnableTelemetry | ||
| ); | ||
|
|
||
| if ("$AssemblyVersion".Trim().Length -eq 0) { | ||
| $Date = Get-Date; | ||
| $Year = $Date.Year.ToString().Substring(2); | ||
| $Month = $Date.Month.ToString().PadLeft(2, "0"); | ||
| $Hour = (Get-Date).Hour.ToString().PadLeft(2, "0"); | ||
| $Minute = (Get-Date).Minute.ToString().PadLeft(2, "0"); | ||
| $AssemblyVersion = "0.0.$Year$Month.$Hour$Minute"; | ||
| } | ||
|
|
||
| if ("$SemverVersion".Trim().Length -eq 0) { | ||
| $pieces = "$AssemblyVersion".split("."); | ||
| $SemverVersion = "$($pieces[0]).$($pieces[1]).$($pieces[2])$($pieces[3])"; | ||
| } | ||
|
|
||
| if ("$NuGetVersion".Trim().Length -eq 0) { | ||
| $NuGetVersion = "$AssemblyVersion-alpha"; | ||
| } | ||
|
|
||
| if ("$VsixVersion".Trim().Length -eq 0) { | ||
| $VsixVersion = "$AssemblyVersion"; | ||
| } | ||
|
|
||
| Get-ChildItem -Recurse *.v.template ` | ||
| | ForEach-Object { | ||
| $Source = $_.FullName; | ||
| $Target = $Source.Substring(0, $Source.Length - 11); | ||
| Write-Verbose "Replacing ASSEMBLY_VERSION with $AssemblyVersion in $Source and writing to $Target."; | ||
| Get-Content $Source ` | ||
| | ForEach-Object { | ||
| $_. | ||
| Replace("#ASSEMBLY_VERSION#", $AssemblyVersion). | ||
| Replace("#NUGET_VERSION#", $NuGetVersion). | ||
| Replace("#VSIX_VERSION#", $VsixVersion). | ||
| Replace("#SEMVER_VERSION#", $SemverVersion). | ||
| Replace("#ENABLE_TELEMETRY#", $EnableTelemetry.IsPresent.ToString().ToLower()) | ||
| } ` | ||
| | Set-Content $Target -NoNewline | ||
| } | ||
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,3 @@ | ||
| Quantum.App1/Quantum.App1.csproj | ||
| Quantum.Library1/Quantum.Library1.csproj | ||
| Quantum.Test1/Quantum.Test1.csproj |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
src/QsCompiler/Tests.LanguageServer/Tests.LanguageServer.csproj
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,5 +1,4 @@ | ||
| using System; | ||
|
|
||
| using Microsoft.Quantum.Simulation.Core; | ||
| using Microsoft.Quantum.Simulation.Simulators; | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that instead of using this script to enable telemetry, we would do it via a different one; it's odd that set-versionnumber also enables telemetry. if we want to keep it here, maybe change the name of the script to "PopulateTemplates.ps1" or something like that?
Also, how do you envision we will call this to enable telemetry? this is called indirectly by bootstrap, which by default should not enable it. Do you need to modify bootstrap to check some environment variable too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good point. I'll rename and propagate it through to bootstrap. I also think we have to propagate that information into the language server and VS extension project files, which I haven't done yet. Let me wrap up this PR since a bunch of things now got mixed together (I shouldn't have started to do telemetry things in this PR), and set up a proper separate PR to fully add all needed handles.