mct-cli 0.2.9__tar.gz → 0.2.11__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.9 → mct_cli-0.2.11}/.github/workflows/release.yml +7 -5
- {mct_cli-0.2.9 → mct_cli-0.2.11}/PKG-INFO +1 -1
- {mct_cli-0.2.9 → mct_cli-0.2.11}/pyproject.toml +1 -1
- {mct_cli-0.2.9 → mct_cli-0.2.11}/scripts/update_bottle_formula.py +23 -13
- {mct_cli-0.2.9 → mct_cli-0.2.11}/uv.lock +1 -1
- {mct_cli-0.2.9 → mct_cli-0.2.11}/.gitignore +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/.python-version +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/CLAUDE.md +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/LICENSE +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/README.md +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/scripts/update_homebrew_formula.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/__init__.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/cli.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/commands/dock.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/commands/finder.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/commands/keyboard.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/commands/screenshot.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/commands/system.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/config.py +0 -0
- {mct_cli-0.2.9 → mct_cli-0.2.11}/src/mct/defaults.py +0 -0
|
@@ -158,7 +158,7 @@ jobs:
|
|
|
158
158
|
contents: write
|
|
159
159
|
strategy:
|
|
160
160
|
matrix:
|
|
161
|
-
os: [macos-
|
|
161
|
+
os: [macos-26, macos-15]
|
|
162
162
|
runs-on: ${{ matrix.os }}
|
|
163
163
|
|
|
164
164
|
steps:
|
|
@@ -187,15 +187,17 @@ jobs:
|
|
|
187
187
|
env:
|
|
188
188
|
GH_TOKEN: ${{ github.token }}
|
|
189
189
|
run: |
|
|
190
|
-
BOTTLE=$(find . -name "*.bottle
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
BOTTLE=$(find . -name "*.bottle*.tar.gz" | head -1)
|
|
191
|
+
RENAMED="${BOTTLE/--/-}"
|
|
192
|
+
mv "$BOTTLE" "$RENAMED"
|
|
193
|
+
echo "Uploading: $RENAMED"
|
|
194
|
+
gh release upload "${{ steps.version.outputs.tag }}" "$RENAMED" --repo ${{ github.repository }}
|
|
193
195
|
|
|
194
196
|
- name: Upload bottle JSON as artifact
|
|
195
197
|
uses: actions/upload-artifact@v4
|
|
196
198
|
with:
|
|
197
199
|
name: bottle-json-${{ matrix.os }}
|
|
198
|
-
path: "**/*.bottle
|
|
200
|
+
path: "**/*.bottle*.json"
|
|
199
201
|
|
|
200
202
|
update-bottle-formula:
|
|
201
203
|
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
|