Skip to content

Commit

Permalink
Adjust 'copyBinaries' script for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
EmiM committed May 10, 2023
1 parent fec8e99 commit ea2f9af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/actions/before-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ runs:
run: cd packages/backend && npm run webpack:prod
shell: bash

- name: "Pull tor binary"
if: ${{ inputs.source-path == 'linux' || inputs.source-path == 'darwin' }}
- name: "Pull tor binary for Linux"
if: ${{ inputs.source-path == 'linux' }}
run: cd packages/desktop && export SOURCE_PATH=${{ inputs.source-path }} && npm run copyBinaries && npm run setMainEnvs
shell: bash

- name: "Pull tor binary for MacOS"
if: ${{ inputs.source-path == 'darwin' }}
run: cd packages/desktop && export SOURCE_PATH=${{ inputs.source-path }} && npm run copyBinariesDarwin && npm run setMainEnvs
shell: bash

- name: "Pull tor binary for Windows"
if: ${{ inputs.source-path == 'win32' }}
run: cd packages/desktop && export SOURCE_PATH=${{ inputs.source-path }} && npm run copyBinariesWin && npm run setMainEnvs
Expand Down
3 changes: 2 additions & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@
"scripts": {
"version": "echo $npm_package_version",
"copyBinaries": "cp -R ../../3rd-party/tor/$SOURCE_PATH/ ./tor/ && chmod 775 ./tor/tor",
"copyBinariesDarwin": "cp -R ../../3rd-party/tor/$SOURCE_PATH/ ./tor/ && chmod 775 ./tor/arm64/tor ./tor/x64/tor",
"copyBinariesWin": "xcopy ..\\..\\3rd-party\\tor\\win32 .\\tor\\",
"pullLibs": "wget -N https://zbay-binaries.s3.us-east-2.amazonaws.com/$SOURCE_PATH/libssl.so -P ./ && chmod 775 ./libssl.so",
"dist": "export SOURCE_PATH=darwin && npm run copyBinaries && npm run build:prod && electron-builder --mac",
"dist": "export SOURCE_PATH=darwin && npm run copyBinariesDarwin && npm run build:prod && electron-builder --mac",
"distUbuntu": "export SOURCE_PATH=linux TEST_MODE=true && npm run setMainEnvs && npm run copyBinaries && npm run pullLibs && npm run build:prod && electron-builder --linux",
"distwin": "export SOURCE_PATH=win32 && npm run copyBinariesWin && npm run build:prod && electron-builder --win",
"lint": "eslint --ext .jsx,.js,.ts,.tsx ./src/ --fix",
Expand Down

0 comments on commit ea2f9af

Please sign in to comment.