Skip to content

Commit 5bb4bd4

Browse files
committed
Merge branch 'hotfix/zip-bundle'
2 parents 73b9b7a + c3f9f44 commit 5bb4bd4

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pipeline {
44
agent none
55

66
environment {
7-
ReleaseNumber = '1.1.0'
7+
ReleaseNumber = '1.1.1'
88
outputEnc = '65001'
99
}
1010

@@ -273,7 +273,7 @@ pipeline {
273273
TARGET="/var/www/oscript.io/download/versions/latest/"
274274
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . \$TARGET
275275
276-
TARGET="/var/www/oscript.io/download/versions/$ReleaseNumber/"
276+
TARGET="/var/www/oscript.io/download/versions/" + ReleaseNumber.replace('.', '_') + "/"
277277
sudo rsync -rv --delete --exclude mddoc*.zip --exclude *.src.rpm . \$TARGET
278278
279279
""".stripIndent()
@@ -282,4 +282,4 @@ pipeline {
282282

283283
}
284284

285-
}
285+
}

src/ScriptEngine.HostedScript/Library/Zip/ZipReader.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*----------------------------------------------------------
1+
/*----------------------------------------------------------
22
This Source Code Form is subject to the terms of the
33
Mozilla Public License, v.2.0. If a copy of the MPL
44
was not distributed with this file, You can obtain one
@@ -54,10 +54,11 @@ public void Open(string filename, string password = null, FileNamesEncodingInZip
5454

5555
private Encoding ChooseEncoding(FileNamesEncodingInZipFile encoding)
5656
{
57-
if(encoding != FileNamesEncodingInZipFile.OsEncodingWithUtf8)
58-
return Encoding.UTF8;
57+
if (encoding == FileNamesEncodingInZipFile.Auto || encoding == FileNamesEncodingInZipFile.OsEncodingWithUtf8)
58+
return null;
59+
60+
return Encoding.UTF8;
5961

60-
return null;
6162
}
6263

6364

src/ScriptEngine.HostedScript/Library/Zip/ZipWriter.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,23 @@ public static ZipWriter Construct()
324324
}
325325

326326
[ScriptConstructor(Name = "На основании имени файла")]
327-
public static ZipWriter ConstructByFileOptions(IValue filename, IValue password = null, IValue comment = null, IValue compressionMethod = null, IValue compressionLevel = null, IValue encryptionMethod = null)
327+
public static ZipWriter ConstructByFileOptions(
328+
IValue filename,
329+
IValue password = null,
330+
IValue comment = null,
331+
IValue compressionMethod = null,
332+
IValue compressionLevel = null,
333+
IValue encryptionMethod = null,
334+
FileNamesEncodingInZipFile encoding = FileNamesEncodingInZipFile.Auto)
328335
{
329336
var zip = new ZipWriter();
330337
zip.Open(filename.AsString(),
331338
ConvertParam<string>(password),
332339
ConvertParam<string>(comment),
333340
ConvertParam<SelfAwareEnumValue<ZipCompressionMethodEnum>>(compressionMethod),
334341
ConvertParam<SelfAwareEnumValue<ZipCompressionLevelEnum>>(compressionLevel),
335-
ConvertParam<SelfAwareEnumValue<ZipEncryptionMethodEnum>>(encryptionMethod)
336-
);
342+
ConvertParam<SelfAwareEnumValue<ZipEncryptionMethodEnum>>(encryptionMethod),
343+
encoding);
337344
return zip;
338345
}
339346

src/TestApp/TestApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
3-
<!--Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" /-->
3+
<Import Project="$(MSBuildProjectDirectory)/../oscommon.targets" />
44

55
<PropertyGroup>
66
<TargetFramework>net452</TargetFramework>

src/oscommon.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!--Свойства сборки по умолчанию-->
44
<PropertyGroup>
5-
<ReleaseNumber Condition="'$(ReleaseNumber)' == ''">1.1.0</ReleaseNumber>
5+
<ReleaseNumber Condition="'$(ReleaseNumber)' == ''">1.1.1</ReleaseNumber>
66
<BuildNumber Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildNumber>
77
<BuildNumber Condition="'$(BUILD_NUMBER)' == ''">0</BuildNumber>
88
<Configuration Condition="'$(Release)' == ''">Release</Configuration>

0 commit comments

Comments
 (0)