Prepare 0.1.42 macOS Apple silicon release
This commit is contained in:
@@ -21,5 +21,6 @@ export function packageTarget(args, defaults = process) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function executableName(platform) {
|
export function executableName(platform) {
|
||||||
|
if (platform === 'darwin') return 'RuneStone-Browser.app/Contents/MacOS/RuneStone-Browser';
|
||||||
return platform === 'win32' ? 'RuneStone-Browser.exe' : 'RuneStone-Browser';
|
return platform === 'win32' ? 'RuneStone-Browser.exe' : 'RuneStone-Browser';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export async function stageRuntime({ project, host, platform, arch }) {
|
|||||||
let backup;
|
let backup;
|
||||||
let moved = false;
|
let moved = false;
|
||||||
try {
|
try {
|
||||||
await cp(source, staged, { recursive: true });
|
await cp(source, staged, { recursive: true, verbatimSymlinks: true });
|
||||||
// Electron Packager can leave its temporary root at 0700. Installed resources
|
// Electron Packager can leave its temporary root at 0700. Installed resources
|
||||||
// must remain traversable after the package manager changes ownership to root.
|
// must remain traversable after the package manager changes ownership to root.
|
||||||
if (platform === 'linux') await chmod(staged, 0o755);
|
if (platform === 'linux') await chmod(staged, 0o755);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import assert from 'node:assert/strict';
|
import assert from 'node:assert/strict';
|
||||||
import test from 'node:test';
|
import test from 'node:test';
|
||||||
import { mkdtemp, mkdir, writeFile, readFile, readdir, chmod, rm, stat } from 'node:fs/promises';
|
import { mkdtemp, mkdir, writeFile, readFile, readdir, chmod, rm, stat, symlink, rename } from 'node:fs/promises';
|
||||||
import { tmpdir } from 'node:os';
|
import { tmpdir } from 'node:os';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
import { stageRuntime } from '../scripts/stage-runtime.mjs';
|
import { stageRuntime } from '../scripts/stage-runtime.mjs';
|
||||||
@@ -37,6 +37,26 @@ test('missing source leaves the previous runtime intact', async t => {
|
|||||||
assert.equal(await readFile(join(options.destination, 'RuneStone-Browser.exe'), 'utf8'), 'old runtime');
|
assert.equal(await readFile(join(options.destination, 'RuneStone-Browser.exe'), 'utf8'), 'old runtime');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('macOS staging preserves the app bundle and executable layout', async t => {
|
||||||
|
const options = await fixture(t);
|
||||||
|
const source = join(options.project, 'dist/RuneStone-Browser-darwin-arm64');
|
||||||
|
const executable = 'RuneStone-Browser.app/Contents/MacOS/RuneStone-Browser';
|
||||||
|
await mkdir(join(source, 'RuneStone-Browser.app/Contents/MacOS'), { recursive: true });
|
||||||
|
await writeFile(join(source, executable), 'macOS fixture', { mode: 0o755 });
|
||||||
|
await writeFile(join(source, 'RuneStone-Browser.app/Contents/Info.plist'), 'bundle metadata');
|
||||||
|
if (process.platform !== 'win32') {
|
||||||
|
await symlink('../Info.plist', join(source, 'RuneStone-Browser.app/Contents/MacOS/metadata'));
|
||||||
|
}
|
||||||
|
const result = await stageRuntime({ ...options, platform: 'darwin', arch: 'arm64' });
|
||||||
|
await rename(source, `${source}-moved`);
|
||||||
|
assert.equal(await readFile(join(result.destination, executable), 'utf8'), 'macOS fixture');
|
||||||
|
assert.equal(await readFile(join(result.destination, 'RuneStone-Browser.app/Contents/Info.plist'), 'utf8'), 'bundle metadata');
|
||||||
|
assert.equal(await readFile(join(result.backup, 'RuneStone-Browser.exe'), 'utf8'), 'old runtime');
|
||||||
|
if (process.platform !== 'win32') {
|
||||||
|
assert.equal(await readFile(join(result.destination, 'RuneStone-Browser.app/Contents/MacOS/metadata'), 'utf8'), 'bundle metadata');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test('Linux staging rejects a non-executable runtime before replacing the old tree', { skip: process.platform === 'win32' }, async t => {
|
test('Linux staging rejects a non-executable runtime before replacing the old tree', { skip: process.platform === 'win32' }, async t => {
|
||||||
const options = await fixture(t);
|
const options = await fixture(t);
|
||||||
await chmod(join(options.source, 'RuneStone-Browser'), 0o644);
|
await chmod(join(options.source, 'RuneStone-Browser'), 0o644);
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "runestone",
|
"name": "runestone",
|
||||||
"version": "0.1.41",
|
"version": "0.1.42",
|
||||||
"description": "Desktop editor for a local workspace",
|
"description": "Desktop editor for a local workspace",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Generated
+1
-1
@@ -3130,7 +3130,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "runestone"
|
name = "runestone"
|
||||||
version = "0.1.41"
|
version = "0.1.42"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.23.1",
|
"base64 0.23.1",
|
||||||
"dunce",
|
"dunce",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "runestone"
|
name = "runestone"
|
||||||
version = "0.1.41"
|
version = "0.1.42"
|
||||||
description = "Writing workspace plus script editor"
|
description = "Writing workspace plus script editor"
|
||||||
authors = ["you"]
|
authors = ["you"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -44,4 +44,4 @@ panic = "abort"
|
|||||||
strip = true
|
strip = true
|
||||||
|
|
||||||
[package.metadata.runestone]
|
[package.metadata.runestone]
|
||||||
version = "0.1.41"
|
version = "0.1.42"
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ fn root(app: &AppHandle) -> Result<PathBuf> {
|
|||||||
fn executable(app: &AppHandle) -> Result<PathBuf> {
|
fn executable(app: &AppHandle) -> Result<PathBuf> {
|
||||||
let name = if cfg!(windows) {
|
let name = if cfg!(windows) {
|
||||||
"RuneStone-Browser.exe"
|
"RuneStone-Browser.exe"
|
||||||
|
} else if cfg!(target_os = "macos") {
|
||||||
|
"RuneStone-Browser.app/Contents/MacOS/RuneStone-Browser"
|
||||||
} else {
|
} else {
|
||||||
"RuneStone-Browser"
|
"RuneStone-Browser"
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "RuneStone",
|
"productName": "RuneStone",
|
||||||
"version": "0.1.41",
|
"version": "0.1.42",
|
||||||
"identifier": "com.runestone.app",
|
"identifier": "com.runestone.app",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm dev",
|
"beforeDevCommand": "pnpm dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user