-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathmake_stubs_all.py
50 lines (40 loc) · 1.29 KB
/
make_stubs_all.py
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
47
48
49
50
import sys
import os
import helpers
import json
import shutil
print('Script to generate stub files for all C# packages relevant for tests.')
print('Please extend the `packages` list in this script to add more packages when relevant.')
print(' Usage: python3 ' + sys.argv[0] + ' ' + '[WORK_DIR=tempDir]')
# List of packages to create stubs for.
packages = [
"Amazon.Lambda.Core",
"Amazon.Lambda.APIGatewayEvents",
"Dapper",
"EntityFramework",
"Newtonsoft.Json",
"NHibernate",
"System.Data.OleDb",
"System.Data.SqlClient",
"System.Data.SQLite",
"System.Drawing.Common",
"System.Security.Permissions",
"System.Windows.Extensions",
]
# List of packages with specific versions to create stubs for.
# Note that these version numbers most likely needs to be increased
# when new stubs are generated for a new .NET.
packages_with_versions = [
("ServiceStack", "8.5.2"),
("ServiceStack.OrmLite.SqlServer", "8.5.2")
]
thisScript = sys.argv[0]
template = "webapp"
relativeWorkDir = helpers.get_argv(1, "tempDir")
generator = helpers.Generator(thisScript, relativeWorkDir, template)
for package in packages:
generator.add_nuget(package)
for (package, version) in packages_with_versions:
generator.add_nuget(package, version)
generator.make_stubs()
exit(0)