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
92371944
Commit
92371944
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Simple script to provide a new package for the automatic updater.
Refers to
#13
parent
8995790e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AutoTx-Updater/Update-Service.ps1
+1
-1
1 addition, 1 deletion
AutoTx-Updater/Update-Service.ps1
AutoTx/Resources/Provide-UpdaterPackage.ps1
+44
-0
44 additions, 0 deletions
AutoTx/Resources/Provide-UpdaterPackage.ps1
with
45 additions
and
1 deletion
AutoTx-Updater/Update-Service.ps1
+
1
−
1
View file @
92371944
...
...
@@ -206,7 +206,7 @@ function Update-Configuration {
function
Copy
-ServiceFiles
{
try
{
Copy-Item
-Recurse
-Force
-ErrorAction
Stop
`
-Path
"
$(
$UpdateBinariesPath
)
\*"
`
-Path
"
$(
$UpdateBinariesPath
)
\
$(
$ServiceName
)
\
*"
`
-Destination
"
$InstallationPath
"
}
catch
{
...
...
This diff is collapsed.
Click to expand it.
AutoTx/Resources/Provide-UpdaterPackage.ps1
0 → 100644
+
44
−
0
View file @
92371944
[
CmdletBinding
()]
Param
(
[
Parameter
(
Mandatory
=
$True
)][
String
]
$UpdaterSettings
)
try
{
.
$UpdaterSettings
}
catch
{
$ex
=
$_
.
Exception
.
Message
Write-Host
"Error reading settings file: '
$(
$UpdaterSettings
)
' [
$(
$ex
)
]"
Exit
}
$UpdateBinariesPath
=
"
$(
$UpdateSourcePath
)
\Service\Binaries"
$Pattern
=
'build_[0-9]{4}-[0-9]{2}-[0-9]{2}_'
$PackageDir
=
Get-ChildItem
-Directory
-Name
|
Where-Object
{
$_
-match
$Pattern
}
|
Sort-Object
|
Select-Object
-Last
1
if
([
string
]::
IsNullOrEmpty
(
$PackageDir
))
{
Write-Host
"ERROR: couldn't find any directories matching '
$(
$Pattern
)
'!"
Exit
}
try
{
# exclude some files not be distributed:
$Exclude
=
@(
"ScriptsConfig.ps1"
,
"Install-Service.ps1"
)
Copy-Item
-Recurse
-Force
-ErrorAction
Stop
`
-Path
$PackageDir
`
-Exclude
$Exclude
`
-Destination
$UpdateBinariesPath
Write-Host
"Copied package [
$(
$PackageDir
)
] to [
$(
$UpdateBinariesPath
)
]."
}
catch
{
$ex
=
$_
.
Exception
.
Message
Write-Host
"Error copying service package:
$(
$ex
)
"
Exit
}
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