ci: improve conveyor setup

This commit is contained in:
zaneschepke
2026-02-27 11:26:46 -05:00
parent a59bfeaa74
commit 1b83cd4f0f
6 changed files with 28 additions and 20 deletions
+1
View File
@@ -19,3 +19,4 @@ captures
**/xcshareddata/WorkspaceSettings.xcsettings
node_modules/
composeApp/generated.conveyor.conf
local-site
+1 -1
View File
@@ -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")
+11 -14
View File
@@ -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)
+9
View File
@@ -0,0 +1,9 @@
include required("conveyor.conf")
app {
site {
copy-to = "./local-site"
base-url = "http://localhost"
consistency-checks = "warn"
}
}
+6 -4
View File
@@ -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}
-1
View File
@@ -15,7 +15,6 @@ app {
site {
display-name = "WG Tunnel"
base-url = "http://localhost"
show-conveyor-badge = true
theme = "dark"