Skip to content

Commit

Permalink
Merge pull request #1701 from glopesdev/env-template
Browse files Browse the repository at this point in the history
Improvements to environment template
  • Loading branch information
glopesdev authored Mar 1, 2024
2 parents 27c527a + aded8ae commit 9ef6d10
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Bonsai.Templates/Bonsai.EnvironmentTemplate/.bonsai/Setup.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
pushd %~dp0
powershell -ExecutionPolicy Bypass -File ./Setup.ps1
popd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Push-Location $PSScriptRoot
if (!(Test-Path "./Bonsai.exe")) {
$release = "https://github.com/bonsai-rx/bonsai/releases/latest/download/Bonsai.zip"
$configPath = "./Bonsai.config"
Expand All @@ -10,10 +11,11 @@ if (!(Test-Path "./Bonsai.exe")) {
}
}
Invoke-WebRequest $release -OutFile "temp.zip"
Move-Item -Path "NuGet.config" "temp.config"
Move-Item -Path "NuGet.config" "temp.config" -ErrorAction SilentlyContinue
Expand-Archive "temp.zip" -DestinationPath "." -Force
Move-Item -Path "temp.config" "NuGet.config" -Force
Move-Item -Path "temp.config" "NuGet.config" -Force -ErrorAction SilentlyContinue
Remove-Item -Path "temp.zip"
Remove-Item -Path "Bonsai32.exe"
}
& .\Bonsai.exe --no-editor
& .\Bonsai.exe --no-editor
Pop-Location
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
}],
"args": {
"executable": "powershell",
"args": "-File Setup.ps1",
"args": "-File .bonsai/Setup.ps1",
"redirectStandardOutput": false
}
},
"applyFileRenamesToArgs": [ "args" ]
}],
"sourceName": ".bonsai",
"defaultName": ".bonsai",
"shortName": "bonsaienv",
"preferNameDirectory": true
"preferDefaultName": true
}
1 change: 0 additions & 1 deletion Bonsai.Templates/Bonsai.EnvironmentTemplate/Setup.cmd

This file was deleted.

2 changes: 1 addition & 1 deletion Bonsai.Templates/Bonsai.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>2.8.0</PackageVersion>
<PackageVersion>2.8.1</PackageVersion>
<PackageId>Bonsai.Templates</PackageId>
<Title>Bonsai Templates</Title>
<Authors>Bonsai</Authors>
Expand Down

0 comments on commit 9ef6d10

Please sign in to comment.