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
56cfcfc1
Commit
56cfcfc1
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Report build configuration, automatically use it for Make-Package.
parent
a440543a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AutoTx/ATXProject.csproj
+4
-0
4 additions, 0 deletions
AutoTx/ATXProject.csproj
AutoTx/Resources/.gitignore
+1
-0
1 addition, 0 deletions
AutoTx/Resources/.gitignore
Scripts/Make-Package.ps1
+14
-9
14 additions, 9 deletions
Scripts/Make-Package.ps1
with
19 additions
and
9 deletions
AutoTx/ATXProject.csproj
+
4
−
0
View file @
56cfcfc1
...
...
@@ -150,6 +150,10 @@
<PropertyGroup>
<PreBuildEvent>
PowerShell -Command "Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
>
$(ProjectDir)\Resources\BuildDate.txt ; Get-Content $(ProjectDir)\Resources\BuildDate.txt"
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
PowerShell -Command "Write-Host $(ConfigurationName)"
>
$(ProjectDir)\Resources\BuildConfiguration.txt
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
...
...
This diff is collapsed.
Click to expand it.
AutoTx/Resources/.gitignore
+
1
−
0
View file @
56cfcfc1
BuildDate.txt
BuildConfiguration.txt
This diff is collapsed.
Click to expand it.
Scripts/Make-Package.ps1
+
14
−
9
View file @
56cfcfc1
[
CmdletBinding
()]
Param
(
[
ValidateSet
(
"Debug"
,
"Release"
)][
String
]
$Target
=
"Debug"
)
$ResourceDir
=
"..\AutoTx\Resources"
$TemplateDir
=
"
$(
$ResourceDir
)
\Mail-Templates"
$BinariesDir
=
"..\AutoTx\bin\
$(
$Target
)
"
try
{
$BuildDate
=
Get-Content
"
$(
$ResourceDir
)
\BuildDate.txt"
-EA
Stop
...
...
@@ -15,14 +8,23 @@ catch {
Write-Host
"Error reading build-date, stopping."
Exit
}
try
{
$BuildConfiguration
=
Get-Content
"
$(
$ResourceDir
)
\BuildConfiguration.txt"
-EA
Stop
}
catch
{
Write-Host
"Error reading build configuration, stopping."
Exit
}
$PkgDir
=
$BuildDate
-replace
':'
,
'-'
-replace
' '
,
'_'
$PkgDir
=
"build_"
+
$PkgDir
$BinariesDir
=
"..\AutoTx\bin\
$(
$BuildConfiguration
)
"
Write-Host
"Creating package [
$(
$PkgDir
)
] using binaries from [
$(
$BinariesDir
)
]"
if
(
Test-Path
$PkgDir
)
{
Write-Host
"Removing existing package dir..."
Write-Host
"Removing existing package dir
[
$(
$PkgDir
)
]
..."
Remove-Item
-Recurse
-Force
$PkgDir
}
...
...
@@ -38,6 +40,9 @@ Copy-Item "$($ResourceDir)\configuration-example.xml" $tgt
Copy-Item
"
$(
$ResourceDir
)
\configuration-example.xml"
"
$(
$PkgDir
)
\configuration.xml"
Copy-Item
"
$(
$ResourceDir
)
\status-example.xml"
"
$(
$PkgDir
)
\status.xml"
Copy-Item
"
$(
$ResourceDir
)
\BuildDate.txt"
"
$(
$PkgDir
)
\service.log"
Copy-Item
"
$(
$ResourceDir
)
\BuildConfiguration.txt"
$
(
$PkgDir
)
Copy-Item
"ScriptsConfig.ps1"
$PkgDir
Copy-Item
"Install-Service.ps1"
$PkgDir
\ No newline at end of file
Copy-Item
"Install-Service.ps1"
$PkgDir
Write-Host
"Done creating package [
$(
$PkgDir
)
] (config:
$(
$BuildConfiguration
)
)"
\ 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