Skip to content

Commit 00a672c

Browse files
authored
chore: rename the wails-test app and make it work again the integration tests (#601)
1 parent 9e6430f commit 00a672c

File tree

31 files changed

+118
-337
lines changed

31 files changed

+118
-337
lines changed

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,9 @@ Other low-level commands:
237237

238238
## Test update of a Wails locally
239239

240-
NOTE: currently the mac-os is not supported since the `github.com/arduino/arduino-create-agent/updater` package has hardcoded value of the `Arduino_Create_Agent`.
241-
242-
- `task wails:build` to build the app (by default the version=commit)
243-
- `task wails:up` to open the wails up (take not on the `Current Version` in the apps)
244-
- Open another termianl
245240
- `task wails:release-server:start` to start a local release server listening on port 3001 and serving the `public` folder with the releases
246-
- `task wails:release -- 6.0.7` to create a new release `6.0.7`
247-
- Open the Wails app and click on "Update" button.
241+
- `task wails:release:local -- 2.0.0` to create a new release `2.0.0`
242+
- `task wails:up:local` to open the wails app click on "Check for Updates" button to start the update from 0.0.0 to 2.0.0.
248243

249244
## Orchestrator configurations
250245

Taskfile.wails-test.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
version: "3"
2+
3+
tasks:
4+
release-server:start:
5+
dir: wails-test
6+
cmds:
7+
- docker rm -f wails-static-server
8+
- docker run --rm -d -v "./public:/usr/share/nginx/html:rw" --user $(id -u):$(id -g) -p 3001:80 --name wails-static-server nginx:alpine
9+
10+
release:local:
11+
desc: Build and put the binary into the folder served by a local NGINX server.
12+
vars:
13+
VERSION: "{{.CLI_ARGS}}"
14+
cmds:
15+
- task: build
16+
vars:
17+
VERSION: "{{.VERSION}}"
18+
- cmd: "cd .."
19+
- cmd: go run cmd/releaser/main.go -o wails-test/public/AppLab/Stable wails-test/build/bin/wails-test-{{.VERSION}}.app {{.VERSION}}
20+
platforms: [darwin]
21+
- cmd: go run cmd/releaser/main.go -o wails-test/public/AppLab/Stable wails-test/build/bin/wails-test-{{.VERSION}} {{.VERSION}}
22+
platforms: [linux]
23+
- cmd: go run cmd/releaser/main.go -o wails-test/public/AppLab/Stable wails-test/build/bin/wails-test-{{.VERSION}}.exe {{.VERSION}}
24+
platforms: [windows]
25+
26+
up:local:
27+
cmds:
28+
- task: build
29+
vars:
30+
VERSION: "0.0.0"
31+
- task: up:internal
32+
vars:
33+
VERSION: "0.0.0"
34+
UPDATE_URL: "http://127.0.0.1:3001/"
35+
36+
up:staging:
37+
cmds:
38+
- task: build
39+
vars:
40+
VERSION: "{{.VERSION}}"
41+
- task: up:internal
42+
vars:
43+
UPDATE_URL: https://downloads.oniudra.cc
44+
CF_ACCESS_CLIENT_SECRET: "$(export AWS_PROFILE=arduino-staging && aws ssm get-parameter --with-decryption --name /devops/downloads/cloudflare_access_client_secret --query Parameter.Value --output text)"
45+
CF_ACCESS_CLIENT_ID: "$(export AWS_PROFILE=arduino-staging && aws ssm get-parameter --with-decryption --name /devops/downloads/cloudflare_access_client_id --query Parameter.Value --output text)"
46+
47+
up:internal:
48+
internal: true
49+
dir: wails-test/build/bin
50+
cmds:
51+
- cmd: UPDATE_URL="{{.UPDATE_URL}}" CF_ACCESS_CLIENT_ID="{{.CF_ACCESS_CLIENT_ID}}" CF_ACCESS_CLIENT_SECRET="{{.CF_ACCESS_CLIENT_SECRET}}" ./wails-test-{{.VERSION}}
52+
platforms: [linux]
53+
- cmd: UPDATE_URL="{{.UPDATE_URL}}" CF_ACCESS_CLIENT_ID="{{.CF_ACCESS_CLIENT_ID}}" CF_ACCESS_CLIENT_SECRET="{{.CF_ACCESS_CLIENT_SECRET}}" ./wails-test-{{.VERSION}}.app/Contents/MacOS/wails-test-{{.VERSION}}
54+
platforms: [darwin]
55+
- cmd: UPDATE_URL="{{.UPDATE_URL}}" CF_ACCESS_CLIENT_ID="{{.CF_ACCESS_CLIENT_ID}}" CF_ACCESS_CLIENT_SECRET="{{.CF_ACCESS_CLIENT_SECRET}}" ./wails-test-{{.VERSION}}.exe
56+
platforms: [windows]
57+
58+
build:
59+
desc: Build the Wails app with a VERSION
60+
internal: true
61+
dir: wails-test
62+
vars:
63+
VERSION: "{{.VERSION }}"
64+
cmds:
65+
- "echo Building with version: {{.VERSION}}"
66+
- wails build -ldflags "-X main.version={{.VERSION}}" -o wails-test-{{.VERSION}}

Taskfile.yml

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: "3"
22

33
includes:
44
board-emulator: ./Taskfile.board-emulator.yml
5+
wails: ./Taskfile.wails-test.yml
56

67
# `.env.local` takes precedence. Only new keys found in the `.env` will be
78
# appended to the current set.
@@ -229,40 +230,6 @@ tasks:
229230
rm -rf "${TMP_PATH}"
230231
echo "Examples installed successfully."
231232
232-
wails:dev:
233-
desc: Run the Wails dev locally
234-
cmds:
235-
- go install github.com/wailsapp/wails/v2/cmd/wails@latest
236-
- cd adbfs-wails && wails dev
237-
238-
wails:build:
239-
desc: Build the Wails app with a VERSION
240-
dir: adbfs-wails
241-
vars:
242-
COMMIT:
243-
sh: echo "$(git log --no-show-signature -n 1 --format=%h)"
244-
VERSION: "{{.VERSION | default .COMMIT}}"
245-
cmds:
246-
- "echo Building with version: {{.VERSION}}"
247-
- wails build -ldflags "-X main.version={{.VERSION}}"
248-
249-
wails:up:internal:
250-
internal: true
251-
dir: adbfs-wails/build/bin
252-
cmds:
253-
- cmd: UPDATE_URL="{{.UPDATE_URL}}" CF_ACCESS_CLIENT_ID="{{.CF_ACCESS_CLIENT_ID}}" CF_ACCESS_CLIENT_SECRET="{{.CF_ACCESS_CLIENT_SECRET}}" ./test-wails
254-
platforms: [linux]
255-
- cmd: UPDATE_URL="{{.UPDATE_URL}}" CF_ACCESS_CLIENT_ID="{{.CF_ACCESS_CLIENT_ID}}" CF_ACCESS_CLIENT_SECRET="{{.CF_ACCESS_CLIENT_SECRET}}" ./test-wails.app/Contents/MacOS/test-wails
256-
platforms: [darwin]
257-
- cmd: UPDATE_URL="{{.UPDATE_URL}}" CF_ACCESS_CLIENT_ID="{{.CF_ACCESS_CLIENT_ID}}" CF_ACCESS_CLIENT_SECRET="{{.CF_ACCESS_CLIENT_SECRET}}" ./test-wails.exe
258-
platforms: [windows]
259-
260-
wails:up:
261-
cmds:
262-
- task: wails:up:internal
263-
vars:
264-
UPDATE_URL: http://127.0.0.1:3001/
265-
266233
generate:assets:
267234
desc: This generates the models and bricks index.
268235
cmds:
@@ -286,51 +253,6 @@ tasks:
286253
# Bumps the default pinned latest base python image tag
287254
sed -i "s#runnerVersion = \".*#runnerVersion = \"${semver_tag}\"#" internal/orchestrator/config/config.go
288255
289-
wails:up:staging:
290-
cmds:
291-
- task: wails:up:internal
292-
vars:
293-
UPDATE_URL: https://downloads.oniudra.cc
294-
CF_ACCESS_CLIENT_SECRET: "$(export AWS_PROFILE=arduino-staging && aws ssm get-parameter --with-decryption --name /devops/downloads/cloudflare_access_client_secret --query Parameter.Value --output text)"
295-
CF_ACCESS_CLIENT_ID: "$(export AWS_PROFILE=arduino-staging && aws ssm get-parameter --with-decryption --name /devops/downloads/cloudflare_access_client_id --query Parameter.Value --output text)"
296-
297-
wails:release:
298-
desc: Create a release
299-
cmds:
300-
- task: wails:build
301-
vars:
302-
VERSION: "{{.CLI_ARGS}}"
303-
- cmd: "cd .."
304-
- cmd: go run cmd/releaser/main.go -o adbfs-wails/public/AppLab/Stable adbfs-wails/build/bin/test-wails.app {{.CLI_ARGS}}
305-
platforms: [darwin]
306-
- cmd: go run cmd/releaser/main.go -o adbfs-wails/public/AppLab/Stable adbfs-wails/build/bin/test-wails {{.CLI_ARGS}}
307-
platforms: [linux]
308-
- cmd: go run cmd/releaser/main.go -o adbfs-wails/public/AppLab/Stable adbfs-wails/build/bin/test-wails.exe {{.CLI_ARGS}}
309-
platforms: [windows]
310-
311-
wails:upload:staging:
312-
desc: Upload AppLab/ folder and linux-amd64.json to S3 bucket arduino-downloads-staging-civet
313-
cmds:
314-
- export AWS_PROFILE=arduino-staging && aws s3 sync adbfs-wails/public/AppLab/Stable/{{.CLI_ARGS}}/ s3://arduino-downloads-staging-civet/AppLab/Stable/{{.CLI_ARGS}}/ --delete
315-
- export AWS_PROFILE=arduino-staging && aws s3 cp adbfs-wails/public/AppLab/Stable/linux-amd64.json s3://arduino-downloads-staging-civet/AppLab/Stable/linux-amd64.json
316-
317-
wails:release-server:start:
318-
dir: adbfs-wails
319-
cmds:
320-
- docker rm -f wails-static-server
321-
- docker run --rm -d -v "$PWD/public:/usr/share/nginx/html:ro" -p 3001:80 --name wails-static-server nginx:alpine
322-
323-
wails:tag:
324-
desc: Create a tag on the current commit and push it to the remote to create the release
325-
cmds:
326-
- |
327-
if [ -z "{{.CLI_ARGS}}" ]; then
328-
echo "Error: Version argument is required. Usage: task wails:tag -- <version>"
329-
exit 1
330-
fi
331-
- git tag -a "wails-{{.CLI_ARGS}}" -m "Release {{.CLI_ARGS}}"
332-
- git push origin "wails-{{.CLI_ARGS}}"
333-
334256
build:remoteocd:
335257
desc: Build remoteocd and install in the arduino tools
336258
cmds:

adbfs-wails/frontend/.vscode/extensions.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

adbfs-wails/frontend/wailsjs/go/main/App.d.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

adbfs-wails/frontend/wailsjs/go/main/App.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

adbfs-wails/frontend/wailsjs/go/models.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/contributing/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ The [good first issue label](https://github.com/bcmi-labs/orchestrator/issues?q=
1313
- `cmd/arduino-app-cli`: the arduino-app-cli itself.
1414
- `cmd/arduino-router`: the router that makes it possible to communicate from the sketch to the python code.
1515
- `cmd/arduino-fs-cli`: used for interact with arduino apps file system, mostly used for debugging the `adbfs` pkg.
16-
- `adbfs-wails`: used to test go wails backend.
16+
- `wails-test`: used to test go wails backend.
1717
- `examples`: contains some examples of arduino apps.
File renamed without changes.

0 commit comments

Comments
 (0)