File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -38,4 +38,13 @@ Invoke-WebRequest -Uri https://github.com/code-game-project/codegame-cli/release
3838Expand-Archive - LiteralPath codegame- cli.zip - DestinationPath $InstallDir
3939rm codegame- cli.zip
4040
41+
42+ if (Get-Command code - ErrorAction SilentlyContinue) {
43+ Write-Host " Installing vscode-codegame..."
44+ Invoke-WebRequest - Uri https:// github.com / code- game- project/ vscode- codegame/ releases/ latest/ download/ codegame.vsix - OutFile .\codegame.vsix
45+ code -- uninstall-extension code- game- project.codegame | Out-Null
46+ code -- install-extension codegame.vsix
47+ rm codegame.vsix
48+ }
49+
4150Write-Host " Done." - ForegroundColor Green
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ if [[ $os == *"linux"* ]]; then
3838 exit 1
3939 fi
4040elif [[ $os == * " darwin" * ]]; then
41+ export PATH=" $PATH :/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
4142 if [[ $arch == * " x86" * ]]; then
4243 echo " Detected OS: macOS x86_64"
4344 download " darwin" " amd64"
7879
7980rm codegame-cli.tar.gz
8081
82+ if hash code 2> /dev/null; then
83+ echo " Installing CodeGame VS Code extension..."
84+ if hash wget 2> /dev/null; then
85+ wget -q --show-progress https://github.com/code-game-project/vscode-codegame/releases/latest/download/codegame.vsix -O codegame.vsix || exit 1
86+ else
87+ curl -L https://github.com/code-game-project/vscode-codegame/releases/latest/download/codegame.vsix > codegame.vsix || exit 1
88+ fi
89+ code --uninstall-extension code-game-project.codegame & > /dev/null
90+ code --install-extension codegame.vsix || exit 1
91+ rm codegame.vsix
92+ fi
93+
8194echo " Done."
You can’t perform that action at this time.
0 commit comments