Skip to content

Commit

Permalink
Fix error bin file macos
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-service-account committed Jul 3, 2024
1 parent 36c247f commit 06f2346
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/cortex-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,18 +420,43 @@ jobs:
cd cortex-js
make update-app-info
- name: create installer macos
if: runner.os == 'macOS'
run: |
cd cortex-js
mkdir -p installer
which cp
which mv
- name: copy bin file macos
if: runner.os == 'macOS'
uses: Lyoko-Jeremie/[email protected]
with:
source: "cortex-js/dist/cortexso-macos"
target: "cortex-js/cortex"

- name: Code Signing macOS
if: runner.os == 'macOS'
run: |
cd cortex-js
./dist/cortexso-macos --help
echo "--------"
./cortex --help
make codesign-binary CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}"
- name: copy bin file macos
if: runner.os == 'macOS'
uses: Lyoko-Jeremie/[email protected]
with:
source: "cortex-js/cortex"
target: "cortex-js/installer/cortex"

- name: Create MacOS PKG Installer
if: runner.os == 'macOS'
run: |
cd cortex-js
mkdir installer
cp cortex installer/cortex
echo "--------"
./installer/cortex --help
pkgbuild --identifier ai.cortex.pkg --install-location ./usr/local/bin/ --root ./installer cortex-installer.pkg
make codesign-installer CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}"
Expand Down
2 changes: 0 additions & 2 deletions cortex-js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ ifeq ($(OS),Windows_NT)
@powershell -Command 'npx resedit --in $(CORTEX_EXE_IN) --out $(CORTEX_EXE_OUT) --icon "1,cortex.ico" --no-grow --company-name "Homebrew Computer Pte Ltd" --file-description "cortex cli" --file-version "$(CORTEX_VERSION)" --internal-name "cortex" --product-name "cortex" --product-version "$(CORTEX_VERSION)"'
else ifeq ($(shell uname -s),Linux)
@cp ./dist/cortexso-linux ./cortex
else
@cp ./dist/cortexso-macos ./cortex
endif

codesign-binary:
Expand Down
2 changes: 1 addition & 1 deletion cortex-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"compile": "npx ncc build ./dist/src/command.js -o command",
"build": "nest build",
"build:cpuInfo": "npx node-gyp rebuild -C ./cpuinfo",
"build:binary": "yarn build:cpuInfo && yarn build && yarn compile && npx -q patch-package && npx @yao-pkg/pkg .",
"build:binary": "yarn build:cpuInfo && yarn build && yarn compile && npx -q patch-package && npx @yao-pkg/pkg . --options max-old-space-size=1024",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"build:extensions": "run-script-os",
"build:extensions:windows": "powershell -command \"$jobs = Get-ChildItem -Path './src/extensions' -Directory | ForEach-Object { Start-Job -Name ($_.Name) -ScriptBlock { param($_dir); try { Set-Location $_dir; yarn; yarn build; Write-Output 'Build successful in ' + $_dir } catch { Write-Error 'Error in ' + $_dir; throw } } -ArgumentList $_.FullName }; $jobs | Wait-Job; $jobs | ForEach-Object { Receive-Job -Job $_ -Keep } | ForEach-Object { Write-Host $_ }; $failed = $jobs | Where-Object { $_.State -ne 'Completed' -or $_.ChildJobs[0].JobStateInfo.State -ne 'Completed' }; if ($failed) { Exit 1 }\"",
Expand Down

0 comments on commit 06f2346

Please sign in to comment.