-
Notifications
You must be signed in to change notification settings - Fork 26
/
vscode-insiders.yml
60 lines (58 loc) · 2.59 KB
/
vscode-insiders.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: nightly
description: Microsoft Visual Studio Code - Insiders. New type of tool that combines the simplicity of a code editor with what developers need for core edit-build-debug cycle.
homepage: https://code.visualstudio.com/insiders/
license:
identifier: Freeware
url: https://code.visualstudio.com/license/insiders
notes:
- When there is vscode update available run 'scoop update vscode-insiders -kf'
- When installed from elevated prompt, context menus will be created.
- " Otherwise, you could create it on your own using install-context.reg file in '$dir' folder"
architecture:
64bit:
url:
- https://update.code.visualstudio.com/latest/win32-x64-archive/insider#/cosi.zip
- https://raw.githubusercontent.com/ScoopInstaller/Extras/master/scripts/vscode/install-context.reg
- https://raw.githubusercontent.com/ScoopInstaller/Extras/master/scripts/vscode/uninstall-context.reg
32bit:
url:
- https://update.code.visualstudio.com/latest/win32-archive/insider#/cosi.zip
- https://raw.githubusercontent.com/ScoopInstaller/Extras/master/scripts/vscode/install-context.reg
- https://raw.githubusercontent.com/ScoopInstaller/Extras/master/scripts/vscode/uninstall-context.reg
arm64:
url:
- https://update.code.visualstudio.com/latest/win32-arm64-archive/insider#/cosi.zip
- https://raw.githubusercontent.com/ScoopInstaller/Extras/master/scripts/vscode/install-context.reg
- https://raw.githubusercontent.com/ScoopInstaller/Extras/master/scripts/vscode/uninstall-context.reg
installer:
script: |
#### Create data folder
if (!(Test-Path "$persist_dir\data")) {
@('tmp', 'user-data', 'extensions') | ForEach-Object { Confirm-DirectoryExistence "$dir\data\$_" | Out-Null }
}
$codepath = "$dir\Code - Insiders.exe" -replace '\\', '\\'
Edit-File 'install-context.reg' -Find @('\$code', '&Code') -Replace @($codepath, 'Code &Insiders') -Regex
Edit-File 'uninstall-context.reg' -Find '&Code' -Replace 'Code &Insiders'
#### Apply context automatically
if (is_admin) {
regedit /s "$dir\install-context.reg"
}
post_install: |
#### Reflect storage change to support correct last opened editor.'
$file = "$dir\data\user-data\storage.json"
if (Test-Path $file) {
$cont = (Get-Content $file) -replace 'nightly-\d+', 'current'
Out-UTF8File $file $cont
}
uninstaller:
script: |
### # Uninstall context menu
if (is_admin) { regedit /s "$dir\uninstall-context.reg" }
bin:
- bin\code-insiders.cmd
- - bin\code-insiders.cmd
- codei
shortcuts:
- - Code - Insiders.exe
- Visual Studio Code - Insiders
persist: data