mct-cli 0.2.8__tar.gz → 0.2.10__tar.gz
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.
- {mct_cli-0.2.8 → mct_cli-0.2.10}/.github/workflows/release.yml +5 -2
- {mct_cli-0.2.8 → mct_cli-0.2.10}/PKG-INFO +1 -1
- {mct_cli-0.2.8 → mct_cli-0.2.10}/pyproject.toml +1 -1
- {mct_cli-0.2.8 → mct_cli-0.2.10}/scripts/update_bottle_formula.py +23 -13
- {mct_cli-0.2.8 → mct_cli-0.2.10}/uv.lock +1 -1
- {mct_cli-0.2.8 → mct_cli-0.2.10}/.gitignore +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/.python-version +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/CLAUDE.md +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/LICENSE +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/README.md +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/scripts/update_homebrew_formula.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/__init__.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/cli.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/commands/dock.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/commands/finder.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/commands/keyboard.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/commands/screenshot.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/commands/system.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/config.py +0 -0
- {mct_cli-0.2.8 → mct_cli-0.2.10}/src/mct/defaults.py +0 -0
|
@@ -186,13 +186,16 @@ jobs:
|
|
|
186
186
|
- name: Upload bottle tarball to GitHub Release
|
|
187
187
|
env:
|
|
188
188
|
GH_TOKEN: ${{ github.token }}
|
|
189
|
-
run:
|
|
189
|
+
run: |
|
|
190
|
+
BOTTLE=$(find . -name "*.bottle*.tar.gz" | head -1)
|
|
191
|
+
echo "Found bottle: $BOTTLE"
|
|
192
|
+
gh release upload "${{ steps.version.outputs.tag }}" "$BOTTLE" --repo ${{ github.repository }}
|
|
190
193
|
|
|
191
194
|
- name: Upload bottle JSON as artifact
|
|
192
195
|
uses: actions/upload-artifact@v4
|
|
193
196
|
with:
|
|
194
197
|
name: bottle-json-${{ matrix.os }}
|
|
195
|
-
path: "*.
|
|
198
|
+
path: "**/*.bottle*.json"
|
|
196
199
|
|
|
197
200
|
update-bottle-formula:
|
|
198
201
|
needs: build-bottles
|
|
@@ -9,25 +9,35 @@ TAG_ORDER = ["arm64_tahoe", "arm64_sequoia"]
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def collect_bottles(bottles_dir):
|
|
12
|
-
"""Return
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
"""Return (tags, root_url, rebuild) from all .bottle.json files in the directory."""
|
|
13
|
+
tags = {}
|
|
14
|
+
root_url = None
|
|
15
|
+
rebuild = 0
|
|
16
|
+
for json_file in Path(bottles_dir).glob("*.bottle*.json"):
|
|
15
17
|
data = json.loads(json_file.read_text())
|
|
16
18
|
for formula_info in data.values():
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
bottle = formula_info["bottle"]
|
|
20
|
+
if root_url is None:
|
|
21
|
+
root_url = bottle.get("root_url")
|
|
22
|
+
rebuild = max(rebuild, bottle.get("rebuild", 0))
|
|
23
|
+
for tag, tag_data in bottle["tags"].items():
|
|
24
|
+
tags[tag] = {
|
|
19
25
|
"sha256": tag_data["sha256"],
|
|
20
26
|
"cellar": tag_data.get("cellar", ":any_skip_relocation"),
|
|
21
27
|
}
|
|
22
|
-
return
|
|
28
|
+
return tags, root_url, rebuild
|
|
23
29
|
|
|
24
30
|
|
|
25
|
-
def build_bottle_block(
|
|
31
|
+
def build_bottle_block(tags, root_url, rebuild):
|
|
26
32
|
lines = [" bottle do\n"]
|
|
33
|
+
if root_url:
|
|
34
|
+
lines.append(f' root_url "{root_url}"\n')
|
|
35
|
+
if rebuild:
|
|
36
|
+
lines.append(f' rebuild {rebuild}\n')
|
|
27
37
|
for tag in TAG_ORDER:
|
|
28
|
-
if tag in
|
|
29
|
-
cellar =
|
|
30
|
-
sha256 =
|
|
38
|
+
if tag in tags:
|
|
39
|
+
cellar = tags[tag]["cellar"]
|
|
40
|
+
sha256 = tags[tag]["sha256"]
|
|
31
41
|
padding = " " * (14 - len(tag))
|
|
32
42
|
lines.append(f' sha256 cellar: {cellar}, {tag}:{padding}"{sha256}"\n')
|
|
33
43
|
lines.append(" end\n")
|
|
@@ -35,8 +45,8 @@ def build_bottle_block(bottles):
|
|
|
35
45
|
|
|
36
46
|
|
|
37
47
|
def update_formula(formula_path, bottles_dir):
|
|
38
|
-
|
|
39
|
-
if not
|
|
48
|
+
tags, root_url, rebuild = collect_bottles(bottles_dir)
|
|
49
|
+
if not tags:
|
|
40
50
|
raise RuntimeError(f"No .bottle.json files found in {bottles_dir}")
|
|
41
51
|
|
|
42
52
|
content = Path(formula_path).read_text()
|
|
@@ -45,7 +55,7 @@ def update_formula(formula_path, bottles_dir):
|
|
|
45
55
|
content = re.sub(r'\n bottle do\n.*? end\n', '\n', content, flags=re.DOTALL)
|
|
46
56
|
|
|
47
57
|
# Insert after license line
|
|
48
|
-
bottle_block = "\n" + build_bottle_block(
|
|
58
|
+
bottle_block = "\n" + build_bottle_block(tags, root_url, rebuild)
|
|
49
59
|
content = re.sub(r'( license ".*"\n)', r'\1' + bottle_block, content)
|
|
50
60
|
|
|
51
61
|
Path(formula_path).write_text(content)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|