-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1092 from debrief/check-network-version
Compare version with network version on launch, and add Update Pepys option
- Loading branch information
Showing
11 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@ECHO off | ||
CALL set_title.bat Upgrade Pepys | ||
CALL set_paths.bat | ||
|
||
powershell.exe -executionpolicy remotesigned -File upgrade_pepys.ps1 | ||
IF ERRORLEVEL 1 GOTO :ERROR | ||
ECHO Pepys Upgrade completed | ||
PAUSE | ||
|
||
GOTO :eof | ||
|
||
:ERROR | ||
ECHO Error running upgrade_pepys.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Get the path to the network master install from the Pepys config file | ||
# To make this as reliable as possible, we use Pepys own config parsing code | ||
$network_path = python -c "import config; print(config.NETWORK_MASTER_INSTALL_PATH)" | ||
|
||
if ($network_path -eq "") { | ||
Write-Output "Network path not set in config file, cannot copy." | ||
Exit 1 | ||
} | ||
|
||
|
||
|
||
try { | ||
Write-Output "Deleting old version of Pepys" | ||
Set-Location -Path .. | ||
# Delete all except the bin directory, as that directory is still kept open by the Powershell/CMD process | ||
Remove-Item -Path * -Recurse -Force -Exclude bin -Verbose | ||
# Move to bin and delete all the contents, but not the folder (it's fine to keep the folder, as we're | ||
# always going to have a bin directory) | ||
Set-Location -Path bin | ||
Remove-Item -Path * | ||
# Change back to the main directory | ||
Set-Location -Path .. | ||
Write-Output "Copying new version of Pepys from $network_path" | ||
Copy-Item -Path "$network_path\*" -Destination "." -Recurse -Force -Verbose -Exclude ".git" | ||
} | ||
catch { | ||
Write-Output $_ | ||
Write-Output "ERROR: Could not copy new Pepys version" | ||
Exit 1 | ||
} | ||
|
||
Write-Output "Copy completed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ path = archive | |
parsers = | ||
basic_tests = | ||
enhanced_tests = | ||
[network] | ||
master_install_path = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,5 @@ Flask | |
Flask-CacheBuster | ||
flask-cors | ||
waitress | ||
lxml | ||
lxml | ||
packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters