Add methods for getting or setting the current stage
This commit is contained in:
parent
d8d6386fe3
commit
aa5d71eb4f
1 changed files with 9 additions and 0 deletions
|
@ -6,6 +6,7 @@ class Context {
|
||||||
[string]$AdminName = "Admin";
|
[string]$AdminName = "Admin";
|
||||||
[string]$ConfigRoot = "HKLM:\Software\PortValhalla";
|
[string]$ConfigRoot = "HKLM:\Software\PortValhalla";
|
||||||
[string]$RunOnceName = "PortValhalla";
|
[string]$RunOnceName = "PortValhalla";
|
||||||
|
[string]$StagePropertyName = "Stage";
|
||||||
|
|
||||||
[string] ProjectRoot() {
|
[string] ProjectRoot() {
|
||||||
return Resolve-Path (Join-Path $PSScriptRoot ".." ".." "..");
|
return Resolve-Path (Join-Path $PSScriptRoot ".." ".." "..");
|
||||||
|
@ -44,6 +45,14 @@ class Context {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[void] SetStage([string] $name) {
|
||||||
|
$this.Set($this.StagePropertyName, $name, "ExpandString");
|
||||||
|
}
|
||||||
|
|
||||||
|
[string] GetStage() {
|
||||||
|
return $this.Get($this.StagePropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
[string] ArchivePath($name) {
|
[string] ArchivePath($name) {
|
||||||
return Join-Path $this.BackupRoot() "$name.7z";
|
return Join-Path $this.BackupRoot() "$name.7z";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue