Skip to content

Commit e0b4ea9

Browse files
committed
Unify generation script.
1 parent 00b8bc7 commit e0b4ea9

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

buildall.ps1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ $specDir = Resolve-Path "spec"
1717
$nugetDir = "$solutionDir\.nuget"
1818
$nugetPath = "$nugetDir\nuget.exe"
1919
$nugetSpecPath = "$sourceDir\Dropbox.Api.nuspec"
20-
$generatorPath = "$generatorDir\csharp.stoneg.py"
21-
$generatorArgs = @("-m", "stone.cli", "-a:all", $generatorPath, $sourceDir)
2220
$docBuildPath = Resolve-Path "doc\StoneDocs.shfbproj"
2321
$majorVersion = "4.0"
2422
$releaseVersion = "4.8.1"
@@ -90,9 +88,8 @@ function GenerateProjectFiles()
9088
Write-Host "Generating Dropbox.Api..."
9189

9290
[environment]::SetEnvironmentVariable("PYTHONPATH", $pythonPath)
93-
$files = Get-ChildItem "$specDir\*" -Include *.stone | Select -ExpandProperty FullName
9491

95-
RunCommand { python $generatorArgs $files }
92+
RunCommand { python 'generate.py' }
9693
}
9794

9895
function RestoreNugetPackages()

generate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ def main():
1111
"""The entry point for the program."""
1212

1313
repo_path = 'dropbox-sdk-dotnet'
14-
print('Generating code')
14+
print('Generating Stone types')
1515
try:
16-
for path in glob.glob(os.path.join(repo_path, 'Dropbox.Api/*.csproj')):
17-
os.remove(path)
1816
shutil.rmtree(os.path.join(repo_path, 'Dropbox.Api', 'Generated'))
1917
except OSError:
2018
pass

0 commit comments

Comments
 (0)