Skip to content

Commit

Permalink
Remove electron dependencies (#1153)
Browse files Browse the repository at this point in the history
Refactor and remove uses of Electron from CATcher

There are many uses of Electron in CATcher, even with the CATcher Electron
app being deprecated.  As such, there are many instances of unused code,
which is bad practice. Removing instances of uses of Electron allows us to
trim the codebase and remove dead code.

Let's 
* Refactor and remove uses of Electron from CATcher
* Remove all uses of Electron in the `src` folder first.
* Remove uses of Electron from `package.json` and other files
* Delete folders such as `electron-utils` and files such as `postinstall` that
are used to initialise electron
* Remove and amend scripts in `package.json` that are involved in
building the electron app
* Edit `deployment-actions.yml` to remove pre-build actions from CD
workflow
  • Loading branch information
vigneshsankariyer1234567890 authored Mar 16, 2023
1 parent 5180cff commit 827e17d
Show file tree
Hide file tree
Showing 31 changed files with 37 additions and 712 deletions.
81 changes: 0 additions & 81 deletions .github/workflows/deployment-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,84 +56,3 @@ jobs:
- name: Set upload_url Context
id: set_upload_url
run: echo "::set-output name=upload_url::${{ steps.draft_release.outputs.upload_url }}"

deploy_linux:
runs-on: ubuntu-latest
needs: draft_release
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run electron:linux
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: ./release/CATcher-${{ needs.draft_release.outputs.version_num }}.AppImage
asset_name: CATcher-${{ needs.draft_release.outputs.version_num }}.AppImage
asset_content_type: application/octet-stream

deploy_windows:
runs-on: windows-latest
needs: draft_release
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run electron:windows
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: ./release/CATcher ${{ needs.draft_release.outputs.version_num }}.exe
asset_name: CATcher-${{ needs.draft_release.outputs.version_num }}.exe
asset_content_type: application/octet-stream

deploy_macos:
runs-on: macos-latest
needs: draft_release
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
npm install
npm run electron:mac
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: ./release/CATcher-${{ needs.draft_release.outputs.version_num }}.dmg
asset_name: CATcher-${{ needs.draft_release.outputs.version_num }}.dmg
asset_content_type: application/octet-stream
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
/release
main.js
src/**/*.js
electron-utils/*.js
*.js.map

# tests coverage
Expand Down
35 changes: 0 additions & 35 deletions electron-builder.json

This file was deleted.

73 changes: 0 additions & 73 deletions electron-utils/menu-bar.ts

This file was deleted.

128 changes: 0 additions & 128 deletions electron-utils/oauth.ts

This file was deleted.

25 changes: 0 additions & 25 deletions electron-utils/supporting-logic.ts

This file was deleted.

Loading

0 comments on commit 827e17d

Please sign in to comment.