Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
e42923f5
Commit
e42923f5
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Generate C# code with consts to be used in Assembly details.
parent
b91ab947
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Scripts/Prepare-Build.ps1
+27
-0
27 additions, 0 deletions
Scripts/Prepare-Build.ps1
with
27 additions
and
0 deletions
Scripts/Prepare-Build.ps1
+
27
−
0
View file @
e42923f5
...
...
@@ -3,6 +3,30 @@ Param(
[
Parameter
(
Mandatory
=
$True
)][
string
]
$ProjectDir
)
function
Write-BuildDetails
{
Param
(
[
Parameter
(
Mandatory
=
$True
)]
[
String
]
$Target
,
[
Parameter
(
Mandatory
=
$True
)]
[
String
]
$CommitName
,
[
Parameter
(
Mandatory
=
$True
)]
[
String
]
$Branch
,
[
Parameter
(
Mandatory
=
$True
)]
[
String
]
$Date
)
Write-Output
"Generating [
$(
$Target
)
]..."
Write-Output
$
(
"
public static class BuildDetails
{
public const string GitCommitName =
`"
$(
$CommitName
)
`"
;
public const string GitBranch =
`"
$(
$Branch
)
`"
;
public const string BuildDate =
`"
$(
$Date
)
`"
;
}"
)
>
$Target
}
$Error
ActionPreference
=
"Stop"
...
...
@@ -35,6 +59,7 @@ $Date = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
$BCommit
=
"
$(
$ProjectDir
)
\Resources\BuildCommit.txt"
$BuildDate
=
"
$(
$ProjectDir
)
\Resources\BuildDate.txt"
$BuildDetailsCS
=
"
$(
$ProjectDir
)
\..\Resources\BuildDetails.cs"
Write-Output
$CommitName
>
$BCommit
Write-Output
$Date
>
$BuildDate
...
...
@@ -43,4 +68,6 @@ Write-Output $Date
Write-Output
$CommitName
Write-Output
$GitBranch
Write-BuildDetails
$BuildDetailsCS
$CommitName
$GitBranch
$Date
cd
$oldpwd
\ 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