feat: add simple script: print-env.ts
This commit is contained in:
@@ -11,6 +11,13 @@
|
|||||||
"script_sha256": "b301944e64def6c3a1ada4e327a7b2c2e37c576a65da5f797998355c51686f76",
|
"script_sha256": "b301944e64def6c3a1ada4e327a7b2c2e37c576a65da5f797998355c51686f76",
|
||||||
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/helloworld-ts/main.ts"
|
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/helloworld-ts/main.ts"
|
||||||
},
|
},
|
||||||
|
"print-env.ts": {
|
||||||
|
"script_name": "print-env.ts",
|
||||||
|
"script_length": 154,
|
||||||
|
"script_sha256": "60236017ab2b448bf830fbcca63de7017fcf9462d91af16649ed6b49f516d24e",
|
||||||
|
"script_full_url": "https://git.hatter.ink/hatter/ts-scripts/raw/branch/main/single-scripts/print-env.ts",
|
||||||
|
"single_script_file": true
|
||||||
|
},
|
||||||
"sigstore-verify.ts": {
|
"sigstore-verify.ts": {
|
||||||
"script_name": "sigstore-verify.ts",
|
"script_name": "sigstore-verify.ts",
|
||||||
"script_length": 3511,
|
"script_length": 3511,
|
||||||
|
|||||||
7
single-scripts/print-env.ts
Executable file
7
single-scripts/print-env.ts
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env -S deno run --allow-env
|
||||||
|
|
||||||
|
const envs = Deno.env.toObject();
|
||||||
|
|
||||||
|
for (let envKey in envs) {
|
||||||
|
console.log(`${envKey} --> ${envs[envKey]}`);
|
||||||
|
}
|
||||||
@@ -40,7 +40,7 @@ fn main() -> XResult<()> {
|
|||||||
debugging!("Skip none dir: {}", script_dir);
|
debugging!("Skip none dir: {}", script_dir);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if "libraries" == script_dir || script_dir.starts_with(".") {
|
if "libraries" == script_dir || "single-scripts" == script_dir || script_dir.starts_with(".") {
|
||||||
debugging!("Skip update meta rs: {}", script_dir);
|
debugging!("Skip update meta rs: {}", script_dir);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user