rlsbl 0.69.2 → 0.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +52 -5
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  # rlsbl
8
8
 
9
- Release orchestration and project scaffolding for npm, PyPI, and Go
9
+ Release orchestration and project scaffolding for npm, PyPI, Go, and [15 more release targets](https://rlsbl.smmh.dev/targets).
10
10
 
11
11
  ## Install
12
12
 
package/bin/cli.js CHANGED
@@ -3,14 +3,61 @@
3
3
 
4
4
  const { execFileSync, spawnSync } = require("child_process");
5
5
 
6
+ // 6c: Windows compatibility -- try python3, python, py in order
7
+ function findPython() {
8
+ for (const cmd of ["python3", "python", "py"]) {
9
+ try {
10
+ const output = execFileSync(cmd, ["--version"], {
11
+ encoding: "utf-8",
12
+ stdio: ["pipe", "pipe", "pipe"],
13
+ });
14
+ return { cmd, version: output.trim() };
15
+ } catch {
16
+ continue;
17
+ }
18
+ }
19
+ return null;
20
+ }
21
+
22
+ const python = findPython();
23
+ if (!python) {
24
+ console.error("rlsbl requires Python 3.11+. Install from https://python.org/");
25
+ process.exit(1);
26
+ }
27
+
28
+ // 6a: Python version check
29
+ const match = python.version.match(/Python (\d+)\.(\d+)/);
30
+ if (
31
+ !match ||
32
+ parseInt(match[1]) < 3 ||
33
+ (parseInt(match[1]) === 3 && parseInt(match[2]) < 11)
34
+ ) {
35
+ console.error(
36
+ `rlsbl requires Python 3.11+, but found ${python.version}.`
37
+ );
38
+ console.error("Install or upgrade: https://python.org/");
39
+ process.exit(1);
40
+ }
41
+
42
+ // 6b: rlsbl installation check
6
43
  try {
7
- execFileSync("python3", ["--version"], { stdio: "pipe" });
44
+ execFileSync(
45
+ python.cmd,
46
+ [
47
+ "-c",
48
+ "import importlib.util; exit(0 if importlib.util.find_spec('rlsbl') else 1)",
49
+ ],
50
+ { stdio: "pipe" }
51
+ );
8
52
  } catch {
9
- console.error("rlsbl requires Python 3.11+. Install from https://python.org/");
53
+ console.error("rlsbl Python package is not installed.");
54
+ console.error("Install it: pip install rlsbl");
10
55
  process.exit(1);
11
56
  }
12
57
 
13
- const result = spawnSync("python3", ["-m", "rlsbl", ...process.argv.slice(2)], {
14
- stdio: "inherit",
15
- });
58
+ const result = spawnSync(
59
+ python.cmd,
60
+ ["-m", "rlsbl", ...process.argv.slice(2)],
61
+ { stdio: "inherit" }
62
+ );
16
63
  process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rlsbl",
3
- "version": "0.69.2",
4
- "description": "Release orchestration and project scaffolding for npm, PyPI, and Go",
3
+ "version": "0.70.0",
4
+ "description": "Release orchestration and project scaffolding across package ecosystems",
5
5
  "license": "MIT",
6
6
  "bin": {
7
7
  "rlsbl": "bin/cli.js"