-
Notifications
You must be signed in to change notification settings - Fork 23
/
deploy.cmd
39 lines (30 loc) · 1.02 KB
/
deploy.cmd
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
@echo off
:: https://code.visualstudio.com/docs/extensions/publish-extension
:: https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix
call npm install --location=global --registry=https://registry.npmjs.org vsce
call export-md.cmd
start CHANGELOG.html
echo Check the CHANGELOG file that just opened in your favorit browser before you continue.
:: pause
call vsce ls
echo Review the files included before you continue
:: pause
if not exist vsix-archive mkdir vsix-archive
move /Y *.vsix vsix-archive
call vsce package
set vsix_count=0
for %%A in (*.vsix) do set /a vsix_count+=1
if not %vsix_count% == 1 (
echo Found unexpected number of .vsix files: %vsix_count%
exit /B 1
)
set vsix_name=not_found
for %%f in (*.vsix) do (
set vsix_name=%%f
)
echo Installing the extension locally...
echo Installing %vsix_name%
call code --install-extension %vsix_name%
:: echo Test extension before you continue or press Ctrl+C to exit before publishing
:: pause
:: call vsce publish --packagePath %vsix_name%