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
ba4a3258
Commit
ba4a3258
authored
6 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Development convenience script to automatically trigger the updater
parent
a6a4aafa
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/Trigger-Updater.ps1
+35
-0
35 additions, 0 deletions
Scripts/Trigger-Updater.ps1
with
35 additions
and
0 deletions
Scripts/Trigger-Updater.ps1
0 → 100644
+
35
−
0
View file @
ba4a3258
# Helper script to trigger the updater if the corresponding marker file has
# been removed (e.g. by using the `Deploy-NewBuild.ps1` script).
#Requires -RunAsAdministrator
[
CmdletBinding
()]
Param
(
[
String
]
$UpdaterSettings
=
"C:\Tools\AutoTx-Updater\UpdaterConfig.inc.ps1"
)
$Error
ActionPreference
=
"Stop"
try
{
.
$UpdaterSettings
}
catch
{
$ex
=
$_
.
Exception
.
Message
Write-Host
"Error reading settings file: '
$(
$UpdaterSettings
)
' [
$(
$ex
)
]"
Exit
}
$Marker
=
"
$(
$UpdateSourcePath
)
\Service\UpdateMarkers\
$(
$
env
:
COMPUTERNAME
)
"
Write-Host
"Using marker file
$Marker
"
while
(
$true
)
{
if
(
Test-Path
$Marker
)
{
# Write-Host "marker file found"
}
else
{
# Write-Host "NO marker file found, starting updater..."
(
Get-ScheduledJob
-Name
"AutoTx-Updater"
)
.
StartJob
()
# Allow the updater to complete its run:
Start-Sleep
30
}
Start-Sleep
1
}
\ 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