Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Ftt_Common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Ftt_Common
Commits
0f7f4caf
Commit
0f7f4caf
authored
Jun 01, 2026
by
罗显健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打包工具:永久目录兼容:2099,2999
parent
e7dabb90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
Project.cs
Ftt.PatchPack/Project.cs
+10
-7
No files found.
Ftt.PatchPack/Project.cs
View file @
0f7f4caf
...
...
@@ -77,10 +77,10 @@ namespace Ftt.PatchPack
static
string
MergeSqlRelativePath
=
"MergeTemp"
;
/// <summary>
/// 永久有效的年份标记:2999
/// 永久有效的年份标记:2
099 / 2
999
/// <para>该年份文件夹内的文件、在有效期内的需要打包</para>
/// </summary>
static
int
ForeverValidYear
=
2999
;
static
List
<
int
>
ForeverValidYear
=
new
List
<
int
>()
{
2099
,
2999
}
;
#
endregion
...
...
@@ -228,7 +228,7 @@ namespace Ftt.PatchPack
foreach
(
var
dire
in
dires
)
{
// 2099-xx-xx文件内的脚本需要取有效期内的。其他日期的文件夹为增量脚本已通过校验,需要取所有。
var
hours
=
ParseToDateTime
(
dire
.
Name
).
Year
==
ForeverValidYear
?
PatchTimeFrame_Sql
:
-
1
;
var
hours
=
ForeverValidYear
.
Contains
(
ParseToDateTime
(
dire
.
Name
).
Year
)
?
PatchTimeFrame_Sql
:
-
1
;
valid
.
AddRange
(
GetValidPatchFile
(
dire
.
FullName
,
"*.sql"
,
SearchOption
.
AllDirectories
,
path
,
"DB"
,
hours
));
// 脚本文件夹里的文件永久有效。
}
...
...
@@ -342,11 +342,14 @@ namespace Ftt.PatchPack
FileInfo
destMergeFile
=
null
;
//合并文件锚点
foreach
(
var
sourceFile
in
sqlFiles
)
{
//2999-xx-xx 的文件夹内,还有子文件夹。层级比其他日期的要多一层,合并时用到的临时目录也需要多一层。
if
(
sourceFile
.
RelativePatchPath
.
StartsWith
(
$"DB\\
{
ForeverValidYear
}
"
))
foreach
(
var
year
in
ForeverValidYear
)
{
var
subPath
=
Path
.
Combine
(
MergeSqlTempFullPath
,
sourceFile
.
RelativePatchPath
);
if
(!
Directory
.
Exists
(
subPath
))
Directory
.
CreateDirectory
(
subPath
);
//创建所有层级的子目录,打包结束会被删除
//2099-xx-xx 的文件夹内,还有子文件夹。层级比其他日期的要多一层,合并时用到的临时目录也需要多一层。
if
(
sourceFile
.
RelativePatchPath
.
StartsWith
(
$"DB\\
{
year
}
"
))
{
var
subPath
=
Path
.
Combine
(
MergeSqlTempFullPath
,
sourceFile
.
RelativePatchPath
);
if
(!
Directory
.
Exists
(
subPath
))
Directory
.
CreateDirectory
(
subPath
);
//创建所有层级的子目录,打包结束会被删除
}
}
var
tmpFile
=
Path
.
Combine
(
MergeSqlTempFullPath
,
$"
{
sourceFile
.
RelativePatchPath
}
_
{
sourceFile
.
Name
}
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment