fix(cli): switch name parsing to allow periods in name

Co-authored-by: LongYinan <lynweklm@gmail.com>
This commit is contained in:
Raphael Darley 2023-11-02 11:52:23 +00:00 committed by GitHub
parent afdd4060ab
commit fcb5c2bdd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,10 @@ export async function collectArtifacts(userOptions: ArtifactsOptions) {
debug.info(`Read [${colors.yellowBright(filePath)}]`) debug.info(`Read [${colors.yellowBright(filePath)}]`)
const sourceContent = await readFileAsync(filePath) const sourceContent = await readFileAsync(filePath)
const parsedName = parse(filePath) const parsedName = parse(filePath)
const [_binaryName, platformArchABI] = parsedName.name.split('.') const terms = parsedName.name.split('.')
const platformArchABI = terms.pop()!
const _binaryName = terms.join('.')
if (_binaryName !== binaryName) { if (_binaryName !== binaryName) {
debug.warn( debug.warn(
`[${_binaryName}] is not matched with [${binaryName}], skip`, `[${_binaryName}] is not matched with [${binaryName}], skip`,