Skip to content

Commit

Permalink
Numerous bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bbqsrc committed Jul 6, 2020
1 parent 570e909 commit aee8b09
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 18 deletions.
6 changes: 1 addition & 5 deletions inno-setup/index.js
Expand Up @@ -6,12 +6,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const path_1 = __importDefault(require("path"));
const lib_1 = require("./lib");
async function run() {
const issPath = core.getInput('path', { required: true });
Expand All @@ -22,7 +18,7 @@ async function run() {
.map(x => `/D${x.trim()}`);
}
const installerOutput = await lib_1.makeInstaller(issPath, defines);
core.setOutput("installer-path", path_1.default.join(installerOutput, "install.exe"));
core.setOutput("installer-path", installerOutput);
}
run().catch(err => {
console.error(err.stack);
Expand Down
2 changes: 1 addition & 1 deletion inno-setup/index.ts
Expand Up @@ -14,7 +14,7 @@ async function run() {

const installerOutput = await makeInstaller(issPath, defines)

core.setOutput("installer-path", path.join(installerOutput, "install.exe"))
core.setOutput("installer-path", installerOutput)
}

run().catch(err => {
Expand Down
3 changes: 2 additions & 1 deletion inno-setup/lib.js
Expand Up @@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
const exec = __importStar(require("@actions/exec"));
const tmp_1 = __importDefault(require("tmp"));
const path_1 = __importDefault(require("path"));
const shared_1 = require("../shared");
const ISCC_PATH = `"C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe"`;
async function makeInstaller(issPath, defines = []) {
Expand All @@ -24,6 +25,6 @@ async function makeInstaller(issPath, defines = []) {
await exec.exec(`${ISCC_PATH} ${signCmd}`, [
"/Qp", `/O${installerOutput}`, ...defines, issPath
]);
return installerOutput;
return path_1.default.join(installerOutput, "install.exe");
}
exports.makeInstaller = makeInstaller;
3 changes: 2 additions & 1 deletion inno-setup/lib.ts
@@ -1,5 +1,6 @@
import * as exec from "@actions/exec"
import tmp from "tmp"
import path from "path"

import { DIVVUN_PFX, secrets } from "../shared"

Expand All @@ -19,5 +20,5 @@ export async function makeInstaller(issPath: string, defines: string[] = []): Pr
"/Qp", `/O${installerOutput}`, ...defines, issPath
])

return installerOutput
return path.join(installerOutput, "install.exe")
}
9 changes: 1 addition & 8 deletions keyboard/deploy/index.ts
Expand Up @@ -111,14 +111,7 @@ async function run() {
throw new Error("artifact url is null; this is a logic error.")
}

fs.writeFileSync("./payload.toml", payloadMetadata, "utf8")

const isDeploying = shouldDeploy() || core.getInput('force-deploy');

if (!isDeploying) {
core.warning("Not deploying; ending.")
return
}
fs.writeFileSync("./metadata.toml", payloadMetadata, "utf8")

await PahkatUploader.upload(artifactPath, artifactUrl, "./metadata.toml", repoPackageUrl)
}
Expand Down
2 changes: 2 additions & 0 deletions speller/bundle/index.js
Expand Up @@ -76,6 +76,8 @@ async function run() {
return code;
})
.write("./install.iss");
core.debug("generated install.iss:");
core.debug(builder.build());
const payloadPath = await lib_1.makeInstaller("./install.iss");
core.setOutput("payload-path", payloadPath);
}
Expand Down
3 changes: 3 additions & 0 deletions speller/bundle/index.ts
Expand Up @@ -97,6 +97,9 @@ async function run() {
})
.write("./install.iss")

core.debug("generated install.iss:")
core.debug(builder.build())

const payloadPath = await makeInstaller("./install.iss")
core.setOutput("payload-path", payloadPath)
} else if (spellerType == SpellerType.MacOS) {
Expand Down
2 changes: 1 addition & 1 deletion speller/deploy/index.js
Expand Up @@ -80,7 +80,7 @@ async function run() {
if (payloadMetadata == null) {
throw new Error("Payload is null; this is a logic error.");
}
fs_1.default.writeFileSync("./payload.toml", payloadMetadata, "utf8");
fs_1.default.writeFileSync("./metadata.toml", payloadMetadata, "utf8");
if (platform == null) {
throw new Error("Platform is null; this is a logic error.");
}
Expand Down
2 changes: 1 addition & 1 deletion speller/deploy/index.ts
Expand Up @@ -104,7 +104,7 @@ async function run() {
throw new Error("Payload is null; this is a logic error.")
}

fs.writeFileSync("./payload.toml", payloadMetadata, "utf8")
fs.writeFileSync("./metadata.toml", payloadMetadata, "utf8")

if (platform == null) {
throw new Error("Platform is null; this is a logic error.")
Expand Down

0 comments on commit aee8b09

Please sign in to comment.