File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 2
2
using System . ComponentModel ;
3
3
using System . Diagnostics ;
4
4
using System . IO ;
5
+ using System . Reflection ;
5
6
using System . Runtime . InteropServices ;
6
7
using System . Threading ;
7
8
@@ -60,7 +61,24 @@ static void UploadDump()
60
61
throw new Win32Exception ( ) ;
61
62
}
62
63
63
- Process . Start ( "appveyor" , arguments : $ "PushArtifact -Path \" { dumpPath } \" ") . WaitForExit ( ) ;
64
+ const string archivePath = "memory.zip" ;
65
+ string filesToPack = '"' + dumpPath + '"' ;
66
+ filesToPack += ' ' + GetFilesToPackFor ( Assembly . GetExecutingAssembly ( ) ) ;
67
+ filesToPack += ' ' + GetFilesToPackFor ( typeof ( PyObject ) . Assembly ) ;
68
+
69
+ Process . Start ( "7z" , $ "a { archivePath } { filesToPack } ") . WaitForExit ( ) ;
70
+ Process . Start ( "appveyor" , arguments : $ "PushArtifact -Path \" { archivePath } \" ") . WaitForExit ( ) ;
71
+ }
72
+
73
+ static string GetFilesToPackFor ( Assembly assembly )
74
+ {
75
+ string result = '"' + assembly . Location + '"' ;
76
+ string pdb = Path . ChangeExtension ( assembly . Location , ".pdb" ) ;
77
+ if ( File . Exists ( pdb ) )
78
+ {
79
+ result += $ " \" { pdb } \" ";
80
+ }
81
+ return result ;
64
82
}
65
83
66
84
[ DllImport ( "kernel32" , CharSet = CharSet . Auto , SetLastError = true ) ]
You can’t perform that action at this time.
0 commit comments