Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
validation_packages_test_index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Schneider
validation_packages_test_index
Commits
fa6222e9
Commit
fa6222e9
authored
1 year ago
by
Kevin Schneider
Browse files
Options
Downloads
Patches
Plain Diff
4
parent
03a3d09c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
test.fsx
+9
-4
9 additions, 4 deletions
test.fsx
validation_packages.json
+1
-0
1 addition, 0 deletions
validation_packages.json
validation_packages/package3.fsx
+2
-0
2 additions, 0 deletions
validation_packages/package3.fsx
validation_packages/package4.fsx
+1
-0
1 addition, 0 deletions
validation_packages/package4.fsx
with
13 additions
and
4 deletions
test.fsx
+
9
−
4
View file @
fa6222e9
...
...
@@ -25,7 +25,9 @@ let executeProcess (processName: string) (processArgs: string) =
{
ExitCode
=
proc
.
ExitCode
;
StdOut
=
output
.
ToString
()
;
StdErr
=
error
.
ToString
()
}
let
changed_files
=
File
.
ReadAllLines
(
"file_changes.txt"
)
|>
set
let
changed_files
=
File
.
ReadAllLines
(
"file_changes.txt"
)
|>
set
|>
Set
.
map
(
fun
x
->
x
.
Replace
(
'\\'
,
Path
.
DirectorySeparatorChar
).
Replace
(
'
/
'
,
Path
.
DirectorySeparatorChar
))
printfn
"parsed changed files as:
\r\n
%A"
changed_files
type
ValidationPackageIndex
=
{
...
...
@@ -36,11 +38,14 @@ type ValidationPackageIndex =
Directory
.
GetFiles
(
"validation_packages"
,
"*.fsx"
)
|>
Array
.
map
(
fun
package
->
if
changed_files
.
Contains
(
package
)
then
printfn
$
"{package} was changed in this commit."
{
Name
=
package
;
LastUpdated
=
System
.
DateTime
.
Now
}
else
printfn
$
"{package} was changed in this commit."
let
history
=
executeProcess
"git"
$
"log -1 --pretty=format:%%ci {package}"
{
Name
=
package
;
LastUpdated
=
System
.
DateTime
.
ParseExact
(
history
.
StdOut
.
Split
(
" "
).[
0
],
"yyyy-MM-dd"
,
System
.
Globalization
.
CultureInfo
.
InvariantCulture
)}
printfn
$
"{package} was not changed in this commit."
printfn
$
"getting history for {package}"
let
history
=
executeProcess
"git"
$
"log -1 --pretty=format:'%%ci' {package}"
printfn
$
"history is {history.StdOut}"
{
Name
=
package
;
LastUpdated
=
System
.
DateTime
.
ParseExact
(
history
.
StdOut
.
Split
(
" "
).[
0
].
Replace
(
"'"
,
""
),
"yyyy-MM-dd"
,
System
.
Globalization
.
CultureInfo
.
InvariantCulture
)}
)
|>
fun
packages
->
JsonSerializer
.
Serialize
(
packages
)
|>
fun
json
->
File
.
WriteAllText
(
"validation_packages.json"
,
json
)
...
...
This diff is collapsed.
Click to expand it.
validation_packages.json
0 → 100644
+
1
−
0
View file @
fa6222e9
[{
"Name"
:
"validation_packages
\\
package1.fsx"
,
"LastUpdated"
:
"2023-07-14T00:00:00"
},{
"Name"
:
"validation_packages
\\
package2.fsx"
,
"LastUpdated"
:
"2023-07-14T00:00:00"
},{
"Name"
:
"validation_packages
\\
package3.fsx"
,
"LastUpdated"
:
"2023-07-14T15:21:30.7226387+02:00"
},{
"Name"
:
"validation_packages
\\
package4.fsx"
,
"LastUpdated"
:
"2023-07-14T15:21:30.7226476+02:00"
}]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
validation_packages/package3.fsx
0 → 100644
+
2
−
0
View file @
fa6222e9
printfn
$
"hi 3"
//soos
\ No newline at end of file
This diff is collapsed.
Click to expand it.
validation_packages/package4.fsx
0 → 100644
+
1
−
0
View file @
fa6222e9
//xd
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment