forked from MarioGK/ImGuiSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.ps1
46 lines (30 loc) · 961 Bytes
/
update.ps1
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
44
45
46
$projects = "cimgui", "cimguizmo", "cimnodes", "cimplot"
$projectsFolder = "ImGuiSharp", "ImGuizmoSharp", "ImNodesSharp", "ImPlotSharp"
$push=$args[0]
#Pull new versions from github
git pull
#Init submodules
git submodule update --init --recursive
#Update submodules
#git submodule update --remote --recursive
#Updating definition files
for ($i = 0; $i -lt $projects.Count; $i++) {
$project = $projects[$i]
#$projectFolder = $projectsFolder[$i]
$definitionsPath = (Get-Location).ToString() + "\src\CodeGenerator\defs\" + $project+ "\"
$outputPath = ".\native\$project\generator\output"
Push-Location $outputPath
Write-Output (Get-Location).ToString()
Copy-Item -Path *.json -Destination $definitionsPath -PassThru
Pop-Location
}
#Build Native libs
#.\native\build.ps1
#Build generator
#Run Generator for each project
#Push to github
if($push) {
git add .
git commit -m "Update definitions"
git push
}