mirror of
https://github.com/wavetermdev/backup.git
synced 2026-04-22 15:26:58 -07:00
Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c32f690c6 | |||
| 4b5eccab7c | |||
| a69ac24659 | |||
| fde141fce3 | |||
| 42656ecd71 | |||
| 291f7f61ed | |||
| da76719800 | |||
| 0d8b163b63 | |||
| 8656387329 | |||
| d1baf504ba | |||
| 36de526e8e | |||
| 2acb551f4b | |||
| f87c7a28a6 | |||
| fecdc5abdc | |||
| 769f3fc43c | |||
| c73ac66ed7 | |||
| 5258a67a78 | |||
| 77ea45392a | |||
| eab2cb616d | |||
| a6f2e0b26e | |||
| 358ffb6d50 | |||
| a2795fb74d | |||
| c5d4a0e1f3 | |||
| 2a5857bc3d | |||
| 0b9834171d | |||
| c9b2c4b24c | |||
| d6124c27b6 | |||
| 662172db31 | |||
| 8b540cd989 | |||
| 45a3f7e721 | |||
| a3d2b1a54c | |||
| d77dd5f507 | |||
| 237a1088b0 | |||
| 036b0ff989 | |||
| 29acdc6eff | |||
| 3a119ae575 | |||
| 72a5d18d0d | |||
| 4357bcf1c8 | |||
| 33fc3518c0 | |||
| 2735b03cb8 | |||
| 6091305bb3 | |||
| 55a5b8615b | |||
| a1ab25936e | |||
| 7bf1a259a2 | |||
| bde2a9ccfe | |||
| c078f017ed | |||
| 01dc6144ac | |||
| b54cad6304 | |||
| e30748109c | |||
| 70db1e1b48 | |||
| 93d46cca80 | |||
| 4ef921bdd1 | |||
| 1979e401d4 | |||
| baf00ac514 | |||
| b5022c555a | |||
| ab21591314 | |||
| 1f9d9b160a | |||
| 50953839b1 | |||
| 438d17b933 | |||
| 31b9c3d3a5 | |||
| adf83c73b1 | |||
| 089862d990 | |||
| b5d481734f | |||
| 402c8c2485 | |||
| 41f91b6a8a | |||
| 5af7d21e4b | |||
| 6c115716b0 | |||
| 75be66bada | |||
| 189e632ff7 | |||
| bbf471566f | |||
| 0464cccf0a | |||
| 17990afd5d | |||
| 9e806d0621 | |||
| 3fa6494493 | |||
| 98385b1e0d | |||
| bdfb80e62f | |||
| b8b4dc20f5 | |||
| 314932d402 | |||
| 3f83441868 |
@@ -1,25 +1,19 @@
|
|||||||
name: "Build Helper"
|
name: "Build Helper"
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
env:
|
env:
|
||||||
GO_VERSION: "1.21.5"
|
GO_VERSION: "1.22.0"
|
||||||
NODE_VERSION: "21.5.0"
|
NODE_VERSION: "21.5.0"
|
||||||
jobs:
|
jobs:
|
||||||
runbuild:
|
runbuild:
|
||||||
outputs:
|
|
||||||
WAVETERM_VERSION: ${{ steps.set-version.outputs.WAVETERM_VERSION }}
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- platform: "darwin"
|
- platform: "darwin"
|
||||||
arch: "x64"
|
arch: "universal"
|
||||||
runner: "macos-latest"
|
|
||||||
scripthaus: "build-package"
|
|
||||||
- platform: "darwin"
|
|
||||||
arch: "arm64"
|
|
||||||
runner: "macos-latest-xlarge"
|
runner: "macos-latest-xlarge"
|
||||||
scripthaus: "build-package"
|
scripthaus: "build-package"
|
||||||
- platform: "linux"
|
- platform: "linux"
|
||||||
arch: "x64"
|
arch: "amd64"
|
||||||
runner: "ubuntu-latest"
|
runner: "ubuntu-latest"
|
||||||
scripthaus: "build-package-linux"
|
scripthaus: "build-package-linux"
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
@@ -29,6 +23,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
repository: scripthaus-dev/scripthaus
|
repository: scripthaus-dev/scripthaus
|
||||||
path: scripthaus
|
path: scripthaus
|
||||||
|
- name: Install Linux Build Dependencies (Linux only)
|
||||||
|
if: matrix.platform == 'linux'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install --no-install-recommends -y libarchive-tools libopenjp2-tools rpm
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{env.GO_VERSION}}
|
go-version: ${{env.GO_VERSION}}
|
||||||
@@ -36,7 +35,8 @@ jobs:
|
|||||||
wavesrv/go.sum
|
wavesrv/go.sum
|
||||||
waveshell/go.sum
|
waveshell/go.sum
|
||||||
scripthaus/go.sum
|
scripthaus/go.sum
|
||||||
- run: |
|
- name: Install Scripthaus
|
||||||
|
run: |
|
||||||
go work use ./scripthaus;
|
go work use ./scripthaus;
|
||||||
cd scripthaus;
|
cd scripthaus;
|
||||||
go get ./...;
|
go get ./...;
|
||||||
@@ -45,30 +45,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{env.NODE_VERSION}}
|
node-version: ${{env.NODE_VERSION}}
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
- id: set-version
|
- name: Set Version
|
||||||
|
id: set-version
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(node -e 'console.log(require("./version.js"))')
|
VERSION=$(node -e 'console.log(require("./version.js"))')
|
||||||
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
|
echo "WAVETERM_VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
- run: yarn --frozen-lockfile
|
- name: Install Yarn Dependencies
|
||||||
- run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
|
run: yarn --frozen-lockfile
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Build ${{ matrix.platform }}/${{ matrix.arch }}
|
||||||
with:
|
run: ./scripthaus/scripthaus run ${{ matrix.scripthaus }}
|
||||||
name: waveterm-build-${{ matrix.platform }}-${{ matrix.arch }}
|
env:
|
||||||
path: out/make/zip/${{ matrix.platform }}/${{ matrix.arch }}/*.zip
|
GOARCH: ${{ matrix.arch }}
|
||||||
retention-days: 2
|
CSC_LINK: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE}}
|
||||||
upload:
|
CSC_KEY_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_CERTIFICATE_PWD }}
|
||||||
name: "Upload Builds"
|
APPLE_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
|
||||||
runs-on: ubuntu-latest
|
APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_PWD }}
|
||||||
needs: [runbuild]
|
APPLE_TEAM_ID: ${{ matrix.platform == 'darwin' && secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
|
||||||
steps:
|
- name: Upload to S3 staging
|
||||||
- uses: actions/download-artifact@v4
|
run: aws s3 cp make/ s3://waveterm-github-artifacts/staging/${{ steps.set-version.outputs.WAVETERM_VERSION }}/ --recursive --exclude "*/*" --exclude "builder-*.yml"
|
||||||
with:
|
|
||||||
merge-multiple: true
|
|
||||||
path: buildtemp
|
|
||||||
- run: |
|
|
||||||
echo "${{ needs.runbuild.outputs.WAVETERM_VERSION }}" > buildtemp/version.txt
|
|
||||||
- run: (cd buildtemp; zip ../waveterm-builds.zip *)
|
|
||||||
- run: aws s3 cp waveterm-builds.zip s3://waveterm-github-artifacts/
|
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: "${{ secrets.S3_USERID }}"
|
AWS_ACCESS_KEY_ID: "${{ secrets.S3_USERID }}"
|
||||||
AWS_SECRET_ACCESS_KEY: "${{ secrets.S3_SECRETKEY }}"
|
AWS_SECRET_ACCESS_KEY: "${{ secrets.S3_SECRETKEY }}"
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
name: TestDriver.ai Regression Testing
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["main"]
|
||||||
|
schedule:
|
||||||
|
- cron: "0 21 * * *" # every day at 9pm
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: "TestDriver"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: dashcamio/testdriver@main
|
||||||
|
id: testdriver
|
||||||
|
# note that .testdriver/prerun.sh runs before this, so the app has launched already
|
||||||
|
with:
|
||||||
|
prompt: |
|
||||||
|
2. click "Continue"
|
||||||
|
2. focus the Wave input with the keyboard shorcut Command + I
|
||||||
|
3. type 'ls' into the input
|
||||||
|
4. press return
|
||||||
|
5. validate Wave shows the result of 'ls'
|
||||||
@@ -20,3 +20,5 @@ temp.sql
|
|||||||
.idea/
|
.idea/
|
||||||
test/
|
test/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
make/
|
||||||
|
waveterm-builds.zip
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
rm ~/Desktop/WITH-LOVE-FROM-AMERICA.txt
|
||||||
|
cd ~/actions-runner/_work/testdriver/testdriver/
|
||||||
|
brew install go
|
||||||
|
brew tap scripthaus-dev/scripthaus
|
||||||
|
brew install scripthaus
|
||||||
|
npm install -g yarn
|
||||||
|
scripthaus run build-backend
|
||||||
|
echo "Yarn"
|
||||||
|
yarn
|
||||||
|
echo "Rebuild"
|
||||||
|
scripthaus run electron-rebuild
|
||||||
|
echo "Webpack"
|
||||||
|
scripthaus run webpack-build
|
||||||
|
echo "Starting Electron"
|
||||||
|
scripthaus run electron 1>/dev/null 2>&1 &
|
||||||
|
echo "Electron Done"
|
||||||
|
exit
|
||||||
@@ -53,12 +53,6 @@ Install modules (we use yarn):
|
|||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
Electron also requires specific builds of node_modules to work (because Electron embeds a specific node.js version that might not match your development node.js version). We use a special electron command to cross-compile those modules:
|
|
||||||
|
|
||||||
```
|
|
||||||
scripthaus run electron-rebuild
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running WebPack
|
## Running WebPack
|
||||||
|
|
||||||
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# Wave Terminal
|
# Wave Terminal
|
||||||
|
|
||||||
A open-source, cross-platform, AI-integrated, modern terminal for seamless workflows.
|
Wave is an open-source AI-native terminal built for seamless workflows.
|
||||||
|
|
||||||
Wave isn't just another terminal emulator; it's a rethink on how terminals are built. Wave combines command line with the power of the open web to help veteran CLI users and new developers alike.
|
Wave isn't just another terminal emulator; it's a rethink on how terminals are built. Wave combines command line with the power of the open web to help veteran CLI users and new developers alike.
|
||||||
|
|
||||||
@@ -17,13 +17,14 @@ Wave isn't just another terminal emulator; it's a rethink on how terminals are b
|
|||||||
- Persistent sessions that can restore state across network disconnections and reboots
|
- Persistent sessions that can restore state across network disconnections and reboots
|
||||||
- Searchable contextual command history across all remote sessions (saved locally)
|
- Searchable contextual command history across all remote sessions (saved locally)
|
||||||
- Workspaces, tabs, and command blocks to keep you organized
|
- Workspaces, tabs, and command blocks to keep you organized
|
||||||
|
- CodeEdit, to edit local and remote files with a VSCode-like inline editor
|
||||||
- AI Integration with ChatGPT (or ChatGPT compatible APIs) to help write commands and get answers inline
|
- AI Integration with ChatGPT (or ChatGPT compatible APIs) to help write commands and get answers inline
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Wave Terminal works with MacOS and Linux (preliminary).
|
Wave Terminal works with MacOS and Linux.
|
||||||
|
|
||||||
Install Wave Terminal from: [www.waveterm.dev/download](https://www.waveterm.dev/download)
|
Install Wave Terminal from: [www.waveterm.dev/download](https://www.waveterm.dev/download)
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ brew install --cask wave
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Wave uses Github Project for tracking issues.
|
Wave uses Github Issues for issue tracking.
|
||||||
|
|
||||||
Find more information in our [Contributions Guide](CONTRIBUTING.md), which includes:
|
Find more information in our [Contributions Guide](CONTRIBUTING.md), which includes:
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ The license disclaimers for the backend are generated using the [go-licenses](ht
|
|||||||
|
|
||||||
The license disclaimers for the frontend are generated using the [`yarn licenses` tool](https://classic.yarnpkg.com/lang/en/docs/cli/licenses/). This outputs to the file [`frontend.md`](./disclaimers/frontend.md).
|
The license disclaimers for the frontend are generated using the [`yarn licenses` tool](https://classic.yarnpkg.com/lang/en/docs/cli/licenses/). This outputs to the file [`frontend.md`](./disclaimers/frontend.md).
|
||||||
|
|
||||||
These three disclaimer files linked above will be periodically regenerated to reflect new dependencies.
|
These disclaimer files linked above will be periodically regenerated to reflect new dependencies.
|
||||||
|
|
||||||
The [`scripthaus.md` file](../scripthaus.md) contains scripts to genrate the disclaimers and package them. To manually generate the disclaimers, run the following from the repository root directory:
|
The [`scripthaus.md` file](../scripthaus.md) contains scripts to generate the disclaimers and package them. To manually generate the disclaimers, run the following from the repository root directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
scripthaus run generate-license-disclaimers
|
scripthaus run generate-license-disclaimers
|
||||||
|
|||||||
@@ -179,11 +179,11 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
## github.com/google/go-github/v59/github
|
## github.com/google/go-github/v60/github
|
||||||
|
|
||||||
* Name: github.com/google/go-github/v59/github
|
* Name: github.com/google/go-github/v60/github
|
||||||
* Version: v59.0.0
|
* Version: v60.0.0
|
||||||
* License: [BSD-3-Clause](https://github.com/google/go-github/blob/v59.0.0/LICENSE)
|
* License: [BSD-3-Clause](https://github.com/google/go-github/blob/v60.0.0/LICENSE)
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
Copyright (c) 2013 The go-github AUTHORS. All rights reserved.
|
Copyright (c) 2013 The go-github AUTHORS. All rights reserved.
|
||||||
@@ -1138,8 +1138,8 @@ Exhibit B - “Incompatible With Secondary Licenses” Notice
|
|||||||
## github.com/kevinburke/ssh_config
|
## github.com/kevinburke/ssh_config
|
||||||
|
|
||||||
* Name: github.com/kevinburke/ssh_config
|
* Name: github.com/kevinburke/ssh_config
|
||||||
* Version: v0.0.0-20240109090616-36c8da3d7376
|
* Version: v0.0.0-20240306041034-17e2087ebde2
|
||||||
* License: [MIT](https://github.com/wavetermdev/ssh_config/blob/36c8da3d7376/LICENSE)
|
* License: [MIT](https://github.com/wavetermdev/ssh_config/blob/17e2087ebde2/LICENSE)
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
Copyright (c) 2017 Kevin Burke.
|
Copyright (c) 2017 Kevin Burke.
|
||||||
|
|||||||
+1523
-2193
File diff suppressed because one or more lines are too long
@@ -0,0 +1,266 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"command": "system:toggleDeveloperTools",
|
||||||
|
"keys": ["Cmd:Option:i"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:cancel",
|
||||||
|
"keys": ["Escape"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:confirm",
|
||||||
|
"keys": ["Enter"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:deleteItem",
|
||||||
|
"keys": ["Backspace", "Delete"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:selectAbove",
|
||||||
|
"keys": ["ArrowUp"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:selectBelow",
|
||||||
|
"keys": ["ArrowDown"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:selectPageAbove",
|
||||||
|
"keys": ["PageUp"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "generic:selectPageBelow",
|
||||||
|
"keys": ["PageDown"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:openHistory",
|
||||||
|
"keys": ["Cmd:h"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:openTabSearchModal",
|
||||||
|
"keys": ["Cmd:p"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:openConnectionsView",
|
||||||
|
"keys": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:openSettingsView",
|
||||||
|
"keys": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:newTab",
|
||||||
|
"keys": ["Cmd:t"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:focusCmdInput",
|
||||||
|
"keys": ["Cmd:i"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:focusSelectedLine",
|
||||||
|
"keys": ["Cmd:l"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:restartCommand",
|
||||||
|
"keys": ["Cmd:r"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:restartLastCommand",
|
||||||
|
"keys": ["Cmd:Shift:r"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:closeCurrentTab",
|
||||||
|
"keys": ["Cmd:w"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectLineAbove",
|
||||||
|
"keys": ["Cmd:ArrowUp", "Cmd:PageUp"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectLineBelow",
|
||||||
|
"keys": ["Cmd:ArrowDown", "Cmd:PageDown"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-1",
|
||||||
|
"keys": ["Cmd:1"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-2",
|
||||||
|
"keys": ["Cmd:2"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-3",
|
||||||
|
"keys": ["Cmd:3"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-4",
|
||||||
|
"keys": ["Cmd:4"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-5",
|
||||||
|
"keys": ["Cmd:5"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-6",
|
||||||
|
"keys": ["Cmd:6"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-7",
|
||||||
|
"keys": ["Cmd:7"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-8",
|
||||||
|
"keys": ["Cmd:8"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTab-9",
|
||||||
|
"keys": ["Cmd:9"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTabLeft",
|
||||||
|
"keys": ["Cmd:["]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectTabRight",
|
||||||
|
"keys": ["Cmd:]"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-1",
|
||||||
|
"keys": ["Cmd:Ctrl:1"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-2",
|
||||||
|
"keys": ["Cmd:Ctrl:2"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-3",
|
||||||
|
"keys": ["Cmd:Ctrl:3"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-4",
|
||||||
|
"keys": ["Cmd:Ctrl:4"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-5",
|
||||||
|
"keys": ["Cmd:Ctrl:5"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-6",
|
||||||
|
"keys": ["Cmd:Ctrl:6"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-7",
|
||||||
|
"keys": ["Cmd:Ctrl:7"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-8",
|
||||||
|
"keys": ["Cmd:Ctrl:8"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:selectWorkspace-9",
|
||||||
|
"keys": ["Cmd:Ctrl:9"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:toggleSidebar",
|
||||||
|
"keys": ["Cmd:Ctrl:s"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:deleteActiveLine",
|
||||||
|
"keys": ["Cmd:d"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "app:bookmarkActiveLine",
|
||||||
|
"keys": ["Cmd:b"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "bookmarks:edit",
|
||||||
|
"keys": ["e"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "bookmarks:copy",
|
||||||
|
"keys": ["c"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:autocomplete",
|
||||||
|
"keys": ["Tab"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:expandInput",
|
||||||
|
"keys": ["Cmd:e"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:clearInput",
|
||||||
|
"keys": ["Ctrl:c"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:cutLineLeftOfCursor",
|
||||||
|
"keys": ["Ctrl:u"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:previousHistoryItem",
|
||||||
|
"keys": ["Ctrl:p"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:nextHistoryItem",
|
||||||
|
"keys": ["Ctrl:n"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:cutWordLeftOfCursor",
|
||||||
|
"keys": ["Ctrl:w"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:paste",
|
||||||
|
"keys": ["Ctrl:y"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:openHistory",
|
||||||
|
"keys": ["Ctrl:r"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "cmdinput:openAIChat",
|
||||||
|
"keys": ["Ctrl:Space"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "history:closeHistory",
|
||||||
|
"keys": ["Ctrl:g", "Ctrl:c"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "history:toggleShowRemotes",
|
||||||
|
"keys": ["Cmd:r", "Ctrl:r"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "history:changeScope",
|
||||||
|
"keys": ["Ctrl:s", "Cmd:s"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "history:selectNextItem",
|
||||||
|
"keys": ["Ctrl:n"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "history:selectPreviousItem",
|
||||||
|
"keys": ["Ctrl:p"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "aichat:clearHistory",
|
||||||
|
"keys": ["Ctrl:l"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "terminal:copy",
|
||||||
|
"keys": ["Ctrl:Shift:c"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "terminal:paste",
|
||||||
|
"keys": ["Ctrl:Shift:v"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "codeedit:save",
|
||||||
|
"keys": ["Cmd:s"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "codeedit:close",
|
||||||
|
"keys": ["Cmd:d"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "codeedit:togglePreview",
|
||||||
|
"keys": ["Cmd:p"]
|
||||||
|
}
|
||||||
|
]
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 306 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 217 KiB |
+2
-1
@@ -1,3 +1,4 @@
|
|||||||
*/
|
*builds/
|
||||||
|
*-staged/
|
||||||
*.zip
|
*.zip
|
||||||
*.dmg
|
*.dmg
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
# Building for release
|
||||||
|
|
||||||
|
## Build Helper workflow
|
||||||
|
|
||||||
|
Our release builds are managed by the "Build Helper" GitHub Action, which is defined
|
||||||
|
in [`build-helper.yml`](../.github/workflows/build-helper.yml).
|
||||||
|
|
||||||
|
Under the hood, this will call the `build-package` and `build-package-linux` scripts in
|
||||||
|
[`scripthaus.md`](../scripthaus.md), which will build the Electron codebase using
|
||||||
|
WebPack and then the `wavesrv` and `mshell` binaries, then it will call `electron-builder`
|
||||||
|
to generate the distributable app packages. The configuration for `electron-builder`
|
||||||
|
is [`electron-builder.config.js`](../electron-builder.config.js).
|
||||||
|
|
||||||
|
This will also sign and notarize the macOS app package.
|
||||||
|
|
||||||
|
Once a build is complete, it will be placed in `s3://waveterm-github-artifacts/staging/<version>`.
|
||||||
|
It can be downloaded for testing using the [`download-staged-artifact.sh`](./download-staged-artifact.sh)
|
||||||
|
script. When you are ready to publish the artifacts to the public release feed, use the
|
||||||
|
[`publish-from-staging.sh`](./publish-from-staging.sh) script to directly copy the artifacts from
|
||||||
|
the staging bucket to the releases bucket.
|
||||||
|
|
||||||
|
## Automatic updates
|
||||||
|
|
||||||
|
Thanks to `electron-updater`, we are able to provide automatic app updates for macOS and Linux,
|
||||||
|
as long as the app was distributed as a DMG, AppImage, RPM, or DEB file.
|
||||||
|
|
||||||
|
With each release, `latest-mac.yml` and `latest-linux.yml` files will be produced that point to the
|
||||||
|
newest release. These also include file sizes and checksums to aid in validating the packages. The app
|
||||||
|
will check these files in our S3 bucket every hour to see if a new version is available.
|
||||||
|
|
||||||
|
## Local signing and notarizing for macOS (Deprecated)
|
||||||
|
|
||||||
|
The [`prepare-macos.sh`](./deprecated/prepare-macos.sh) script will download the latest build
|
||||||
|
artifacts from S3 and sign and notarize the macOS binaries within it. It will then
|
||||||
|
generate a DMG and a new ZIP archive with the new signed app.
|
||||||
|
|
||||||
|
This will call a few different JS scripts to perform more complicated operations.
|
||||||
|
[`osx-sign.js`](./deprecated/osx-sign.js) and [`osx-notarize.js`](./deprecated/osx-notarize.js) call
|
||||||
|
underlying Electron APIs to sign and notarize the package.
|
||||||
|
[`update-latest-mac.js`](./deprecated/update-latest-mac.js) will then update the `latest-mac.yml`
|
||||||
|
file with the SHA512 checksum and file size of the new signed and notarized installer. This
|
||||||
|
is important for the `electron-updater` auto-update mechanism to then find and validate new releases.
|
||||||
|
|
||||||
|
## Uploading release artifacts for distribution (Deprecated)
|
||||||
|
|
||||||
|
### Upload script
|
||||||
|
|
||||||
|
Once the build has been fully validated and is ready to be released, the
|
||||||
|
[`upload-release.sh`](./deprecated/upload-release.sh) script is then used to grab the completed
|
||||||
|
artifacts and upload them to the `dl.waveterm.dev` S3 bucket for distribution.
|
||||||
|
|
||||||
|
### Homebrew
|
||||||
|
|
||||||
|
Homebrew currently requires a manual bump of the version, but now that we have auto-updates,
|
||||||
|
we should add our cask to the list of apps that can be automatically bumped.
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
We do not currently submit the Linux packages to any of the package repositories. We
|
||||||
|
are working on addressing this in the near future.
|
||||||
|
|
||||||
|
## `electron-build` configuration
|
||||||
|
|
||||||
|
Most of our configuration is fairly standard. The main exception to this is that we exclude
|
||||||
|
our Go binaries from the ASAR archive that Electron generates. ASAR files cannot be executed
|
||||||
|
by NodeJS because they are not seen as files and therefore cannot be executed via a Shell
|
||||||
|
command. More information can be found
|
||||||
|
[here](https://www.electronjs.org/docs/latest/tutorial/asar-archives#executing-binaries-inside-asar-archive).
|
||||||
|
|
||||||
|
We also exclude most of our `node_modules` from packaging, as WebPack handles packaging
|
||||||
|
of any dependencies for us. The one exception is `monaco-editor`.
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
const eu = require("@electron/universal");
|
|
||||||
const path = require("path");
|
|
||||||
|
|
||||||
const x64Path = path.resolve(__dirname, "temp", "x64", "Wave.app");
|
|
||||||
const arm64Path = path.resolve(__dirname, "temp", "arm64", "Wave.app");
|
|
||||||
const outPath = path.resolve(__dirname, "temp", "Wave.app");
|
|
||||||
|
|
||||||
console.log("building universal package");
|
|
||||||
console.log("x64 path", x64Path);
|
|
||||||
console.log("arm64 path", arm64Path);
|
|
||||||
console.log("output path", outPath);
|
|
||||||
|
|
||||||
(async () => {
|
|
||||||
await eu.makeUniversalApp({
|
|
||||||
x64AppPath: x64Path,
|
|
||||||
arm64AppPath: arm64Path,
|
|
||||||
outAppPath: outPath,
|
|
||||||
});
|
|
||||||
console.log("created macos universal app");
|
|
||||||
})();
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# This script is used to build the universal app for macOS
|
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
rm -f *.zip *.dmg
|
|
||||||
ZIP_DIR=$SCRIPT_DIR/zip
|
|
||||||
rm -rf $ZIP_DIR
|
|
||||||
mkdir $ZIP_DIR
|
|
||||||
TEMP_DIR=$SCRIPT_DIR/temp
|
|
||||||
rm -rf $TEMP_DIR
|
|
||||||
mkdir $TEMP_DIR
|
|
||||||
BUILDS_DIR=$SCRIPT_DIR/builds
|
|
||||||
rm -rf $BUILDS_DIR
|
|
||||||
|
|
||||||
# Download the builds zip
|
|
||||||
aws s3 cp s3://waveterm-github-artifacts/waveterm-builds.zip .
|
|
||||||
BUILDS_ZIP=waveterm-builds.zip
|
|
||||||
if ! [ -f $BUILDS_ZIP ]; then
|
|
||||||
echo "no $BUILDS_ZIP found";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
echo "unzipping $BUILDS_ZIP"
|
|
||||||
unzip -q $BUILDS_ZIP -d $BUILDS_DIR
|
|
||||||
rm $BUILDS_ZIP
|
|
||||||
|
|
||||||
# Ensure we have exactly one of each build
|
|
||||||
find_build()
|
|
||||||
{
|
|
||||||
local BUILD_DIR=$1
|
|
||||||
local BUILD_PATTERN=$2
|
|
||||||
local BUILD_PATH=$(find $BUILD_DIR -type f -iname "$BUILD_PATTERN")
|
|
||||||
local NUM_MATCHES=$(echo $BUILD_PATH | wc -l)
|
|
||||||
if [ "0" -eq "$NUM_MATCHES" ]; then
|
|
||||||
echo "no $BUILD_NAME found in $BUILD_DIR"
|
|
||||||
exit 1
|
|
||||||
elif [ "1" -lt "$NUM_MATCHES" ]; then
|
|
||||||
echo "multiple $BUILD_NAME found in $BUILD_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo $BUILD_PATH
|
|
||||||
}
|
|
||||||
|
|
||||||
X64_ZIP=$(find_build $BUILDS_DIR "Wave-darwin-x64-*.zip")
|
|
||||||
ARM64_ZIP=$(find_build $BUILDS_DIR "Wave-darwin-arm64-*.zip")
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "unzipping zip files"
|
|
||||||
unzip -q $X64_ZIP -d $TEMP_DIR/x64
|
|
||||||
unzip -q $ARM64_ZIP -d $TEMP_DIR/arm64
|
|
||||||
rm $ARM64_ZIP $X64_ZIP
|
|
||||||
|
|
||||||
# Create universal app and sign and notarize it
|
|
||||||
TEMP_WAVE_DIR_ARM=$TEMP_DIR/x64/Wave.app
|
|
||||||
TEMP_WAVE_DIR_X64=$TEMP_DIR/arm64/Wave.app
|
|
||||||
TEMP_WAVE_DIR_UNIVERSAL=$TEMP_DIR/Wave.app
|
|
||||||
lipo -create -output $TEMP_DIR/wavesrv $TEMP_WAVE_DIR_X64/Contents/Resources/app/bin/wavesrv $TEMP_WAVE_DIR_ARM/Contents/Resources/app/bin/wavesrv
|
|
||||||
rm -rf $TEMP_WAVE_DIR_ARM/Contents/Resources/app
|
|
||||||
mv $TEMP_WAVE_DIR_X64/Contents/Resources/app $TEMP_DIR
|
|
||||||
cp $TEMP_DIR/wavesrv $TEMP_DIR/app/bin/wavesrv
|
|
||||||
mkdir $TEMP_WAVE_DIR_ARM/Contents/Resources/app
|
|
||||||
mkdir $TEMP_WAVE_DIR_X64/Contents/Resources/app
|
|
||||||
node $SCRIPT_DIR/build-universal.js
|
|
||||||
rm -rf $TEMP_WAVE_DIR_UNIVERSAL/Contents/Resources/app
|
|
||||||
mv $TEMP_DIR/app $TEMP_WAVE_DIR_UNIVERSAL/Contents/Resources/app
|
|
||||||
node $SCRIPT_DIR/osx-sign.js
|
|
||||||
DEBUG=electron-notarize node $SCRIPT_DIR/osx-notarize.js
|
|
||||||
echo "universal app creation success (build/sign/notarize)"
|
|
||||||
|
|
||||||
UVERSION=$(cat $BUILDS_DIR/version.txt)
|
|
||||||
DMG_NAME="waveterm-macos-universal-${UVERSION}.dmg"
|
|
||||||
ZIP_NAME="Wave-macos-universal-${UVERSION}.zip"
|
|
||||||
|
|
||||||
echo "creating universal zip"
|
|
||||||
ditto $TEMP_WAVE_DIR_UNIVERSAL $ZIP_DIR/Wave.app
|
|
||||||
cd $ZIP_DIR
|
|
||||||
zip -9yqr $ZIP_NAME Wave.app
|
|
||||||
mv $ZIP_NAME $BUILDS_DIR/
|
|
||||||
cd $SCRIPT_DIR
|
|
||||||
|
|
||||||
# Expects create-dmg repo to be cloned in the same parent directory as the waveterm repo.
|
|
||||||
echo "creating universal dmg"
|
|
||||||
$SCRIPT_DIR/../../create-dmg/create-dmg \
|
|
||||||
--volname "WaveTerm" \
|
|
||||||
--window-pos 200 120 \
|
|
||||||
--window-size 600 300 \
|
|
||||||
--icon-size 100 \
|
|
||||||
--icon "Wave.app" 200 130 \
|
|
||||||
--hide-extension "Wave.app" \
|
|
||||||
--app-drop-link 400 125 \
|
|
||||||
$DMG_NAME \
|
|
||||||
"$TEMP_WAVE_DIR_UNIVERSAL"
|
|
||||||
echo "success, created $DMG_NAME"
|
|
||||||
mv $DMG_NAME $BUILDS_DIR/
|
|
||||||
spctl -a -vvv -t install $TEMP_WAVE_DIR_UNIVERSAL/
|
|
||||||
|
|
||||||
rm -rf $TEMP_DIR $ZIP_DIR
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
// Usage: node generate-hash.js <path-to-installer>
|
||||||
|
// Example: node generate-hash.js ./make/Wave-0.0.1.dmg
|
||||||
|
// This script will generate a hash of the installer file, as defined by electron-builder.
|
||||||
|
// Courtesy of https://github.com/electron-userland/electron-builder/issues/3913#issuecomment-504698845
|
||||||
|
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs");
|
||||||
|
const crypto = require("crypto");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a hash of a file, as defined by electron-builder
|
||||||
|
* @param {string} file - Path to the file
|
||||||
|
* @param {string} algorithm - Hash algorithm to use
|
||||||
|
* @param {string} encoding - Encoding to use
|
||||||
|
* @returns {Promise<string>} - The hash of the file
|
||||||
|
*/
|
||||||
|
async function hashFile(file, algorithm = "sha512", encoding = "base64") {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const hash = crypto.createHash(algorithm);
|
||||||
|
hash.on("error", reject).setEncoding(encoding);
|
||||||
|
fs.createReadStream(file, {
|
||||||
|
highWaterMark: 1024 * 1024,
|
||||||
|
/* better to use more memory but hash faster */
|
||||||
|
})
|
||||||
|
.on("error", reject)
|
||||||
|
.on("end", () => {
|
||||||
|
hash.end();
|
||||||
|
resolve(hash.read());
|
||||||
|
})
|
||||||
|
.pipe(hash, {
|
||||||
|
end: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (require.main === module) {
|
||||||
|
const installerPath = path.resolve(process.cwd(), process.argv[2]);
|
||||||
|
(async () => {
|
||||||
|
const hash = await hashFile(installerPath);
|
||||||
|
console.log(`hash of ${installerPath}: ${hash}`);
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
hashFile,
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// Notarize the Wave.app for macOS
|
||||||
|
|
||||||
|
const { notarize } = require("@electron/notarize");
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notarize the Wave.app for macOS
|
||||||
|
* @param {string} waveAppPath - Path to the Wave.app
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
async function notarizeApp(waveAppPath) {
|
||||||
|
return notarize({
|
||||||
|
appPath: waveAppPath,
|
||||||
|
tool: "notarytool",
|
||||||
|
keychainProfile: "notarytool-creds",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log("notarize success");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log("notarize error", e);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (require.main === module) {
|
||||||
|
console.log("running osx-notarize");
|
||||||
|
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
|
||||||
|
(async () => {
|
||||||
|
await notarizeApp(waveAppPath);
|
||||||
|
console.log("notarization complete");
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
notarizeApp,
|
||||||
|
};
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
// Sign the app and binaries for macOS
|
||||||
|
|
||||||
|
const { signAsync } = require("@electron/osx-sign");
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sign the app and binaries for macOS
|
||||||
|
* @param {string} waveAppPath - Path to the Wave.app
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
async function signApp(waveAppPath) {
|
||||||
|
const binDirPath = path.resolve(waveAppPath, "Contents", "Resources", "app.asar.unpacked", "bin");
|
||||||
|
const binFilePaths = fs
|
||||||
|
.readdirSync(binDirPath, { recursive: true, withFileTypes: true })
|
||||||
|
.filter((f) => f.isFile())
|
||||||
|
.map((f) => path.resolve(binDirPath, f.path, f.name));
|
||||||
|
console.log("waveAppPath", waveAppPath);
|
||||||
|
console.log("binDirPath", binDirPath);
|
||||||
|
console.log("binFilePaths", binFilePaths);
|
||||||
|
return signAsync({
|
||||||
|
app: waveAppPath,
|
||||||
|
binaries: binFilePaths,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.log("signing success");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.log("signing error", e);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (require.main === module) {
|
||||||
|
console.log("running osx-sign");
|
||||||
|
const waveAppPath = path.resolve(__dirname, "temp", "Wave.app");
|
||||||
|
(async () => {
|
||||||
|
await signApp(waveAppPath);
|
||||||
|
console.log("signing complete");
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
signApp,
|
||||||
|
};
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# This script is used to sign and notarize the universal app for macOS
|
||||||
|
|
||||||
|
# Gets the directory of the script
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
|
# Remove old files and dirs, create new ones
|
||||||
|
rm -f *.zip *.dmg
|
||||||
|
ZIP_DIR=$SCRIPT_DIR/zip
|
||||||
|
rm -rf $ZIP_DIR
|
||||||
|
mkdir $ZIP_DIR
|
||||||
|
TEMP_DIR=$SCRIPT_DIR/temp
|
||||||
|
rm -rf $TEMP_DIR
|
||||||
|
mkdir $TEMP_DIR
|
||||||
|
BUILDS_DIR=$SCRIPT_DIR/builds
|
||||||
|
rm -rf $BUILDS_DIR
|
||||||
|
|
||||||
|
# Download the builds zip
|
||||||
|
aws s3 cp s3://waveterm-github-artifacts/waveterm-builds.zip .
|
||||||
|
BUILDS_ZIP=waveterm-builds.zip
|
||||||
|
if ! [ -f $BUILDS_ZIP ]; then
|
||||||
|
echo "no $BUILDS_ZIP found";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
echo "unzipping $BUILDS_ZIP"
|
||||||
|
unzip -q $BUILDS_ZIP -d $BUILDS_DIR
|
||||||
|
rm $BUILDS_ZIP
|
||||||
|
|
||||||
|
# Finds a file in a directory matching a filename pattern. Ensures there is exactly one match.
|
||||||
|
find_file()
|
||||||
|
{
|
||||||
|
local FILE_DIR=$1
|
||||||
|
local FILE_PATTERN=$2
|
||||||
|
local FILE_PATH=$(find $FILE_DIR -type f -iname "$FILE_PATTERN")
|
||||||
|
local NUM_MATCHES=$(echo $FILE_PATH | wc -l)
|
||||||
|
if [ "0" -eq "$NUM_MATCHES" ]; then
|
||||||
|
echo "no $FILE_PATTERN found in $FILE_DIR"
|
||||||
|
exit 1
|
||||||
|
elif [ "1" -lt "$NUM_MATCHES" ]; then
|
||||||
|
echo "multiple $FILE_PATTERN found in $FILE_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo $FILE_PATH
|
||||||
|
}
|
||||||
|
|
||||||
|
# Unzip Mac build
|
||||||
|
MAC_ZIP=$(find_file $BUILDS_DIR "Wave-darwin-universal-*.zip")
|
||||||
|
unzip -q $MAC_ZIP -d $TEMP_DIR
|
||||||
|
|
||||||
|
# Sign and notarize the app
|
||||||
|
node $SCRIPT_DIR/osx-sign.js
|
||||||
|
DEBUG=electron-notarize node $SCRIPT_DIR/osx-notarize.js
|
||||||
|
|
||||||
|
# Zip and move
|
||||||
|
echo "creating universal zip"
|
||||||
|
ZIP_NAME=$(basename $MAC_ZIP)
|
||||||
|
TEMP_WAVE_DIR_UNIVERSAL=$TEMP_DIR/Wave.app
|
||||||
|
ditto $TEMP_WAVE_DIR_UNIVERSAL $ZIP_DIR/Wave.app
|
||||||
|
cd $ZIP_DIR
|
||||||
|
zip -9yqr $ZIP_NAME Wave.app
|
||||||
|
mv $ZIP_NAME $BUILDS_DIR/
|
||||||
|
cd $SCRIPT_DIR
|
||||||
|
|
||||||
|
# Create a dmg
|
||||||
|
# Expects create-dmg repo to be cloned in the same parent directory as the waveterm repo.
|
||||||
|
echo "creating universal dmg"
|
||||||
|
DMG_NAME=$(echo $ZIP_NAME | sed 's/\.zip/\.dmg/')
|
||||||
|
$SCRIPT_DIR/../../create-dmg/create-dmg \
|
||||||
|
--volname "WaveTerm" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 600 300 \
|
||||||
|
--icon-size 100 \
|
||||||
|
--icon "Wave.app" 200 130 \
|
||||||
|
--hide-extension "Wave.app" \
|
||||||
|
--app-drop-link 400 125 \
|
||||||
|
$DMG_NAME \
|
||||||
|
"$TEMP_WAVE_DIR_UNIVERSAL"
|
||||||
|
echo "success, created $DMG_NAME"
|
||||||
|
mv $DMG_NAME $BUILDS_DIR/
|
||||||
|
spctl -a -vvv -t install $TEMP_WAVE_DIR_UNIVERSAL/
|
||||||
|
|
||||||
|
# Update latest-mac.yml
|
||||||
|
echo "updating latest-mac.yml"
|
||||||
|
LATEST_MAC_YML=$BUILDS_DIR/latest-mac.yml
|
||||||
|
node $SCRIPT_DIR/update-latest-mac.js $MAC_ZIP $LATEST_MAC_YML
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -rf $TEMP_DIR $ZIP_DIR
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user