chore: Refactor build and publish scripts for the desktop application. Replace direct electron-builder calls with a custom script to manage output directory outside of OneDrive/Documents. Update README to reflect new installer location and enhance release directory management with a dedicated module.
This commit is contained in:
@@ -14,12 +14,11 @@
|
||||
*/
|
||||
import { createHash } from "node:crypto";
|
||||
import { createReadStream, existsSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
||||
import { join, dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { join } from "node:path";
|
||||
import { S3Client, PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";
|
||||
import { getReleaseDir, projectRoot } from "./release-dir.mjs";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const root = join(__dirname, "..");
|
||||
const root = projectRoot;
|
||||
|
||||
/** Carga KEY=VALUE desde un archivo local (sin dependencia dotenv). */
|
||||
function loadEnvFile(filePath) {
|
||||
@@ -63,9 +62,11 @@ if (!accessKey || !secretKey) {
|
||||
}
|
||||
|
||||
const setupName = `IPSExtractor-Desktop-${version}-Setup.exe`;
|
||||
const setupPath = join(root, "release", setupName);
|
||||
const releaseDir = getReleaseDir();
|
||||
const setupPath = join(releaseDir, setupName);
|
||||
if (!existsSync(setupPath)) {
|
||||
console.error(`No se encontró ${setupPath}. Ejecuta antes: npm run dist`);
|
||||
console.error(`(directorio de release: ${releaseDir})`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user