Added Jenkinsfile and updated package naming.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
if (Test-Path ./pid.temp) {
|
||||
$sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1
|
||||
if (Test-Path ./test-server.pid) {
|
||||
$sID = Get-Item -Path ./test-server.pid | Get-Content -Tail 1
|
||||
if (Get-Process -Id $sID -ErrorAction SilentlyContinue) {
|
||||
Stop-Process -Id $sID
|
||||
}
|
||||
Remove-Item "./pid.temp"
|
||||
}
|
||||
|
||||
Remove-Item "./test-server.pid"
|
||||
} else {
|
||||
Write-Output "Couldn't find running server to stop."
|
||||
}
|
@@ -1,2 +1,3 @@
|
||||
New-Item -Path .\plugins -ItemType Directory -Force
|
||||
write-Output "Attempting to copy plugin jar to plugins folder..."
|
||||
copy-Item -Path "..\target\IslandSurvivalCraft*.jar" -Destination "plugins\IslandSurvivalCraft.jar"
|
||||
|
@@ -1,6 +1,10 @@
|
||||
if (!(Test-Path -Path "paper.jar" -PathType Leaf)) {
|
||||
Invoke-WebRequest -Uri "https://api.papermc.io/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar" -OutFile "paper.jar"
|
||||
}
|
||||
|
||||
write-Output "Attempting to start Paper test server."
|
||||
$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper.jar", "nogui" -PassThru
|
||||
$SID = $SID.Id
|
||||
write-Output "Process started. PID is: $SID"
|
||||
|
||||
$SID | Out-File -FilePath "pid.temp"
|
||||
$SID | Out-File -FilePath "test-server.pid"
|
Reference in New Issue
Block a user