Skip to content

Commit 42e7dc5

Browse files
committed
fix bundle
Signed-off-by: Alex Mazanov <alexandr.mazanov@gmail.com>
1 parent da3a413 commit 42e7dc5

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
env:
1919
XCODE_VERSION: "16.2.0"
20-
BUNDLE_ID: "com.naveedhasan.TRex"
20+
BUNDLE_ID: "com.ameba.TRex"
2121
APP_NAME: "TRex"
2222
BETA_FEED_URL: "https://ameba.github.io/TRex/appcast_beta.xml"
2323
PROD_FEED_URL: "https://ameba.github.io/TRex/appcast.xml"
@@ -111,7 +111,6 @@ jobs:
111111
CURRENT_PROJECT_VERSION="$CURRENT_PROJECT_VERSION" \
112112
build
113113
114-
115114
- name: Verify Universal Binary
116115
run: |
117116
echo "Checking binary architectures..."
@@ -318,24 +317,24 @@ jobs:
318317
cat "CHANGELOG.md" >> "$TEMP_FILE"
319318
fi
320319
mv "$TEMP_FILE" "CHANGELOG.md"
321-
320+
322321
- name: Generate Homebrew Formula
323322
if: ${{ env.IS_BETA != 'true' }}
324323
run: |
325324
# Only generate formula for non-beta releases
326325
echo "Generating Homebrew formula for version $VERSION"
327-
326+
328327
# Ensure Formula directory exists
329328
mkdir -p Formula
330-
329+
331330
# Create the formula from template
332331
FORMULA_FILE="Formula/trex.rb"
333332
cp docs/templates/trex.rb.template "$FORMULA_FILE"
334-
333+
335334
# Replace template variables
336335
sed -i '' "s/{{VERSION}}/$VERSION/g" "$FORMULA_FILE"
337336
sed -i '' "s/{{SHA256}}/$ZIP_SHA/g" "$FORMULA_FILE"
338-
337+
339338
echo "Generated Homebrew formula at $FORMULA_FILE"
340339
341340
- name: Commit and Push Changes
@@ -381,4 +380,4 @@ jobs:
381380
run: |
382381
echo "Build status: ${{ needs.build.result }}"
383382
echo "Sign status: ${{ needs.sign.result }}"
384-
echo "Notarize status: ${{ needs.notarize.result }}"
383+
echo "Notarize status: ${{ needs.notarize.result }}"

docs/templates/trex.rb.template

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cask "trex" do
2+
version "{{VERSION}}"
3+
sha256 "{{SHA256}}"
4+
5+
url "https://github.com/ameba/TRex/releases/download/v#{version}/TRex-#{version}.zip"
6+
name "TRex"
7+
desc "Text Recognition for macOS"
8+
homepage "https://github.com/ameba/TRex"
9+
10+
livecheck do
11+
url :url
12+
strategy :github_latest
13+
end
14+
15+
auto_updates true
16+
17+
app "TRex.app"
18+
binary "#{appdir}/TRex.app/Contents/MacOS/TRex CMD", target: "trex"
19+
20+
zap trash: [
21+
"~/Library/Application Support/com.ameba.TRex",
22+
"~/Library/Caches/com.ameba.TRex",
23+
"~/Library/Preferences/com.ameba.TRex.plist",
24+
]
25+
end

0 commit comments

Comments
 (0)