-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.ps1
More file actions
35 lines (27 loc) · 827 Bytes
/
Copy pathbuild.ps1
File metadata and controls
35 lines (27 loc) · 827 Bytes
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
param([Switch]$push)
[xml]$csproj = Get-Content ./ObjectivismGH/Objectivism.csproj
$VERSION = $csproj.Project.PropertyGroup.Version
Write-Output "Version = $VERSION"
$RHINO_DIR = (Get-ItemProperty -Path "HKLM:\SOFTWARE\McNeel\Rhinoceros\8.0\Install\").Path
Write-Output "Rhino install path = $RHINO_DIR"
dotnet msbuild -restore -p:Configuration=Release ./ObjectivismGH/
if (-not $?) {throw "Build Failed"}
$PKG_DIR = 'yak-pkgs'
if(!(Test-Path $PKG_DIR)){
mkdir $PKG_DIR
}
$RHINO_VERSION = "Rhino7"
./make-yak.ps1
$RHINO_VERSION = "Rhino8"
./make-yak.ps1
if($push.IsPresent)
{
Write-Output "Logging in to YAK"
& "$RHINO_DIR/Yak.exe" login
cd $PKG_DIR
foreach ($file in Get-ChildItem -Path . -Filter "*.yak")
{
Write-Output "Processing file: $($file.FullName)"
& "$RHINO_DIR/Yak.exe" push $file.FullName
}
}