Keep legacy Windows starter worker pins outside official GNU enrollments
This commit is contained in:
@@ -42,9 +42,7 @@ pub(super) async fn publish_missing(
|
||||
if exists {
|
||||
continue;
|
||||
}
|
||||
let path = if platform == Platform::WindowsGnuX64
|
||||
&& std::env::var_os("RMM_AGENT_UPDATE_WINDOWS_GNU_OFFICIAL_KEYRING_FILE").is_some()
|
||||
{
|
||||
let path = if official_windows(platform) {
|
||||
distribution.join(format!("{name}-official.json"))
|
||||
} else {
|
||||
distribution.join(format!("{name}.json"))
|
||||
@@ -135,11 +133,12 @@ pub(super) async fn publish_missing(
|
||||
.bind(tenant).bind(manifest.release_id).bind(name).bind(i64::try_from(manifest.release_sequence).map_err(|_|invalid())?)
|
||||
.bind(hash(&package.envelope.decode().map_err(|_|invalid())?.payload_bytes)).bind(hash(&raw)).bind(raw)
|
||||
.bind(a.artifact_id).bind(&a.sha256).bind(a.bytes as i64).bind(h.artifact_id).bind(&h.sha256).bind(h.bytes as i64).execute(&mut **tx).await?;
|
||||
sqlx::query("INSERT INTO customer_starter_workers VALUES($1,$2,$3,$4)")
|
||||
sqlx::query("INSERT INTO customer_starter_workers(tenant_id,platform,sha256,size_bytes,official_windows) VALUES($1,$2,$3,$4,$5)")
|
||||
.bind(tenant)
|
||||
.bind(name)
|
||||
.bind(package.worker.sha256)
|
||||
.bind(package.worker.bytes as i64)
|
||||
.bind(official_windows(platform))
|
||||
.execute(&mut **tx)
|
||||
.await?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user