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",
|
"name": "Executor",
|
||||||
"type": "sbsl",
|
"type": "sbsl",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"scriptFile": "${file}",
|
"scriptFile": "${file",
|
||||||
"args": [
|
"args": [
|
||||||
"8.3.23.2040",
|
"::ZipFolder",
|
||||||
"W228\\USR1CV8",
|
"C:\\Users\\akpaev.e\\Desktop\\test3",
|
||||||
"N3Ak8bPu7",
|
"C:\\Users\\akpaev.e\\Desktop\\test3.zip",
|
||||||
"erp_main_extension_2765112a",
|
"True"
|
||||||
"C:\\Users\\akpaev.e\\Desktop\\erp-ibsrv-config.yml"
|
|
||||||
]
|
]
|
||||||
// "args": [
|
// "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",
|
// "C:\\Users\\akpaev.e\\Desktop\\erp-ibsrv-config2.yml",
|
||||||
// "http.http-services.service.name",
|
// "http.http-services.service.name",
|
||||||
// "testvalue"
|
// "testvalue"
|
||||||
|
2
EDT.sbsl
2
EDT.sbsl
@ -33,7 +33,7 @@ method BuildXmlFiles(
|
|||||||
Files.Delete(DataPath)
|
Files.Delete(DataPath)
|
||||||
|
|
||||||
val ArchivePath = IO.JoinPath(new File(ProjectPath).Path, "${new File(ProjectPath).Name}.zip")
|
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}")
|
Console.Write("Zipped project path: ${ArchivePath}")
|
||||||
|
|
||||||
Files.Delete(BuildPath)
|
Files.Delete(BuildPath)
|
||||||
|
33
Zip.sbsl
33
Zip.sbsl
@ -1,21 +1,28 @@
|
|||||||
@Global
|
#required IO.sbsl
|
||||||
method ZipFolder(Folder: File, ArchivePath: String)
|
|
||||||
val ArchiveFile = new File(ArchivePath)
|
|
||||||
var Writer = new ZipWriter(ArchiveFile.OpenWritableStream())
|
|
||||||
|
|
||||||
for F in Folder.Children
|
@Global
|
||||||
AddToZipArchive(Writer, F, Folder)
|
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()
|
Writer.Write()
|
||||||
;
|
;
|
||||||
|
|
||||||
method AddToZipArchive(Writer: ZipWriter, Source: File, Folder: File)
|
method AddToZipArchive(FileToZipping: File, Writer: ZipWriter, Path: String = "")
|
||||||
if Source.IsFile()
|
if FileToZipping.IsFile()
|
||||||
Writer.Add(Source.OpenReadableStream(), Source.Path.Replace(Folder.Path, ""))
|
Writer.Add(FileToZipping.OpenReadableStream(), IO.JoinPath(Path, FileToZipping.Name))
|
||||||
;
|
else
|
||||||
|
for File in FileToZipping.Children
|
||||||
for F in Source.Children
|
AddToZipArchive(File, Writer, IO.JoinPath(Path, FileToZipping.Name))
|
||||||
AddToZipArchive(Writer, F, Folder)
|
;
|
||||||
;
|
;
|
||||||
;
|
;
|
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