🔧 update version

This commit is contained in:
Tw93
2025-01-06 19:32:17 +08:00
parent 43d9fff2e4
commit 722a8b1c46
2 changed files with 74 additions and 66 deletions

16
dist/cli.js vendored
View File

@@ -728,13 +728,21 @@ class LinuxBuilder extends BaseBuilder {
super(options);
}
getFileName() {
const { name } = this.options;
const arch = process.arch === 'x64' ? 'amd64' : process.arch;
return `${name}_${tauriConfig.version}_${arch}`;
const { name, targets } = this.options;
const version = tauriConfig.version;
let arch = process.arch === 'x64' ? 'amd64' : process.arch;
if (arch === 'arm64' && (targets === 'rpm' || targets === 'appimage')) {
arch = 'aarch64';
}
// The RPM format uses different separators and version number formats
if (targets === 'rpm') {
return `${name}-${version}-1.${arch}`;
}
return `${name}_${version}_${arch}`;
}
// Customize it, considering that there are all targets.
async build(url) {
const targetTypes = ['deb', 'appimage'];
const targetTypes = ['deb', 'appimage', 'rpm'];
for (const target of targetTypes) {
if (this.options.targets === target || this.options.targets === 'all') {
await this.buildAndCopy(url, target);