update buid.ts
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
} from "https://script.hatter.ink/@35/deno-commons-mod.ts";
|
||||
import {parseArgs} from "jsr:@std/cli/parse-args";
|
||||
import {readFileToString} from "https://global.hatter.ink/script/get/@1/deno-commons-1.6.0-mod.ts";
|
||||
import {execCommandAndStdout} from "../libraries/deno-commons-mod.ts";
|
||||
|
||||
async function main() {
|
||||
const flags = parseArgs(Deno.args, {
|
||||
@@ -143,7 +144,15 @@ async function buildFile(file: string, flags: any) {
|
||||
if (flags["skip-sign"]) {
|
||||
log.warn(`Skip signature for file: ${bundleFile}`);
|
||||
} else {
|
||||
await execCommandShell("script-sign.rs", [bundleFile]);
|
||||
const signScriptUserPin = execCommandAndStdout("keyring.rs", [
|
||||
"-gRU",
|
||||
"yubikey4white:user-pin",
|
||||
]);
|
||||
await execCommandShell("script-sign.rs", [
|
||||
"--pin",
|
||||
signScriptUserPin,
|
||||
bundleFile,
|
||||
]);
|
||||
}
|
||||
await execCommandShell("chmod", ["+x", bundleFile]);
|
||||
await writeBundleSourceSha256(file, bundleFile, flags);
|
||||
@@ -151,5 +160,5 @@ async function buildFile(file: string, flags: any) {
|
||||
|
||||
await main();
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260208T233252+08:00.MEUCIBDG/ENx5vAqlNOXA0j9
|
||||
// j8lVm77bTAIYJGQTB0WRz4VSAiEAjGRY1+99Y1srS8ohxkJ5GFhX7skwAIZTnhlBjXlVRd4=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260209T005219+08:00.MEUCIDo3pPzkGK7FiGyuEOOr
|
||||
// evz4jRLWSy5vuqZ1FynulxpkAiEAhGVuwgCzBTzwPSpV4r8aEQFJ6sjd/pZrRq3eUoG9DbE=
|
||||
|
||||
Reference in New Issue
Block a user