You've already forked akpaevj-executor-scripts
mirror of
https://github.com/akpaevj/executor-scripts.git
synced 2025-07-14 06:44:20 +02:00
a
This commit is contained in:
18
.vscode/launch.json
vendored
18
.vscode/launch.json
vendored
@ -8,15 +8,21 @@
|
||||
"name": "Executor",
|
||||
"type": "sbsl",
|
||||
"request": "launch",
|
||||
"scriptFile": "${file}",
|
||||
"scriptFile": "${file",
|
||||
"args": [
|
||||
"8.3.23.2040",
|
||||
"W228\\USR1CV8",
|
||||
"N3Ak8bPu7",
|
||||
"erp_main_extension_2765112a",
|
||||
"C:\\Users\\akpaev.e\\Desktop\\erp-ibsrv-config.yml"
|
||||
"::ZipFolder",
|
||||
"C:\\Users\\akpaev.e\\Desktop\\test3",
|
||||
"C:\\Users\\akpaev.e\\Desktop\\test3.zip",
|
||||
"True"
|
||||
]
|
||||
// "args": [
|
||||
// "8.3.23.2040",
|
||||
// "W228\\USR1CV8",
|
||||
// "N3Ak8bPu7",
|
||||
// "erp_main_extension_2765112a",
|
||||
// "C:\\Users\\akpaev.e\\Desktop\\erp-ibsrv-config.yml"
|
||||
// ]
|
||||
// "args": [
|
||||
// "C:\\Users\\akpaev.e\\Desktop\\erp-ibsrv-config2.yml",
|
||||
// "http.http-services.service.name",
|
||||
// "testvalue"
|
||||
|
2
EDT.sbsl
2
EDT.sbsl
@ -33,7 +33,7 @@ method BuildXmlFiles(
|
||||
Files.Delete(DataPath)
|
||||
|
||||
val ArchivePath = IO.JoinPath(new File(ProjectPath).Path, "${new File(ProjectPath).Name}.zip")
|
||||
Zip.ZipFolder(BuildPath, ArchivePath)
|
||||
Zip.ZipFolder(BuildPath.Path, ArchivePath)
|
||||
Console.Write("Zipped project path: ${ArchivePath}")
|
||||
|
||||
Files.Delete(BuildPath)
|
||||
|
33
Zip.sbsl
33
Zip.sbsl
@ -1,21 +1,28 @@
|
||||
@Global
|
||||
method ZipFolder(Folder: File, ArchivePath: String)
|
||||
val ArchiveFile = new File(ArchivePath)
|
||||
var Writer = new ZipWriter(ArchiveFile.OpenWritableStream())
|
||||
#required IO.sbsl
|
||||
|
||||
for F in Folder.Children
|
||||
AddToZipArchive(Writer, F, Folder)
|
||||
@Global
|
||||
method ZipFolder(FolderPath: String, ArchivePath: String, ZipChildren: Boolean = True)
|
||||
val Folder = new File(FolderPath)
|
||||
val Archive = new File(ArchivePath)
|
||||
var Writer = new ZipWriter(Archive.OpenWritableStream())
|
||||
|
||||
if ZipChildren
|
||||
for File in Folder.Children
|
||||
AddToZipArchive(File, Writer)
|
||||
;
|
||||
else
|
||||
AddToZipArchive(Folder, Writer)
|
||||
;
|
||||
|
||||
Writer.Write()
|
||||
;
|
||||
|
||||
method AddToZipArchive(Writer: ZipWriter, Source: File, Folder: File)
|
||||
if Source.IsFile()
|
||||
Writer.Add(Source.OpenReadableStream(), Source.Path.Replace(Folder.Path, ""))
|
||||
;
|
||||
|
||||
for F in Source.Children
|
||||
AddToZipArchive(Writer, F, Folder)
|
||||
method AddToZipArchive(FileToZipping: File, Writer: ZipWriter, Path: String = "")
|
||||
if FileToZipping.IsFile()
|
||||
Writer.Add(FileToZipping.OpenReadableStream(), IO.JoinPath(Path, FileToZipping.Name))
|
||||
else
|
||||
for File in FileToZipping.Children
|
||||
AddToZipArchive(File, Writer, IO.JoinPath(Path, FileToZipping.Name))
|
||||
;
|
||||
;
|
||||
;
|
42
logs.root_IS_UNDEFINED/console_executor.log
Normal file
42
logs.root_IS_UNDEFINED/console_executor.log
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user