mirror of
https://github.com/wgtunnel/desktop.git
synced 2026-06-02 00:29:09 +02:00
ci: improve conveyor setup
This commit is contained in:
@@ -19,3 +19,4 @@ captures
|
||||
**/xcshareddata/WorkspaceSettings.xcsettings
|
||||
node_modules/
|
||||
composeApp/generated.conveyor.conf
|
||||
local-site
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ subprojects {
|
||||
|
||||
registerConveyorTask("buildLinuxDeb", "debian-package", "deb")
|
||||
registerConveyorTask("buildWindowsMsix", "windows-msix", "windows")
|
||||
registerConveyorTask("buildConveyorSite", "site", "site")
|
||||
registerConveyorTask("buildConveyorSite", "copied-site", "site")
|
||||
|
||||
|
||||
registerConveyorTask("buildLinuxDebRelease", "debian-package", "deb", "conveyor-release.conf")
|
||||
|
||||
@@ -6,14 +6,21 @@ fun Project.registerConveyorTask(
|
||||
taskName: String,
|
||||
packageType: String,
|
||||
subDir: String,
|
||||
configFile: String = "conveyor.conf",
|
||||
signingKeyEnv: String? = null,
|
||||
configFile: String = "conveyor-local.conf",
|
||||
) {
|
||||
tasks.register<Exec>(taskName) {
|
||||
group = "distribution"
|
||||
val outputDir = layout.buildDirectory.dir("conveyor/$subDir")
|
||||
outputs.dir(outputDir)
|
||||
|
||||
(System.getenv("CONVEYOR_SIGNING_KEY") ?: LocalProperties.get("conveyor.signing-key"))?.let {
|
||||
environment("CONVEYOR_SIGNING_KEY", it)
|
||||
}
|
||||
|
||||
(System.getenv("CONVEYOR_PAT") ?: LocalProperties.get("github.pat"))?.let {
|
||||
environment("CONVEYOR_PAT", it)
|
||||
}
|
||||
|
||||
val args =
|
||||
mutableListOf(
|
||||
"conveyor",
|
||||
@@ -23,21 +30,11 @@ fun Project.registerConveyorTask(
|
||||
"--output-dir",
|
||||
outputDir.get().asFile.absolutePath,
|
||||
packageType,
|
||||
"--rerun=all"
|
||||
)
|
||||
|
||||
if (signingKeyEnv == null) {
|
||||
// dev builds use passphrase
|
||||
environment(
|
||||
"CONVEYOR_PASSPHRASE",
|
||||
System.getenv("CONVEYOR_PASSPHRASE")
|
||||
?: LocalProperties.get("conveyor.passphrase")
|
||||
?: "",
|
||||
)
|
||||
LocalProperties.get("conveyor.passphrase")?.let {
|
||||
environment("CONVEYOR_PASSPHRASE", it)
|
||||
args.add(1, "--passphrase=env:CONVEYOR_PASSPHRASE")
|
||||
} else {
|
||||
// release builds use raw signing key
|
||||
environment("CONVEYOR_SIGNING_KEY", System.getenv(signingKeyEnv) ?: "")
|
||||
}
|
||||
|
||||
commandLine(args)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
include required("conveyor.conf")
|
||||
|
||||
app {
|
||||
site {
|
||||
copy-to = "./local-site"
|
||||
base-url = "http://localhost"
|
||||
consistency-checks = "warn"
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,14 @@ conveyor.billing-email = "dev@zaneschepke.com"
|
||||
|
||||
app {
|
||||
|
||||
signing-key = ${env.CONVEYOR_SIGNING_KEY}
|
||||
mac.certificate = apple.cer
|
||||
windows.certificate = windows.cer
|
||||
// TODO for when we get CI working
|
||||
// signing-key = ${env.CONVEYOR_SIGNING_KEY}
|
||||
// mac.certificate = apple.cer
|
||||
// windows.certificate = windows.cer
|
||||
|
||||
site {
|
||||
copy-to = "/site"
|
||||
copy-to = "./site"
|
||||
consistency-checks = "warn"
|
||||
// will overwrite base-url
|
||||
github {
|
||||
oauth-token = ${env.CONVEYOR_PAT}
|
||||
|
||||
@@ -15,7 +15,6 @@ app {
|
||||
|
||||
site {
|
||||
display-name = "WG Tunnel"
|
||||
base-url = "http://localhost"
|
||||
|
||||
show-conveyor-badge = true
|
||||
theme = "dark"
|
||||
|
||||
Reference in New Issue
Block a user