forked from cursorless-everywhere/sidecar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·43 lines (33 loc) · 1.64 KB
/
build
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
#!/usr/bin/env bash
set -e
# Remove any previously compiled versions.
rm *.vsix || true
# Bump the version to ensure that it gets upgraded.
echo "================================================================================"
echo "Bumping version..."
echo "================================================================================"
npm version patch --force --commit-hooks false --git-tag-version false
echo ""
echo "================================================================================"
echo "Packaging extension..."
echo "================================================================================"
yes | vsce package
# Install the compiled extension.
echo ""
echo "================================================================================"
echo "Installing extension..."
echo "================================================================================"
code --install-extension *.vsix
echo ""
echo "================================================================================"
echo "Reloading VS Code..."
echo "================================================================================"
# Use the command socket to tell VS Code to reload in the background, if socat is installed.
if [[ $(type -P "socat") ]] && [[ -e ~/.cursorless/vscode-socket ]]; then
echo "Reloading VS Code using the command socket..."
echo '{ "command": "command", "commandId": "workbench.action.reloadWindow" }' | socat - ~/.cursorless/vscode-socket
else
echo "Not automatically reloading VS Code because \`socat\` is not installed"
echo "Reload the VS Code window manually (\"window reload\") to get the new version"
fi
echo "Done"