chore(ci): filename renaming still using old legacy file
This commit is contained in:
@@ -25,6 +25,8 @@ interface UpdateInfo {
|
||||
|
||||
type Platform = 'x64' | 'arm64' | 'both' | 'none'
|
||||
|
||||
const regexpIsLatestMacMetadata = /^latest(?:-[^-]+)?-mac\.yml$/i
|
||||
|
||||
function getUrls(updateInfo: UpdateInfo): string[] {
|
||||
const urls: string[] = []
|
||||
|
||||
@@ -160,7 +162,7 @@ function collectLatestMacFiles(rootDir: string): string[] {
|
||||
results.push(...collectLatestMacFiles(fullPath))
|
||||
continue
|
||||
}
|
||||
if (entry.isFile() && entry.name.startsWith('latest-mac') && entry.name.endsWith('.yml')) {
|
||||
if (entry.isFile() && regexpIsLatestMacMetadata.test(entry.name)) {
|
||||
results.push(fullPath)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,14 +122,14 @@ export function mapArchFor(
|
||||
function getLatestUpdateFilename(target: string): string | null {
|
||||
switch (target) {
|
||||
case 'x86_64-pc-windows-msvc':
|
||||
return 'latest.yml'
|
||||
return `latest-${mapArchFor(target, 'yml')}.yml`
|
||||
case 'x86_64-unknown-linux-gnu':
|
||||
return 'latest-linux.yml'
|
||||
return `latest-${mapArchFor(target, 'yml')}-linux.yml`
|
||||
case 'aarch64-unknown-linux-gnu':
|
||||
return 'latest-linux-arm64.yml'
|
||||
return `latest-${mapArchFor(target, 'yml')}-linux-${mapArchFor(target, 'yml')}.yml`
|
||||
case 'aarch64-apple-darwin':
|
||||
case 'x86_64-apple-darwin':
|
||||
return 'latest-mac.yml'
|
||||
return `latest-${mapArchFor(target, 'yml')}-mac.yml`
|
||||
default:
|
||||
return null
|
||||
}
|
||||
@@ -178,9 +178,9 @@ export async function getFilenames(target: string, options: { release: boolean,
|
||||
},
|
||||
{
|
||||
target: 'x86_64-pc-windows-msvc',
|
||||
extension: 'latest.yml',
|
||||
outputFilename: 'latest.yml',
|
||||
releaseArtifactFilename: 'latest.yml',
|
||||
extension: getLatestUpdateFilename(target)!,
|
||||
outputFilename: getLatestUpdateFilename(target)!,
|
||||
releaseArtifactFilename: getLatestUpdateFilename(target)!,
|
||||
productName,
|
||||
version,
|
||||
optional: true,
|
||||
@@ -422,9 +422,9 @@ export async function getFilenames(target: string, options: { release: boolean,
|
||||
},
|
||||
{
|
||||
target: 'aarch64-apple-darwin',
|
||||
extension: 'latest-mac.yml',
|
||||
outputFilename: 'latest-mac.yml',
|
||||
releaseArtifactFilename: 'latest-mac.yml',
|
||||
extension: getLatestUpdateFilename(target)!,
|
||||
outputFilename: getLatestUpdateFilename(target)!,
|
||||
releaseArtifactFilename: getLatestUpdateFilename(target)!,
|
||||
productName,
|
||||
version,
|
||||
optional: true,
|
||||
@@ -469,9 +469,9 @@ export async function getFilenames(target: string, options: { release: boolean,
|
||||
},
|
||||
{
|
||||
target: 'x86_64-apple-darwin',
|
||||
extension: 'latest-mac.yml',
|
||||
outputFilename: 'latest-mac.yml',
|
||||
releaseArtifactFilename: 'latest-mac.yml',
|
||||
extension: getLatestUpdateFilename(target)!,
|
||||
outputFilename: getLatestUpdateFilename(target)!,
|
||||
releaseArtifactFilename: getLatestUpdateFilename(target)!,
|
||||
productName,
|
||||
version,
|
||||
optional: true,
|
||||
|
||||
Reference in New Issue
Block a user