electrobun 1.11.5-beta.2 → 1.11.5-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/bun/core/Updater.ts +20 -11
- package/package.json +1 -1
- package/src/cli/index.ts +2 -3
|
@@ -500,7 +500,7 @@ const Updater = {
|
|
|
500
500
|
|
|
501
501
|
// Read the hash from the patched tar without full extraction:
|
|
502
502
|
// - macOS/Windows: Resources/version.json (inside the app bundle directory)
|
|
503
|
-
// - Linux: metadata.json (alongside the
|
|
503
|
+
// - Linux: metadata.json (alongside the app bundle)
|
|
504
504
|
const resourcesDir = "Resources";
|
|
505
505
|
const patchedTarBytes = await Bun.file(
|
|
506
506
|
tmpPatchedTarFilePath,
|
|
@@ -791,12 +791,11 @@ const Updater = {
|
|
|
791
791
|
await latestArchive.extract(extractionDir);
|
|
792
792
|
|
|
793
793
|
if (currentOS === "macos") {
|
|
794
|
-
// Find the .app bundle by scanning extracted
|
|
795
|
-
const extractedFiles =
|
|
796
|
-
for (const
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
appBundleSubpath = appMatch[1] + "/";
|
|
794
|
+
// Find the .app bundle by scanning extracted directory
|
|
795
|
+
const extractedFiles = readdirSync(extractionDir);
|
|
796
|
+
for (const file of extractedFiles) {
|
|
797
|
+
if (file.endsWith('.app')) {
|
|
798
|
+
appBundleSubpath = file + "/";
|
|
800
799
|
break;
|
|
801
800
|
}
|
|
802
801
|
}
|
|
@@ -819,10 +818,20 @@ const Updater = {
|
|
|
819
818
|
// Platform-specific path handling
|
|
820
819
|
let newAppBundlePath: string;
|
|
821
820
|
if (currentOS === "linux") {
|
|
822
|
-
// On Linux, the tarball contains a directory bundle
|
|
823
|
-
//
|
|
824
|
-
const
|
|
825
|
-
|
|
821
|
+
// On Linux, the tarball contains a directory bundle
|
|
822
|
+
// Find the actual extracted app directory name instead of guessing
|
|
823
|
+
const extractedFiles = readdirSync(extractionDir);
|
|
824
|
+
const appBundleDir = extractedFiles.find(file => {
|
|
825
|
+
const filePath = join(extractionDir, file);
|
|
826
|
+
return statSync(filePath).isDirectory() && !file.endsWith('.tar');
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
if (!appBundleDir) {
|
|
830
|
+
console.error("Could not find app bundle directory in extraction");
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
newAppBundlePath = join(extractionDir, appBundleDir);
|
|
826
835
|
|
|
827
836
|
// Verify the app bundle directory exists
|
|
828
837
|
const bundleStats = statSync(newAppBundlePath, { throwIfNoEntry: false });
|
package/package.json
CHANGED
package/src/cli/index.ts
CHANGED
|
@@ -1206,9 +1206,8 @@ async function createLinuxInstallerArchive(
|
|
|
1206
1206
|
console.log("Creating Linux installer archive...");
|
|
1207
1207
|
|
|
1208
1208
|
// Create installer name using sanitized app file name (no spaces, URL-safe)
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
: `${appFileName}-Setup-${buildEnvironment}`;
|
|
1209
|
+
// Note: appFileName already includes the channel suffix for non-stable builds
|
|
1210
|
+
const installerName = `${appFileName}-Setup`;
|
|
1212
1211
|
|
|
1213
1212
|
// Create temp directory for staging
|
|
1214
1213
|
const stagingDir = join(buildFolder, `${installerName}-staging`);
|