modified: build.gradle
new file: deploy.ps1 new file: quick-deploy.ps1
This commit is contained in:
34
build.gradle
34
build.gradle
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'org.hidetake.ssh' version '2.10.1'
|
||||
}
|
||||
|
||||
group = 'com.simolzimol.levelcraft'
|
||||
@@ -25,4 +26,37 @@ tasks.withType(JavaCompile).configureEach {
|
||||
|
||||
processResources {
|
||||
from("plugin.yml")
|
||||
}
|
||||
|
||||
// SSH Konfiguration für Server Upload
|
||||
remotes {
|
||||
server {
|
||||
host = '195.201.241.113'
|
||||
user = 'root'
|
||||
// Option 1: Passwort (funktioniert zuverlässig)
|
||||
password = System.getProperty('server.password') ?: System.getenv('SERVER_PASSWORD')
|
||||
|
||||
// Option 2: SSH Key (Gradle Plugin hat Kompatibilitätsprobleme)
|
||||
// identity = file("${System.getProperty('user.home')}/.ssh/levelcraft_server_key_rsa")
|
||||
|
||||
// Host Key Verification deaktivieren (für Tests)
|
||||
knownHosts = allowAnyHosts
|
||||
}
|
||||
}
|
||||
|
||||
// Upload Task - nur hochladen, kein Server-Neustart
|
||||
task uploadPlugin(dependsOn: jar) {
|
||||
group = 'deployment'
|
||||
description = 'Lädt das Plugin auf den Server hoch'
|
||||
|
||||
doLast {
|
||||
ssh.run {
|
||||
session(remotes.server) {
|
||||
println "Uploading plugin to server..."
|
||||
put from: jar.archiveFile.get().asFile,
|
||||
into: '/home/CloudNet/local/templates/develop/default/plugins/LevelCraft.jar'
|
||||
println "Plugin successfully uploaded!"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user