Improve Build Commands to Accommodate Spaces#4845
Conversation
WalkthroughCross-platform Taskfile.yml updates add quoting around file paths and template variables across Android, Darwin, iOS, Linux, and Windows build configurations to ensure proper handling of spaces in variables like Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (5)
v3/internal/commands/build_assets/linux/Taskfile.yml (3)
117-117: Consider quoting all path arguments consistently.The
-binaryargument is quoted, but-icon,-desktopfile,-outputdir, and paths within-builddirare not. For consistency and to handle spaces uniformly, quote all path-based arguments.🔎 Proposed refactor
- - wails3 generate appimage -binary "{{.APP_NAME}}" -icon {{.ICON}} -desktopfile {{.DESKTOP_FILE}} -outputdir {{.OUTPUT_DIR}} -builddir {{.ROOT_DIR}}/build/linux/appimage/build + - wails3 generate appimage -binary "{{.APP_NAME}}" -icon "{{.ICON}}" -desktopfile "{{.DESKTOP_FILE}}" -outputdir "{{.OUTPUT_DIR}}" -builddir "{{.ROOT_DIR}}/build/linux/appimage/build"
190-190: Consider quoting PGP_KEY and SIGN_ROLE to handle spaces.If
PGP_KEYorSIGN_ROLEcontain spaces or special characters, the current unquoted usage could cause parsing issues.🔎 Proposed refactor
- - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.deb" --pgp-key {{.PGP_KEY}} {{if .SIGN_ROLE}}--role {{.SIGN_ROLE}}{{end}} + - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.deb" --pgp-key "{{.PGP_KEY}}" {{if .SIGN_ROLE}}--role "{{.SIGN_ROLE}}"{{end}}
204-204: Consider quoting PGP_KEY to handle spaces.If
PGP_KEYcontains spaces or special characters, the current unquoted usage could cause parsing issues.🔎 Proposed refactor
- - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.rpm" --pgp-key {{.PGP_KEY}} + - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}*.rpm" --pgp-key "{{.PGP_KEY}}"v3/internal/commands/build_assets/windows/Taskfile.yml (1)
166-166: Consider quoting certificate, thumbprint, and timestamp arguments.If
SIGN_CERTIFICATE,SIGN_THUMBPRINT, orTIMESTAMP_SERVERcontain spaces, the current unquoted usage could cause parsing issues.🔎 Proposed refactor for line 166
- - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.exe" {{if .SIGN_CERTIFICATE}}--certificate {{.SIGN_CERTIFICATE}}{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint {{.SIGN_THUMBPRINT}}{{end}} {{if .TIMESTAMP_SERVER}}--timestamp {{.TIMESTAMP_SERVER}}{{end}} + - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.exe" {{if .SIGN_CERTIFICATE}}--certificate "{{.SIGN_CERTIFICATE}}"{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint "{{.SIGN_THUMBPRINT}}"{{end}} {{if .TIMESTAMP_SERVER}}--timestamp "{{.TIMESTAMP_SERVER}}"{{end}}🔎 Proposed refactor for line 180
- - wails3 tool sign --input "build/windows/nsis/{{.APP_NAME}}-installer.exe" {{if .SIGN_CERTIFICATE}}--certificate {{.SIGN_CERTIFICATE}}{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint {{.SIGN_THUMBPRINT}}{{end}} {{if .TIMESTAMP_SERVER}}--timestamp {{.TIMESTAMP_SERVER}}{{end}} + - wails3 tool sign --input "build/windows/nsis/{{.APP_NAME}}-installer.exe" {{if .SIGN_CERTIFICATE}}--certificate "{{.SIGN_CERTIFICATE}}"{{end}} {{if .SIGN_THUMBPRINT}}--thumbprint "{{.SIGN_THUMBPRINT}}"{{end}} {{if .TIMESTAMP_SERVER}}--timestamp "{{.TIMESTAMP_SERVER}}"{{end}}Also applies to: 180-180
v3/internal/commands/build_assets/darwin/Taskfile.yml (1)
176-176: Consider quoting ENTITLEMENTS, SIGN_IDENTITY, and KEYCHAIN_PROFILE.If these variables contain spaces, the current unquoted usage could cause parsing issues.
🔎 Proposed refactor for line 176
- - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements {{.ENTITLEMENTS}}{{end}} + - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements "{{.ENTITLEMENTS}}"{{end}}Note:
SIGN_IDENTITYis already quoted.🔎 Proposed refactor for line 192
- - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements {{.ENTITLEMENTS}}{{end}} --notarize --keychain-profile {{.KEYCHAIN_PROFILE}} + - wails3 tool sign --input "{{.BIN_DIR}}/{{.APP_NAME}}.app" --identity "{{.SIGN_IDENTITY}}" {{if .ENTITLEMENTS}}--entitlements "{{.ENTITLEMENTS}}"{{end}} --notarize --keychain-profile "{{.KEYCHAIN_PROFILE}}"Also applies to: 192-192
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
v3/UNRELEASED_CHANGELOG.mdv3/internal/commands/build_assets/android/Taskfile.ymlv3/internal/commands/build_assets/darwin/Taskfile.ymlv3/internal/commands/build_assets/ios/Taskfile.ymlv3/internal/commands/build_assets/linux/Taskfile.ymlv3/internal/commands/build_assets/windows/Taskfile.yml
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-09-15T11:08:01.900Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-09-15T21:32:51.758Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
📚 Learning: 2024-10-08T22:11:37.054Z
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation.
Applied to files:
v3/internal/commands/build_assets/linux/Taskfile.ymlv3/internal/commands/build_assets/darwin/Taskfile.yml
📚 Learning: 2024-10-08T22:11:37.054Z
Learnt from: leaanthony
Repo: wailsapp/wails PR: 3748
File: v3/internal/templates/_common/Taskfile.tmpl.yml:18-18
Timestamp: 2024-10-08T22:11:37.054Z
Learning: In Taskfile, variables are referenced using `{{ "{{variable}}" }}` without the dot notation to differentiate them from Go template variables.
Applied to files:
v3/internal/commands/build_assets/linux/Taskfile.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Run Go Tests v3 (macos-latest, 1.24)
- GitHub Check: Run Go Tests v3 (windows-latest, 1.24)
- GitHub Check: Run Go Tests v3 (ubuntu-latest, 1.24)
🔇 Additional comments (5)
v3/internal/commands/build_assets/linux/Taskfile.yml (1)
75-75: LGTM!The quoting changes correctly protect path arguments containing spaces in
mv,cp, andwails3commands.Also applies to: 115-116, 152-152, 157-157, 162-162, 169-169
v3/internal/commands/build_assets/windows/Taskfile.yml (1)
44-44: LGTM!The quoting changes correctly handle spaces in
APP_NAMEwhile leaving shell-expanded variables (GO_CACHE_MOUNT,REPLACE_MOUNTS) unquoted as needed.Also applies to: 71-71
v3/internal/commands/build_assets/darwin/Taskfile.yml (1)
68-68: LGTM!The quoting changes correctly protect path arguments while leaving shell-expanded variables unquoted as needed.
Also applies to: 71-71, 141-144, 151-151, 161-165
v3/internal/commands/build_assets/android/Taskfile.yml (1)
128-128: LGTM!The quoting changes correctly handle spaces in file paths for
cpandadb installcommands.Also applies to: 137-137, 205-205, 218-218
v3/internal/commands/build_assets/ios/Taskfile.yml (1)
64-64: LGTM!The comprehensive quoting of path arguments across
rm,mkdir,cp,codesign, andxcruncommands correctly handles spaces inAPP_NAMEand related paths.Also applies to: 78-82, 106-106, 114-114, 136-137, 228-232, 256-260
|
|
There was a bug in macOS, the command |
Gah, thanks for letting us know! I'll update the tests to verify this scenario along with a fix 🙏 |
* fix: improve darwin build commands to accommodate spaces in APP_NAME * fix: improve android build commands to accommodate spaces in APP_NAME * fix: improve ios build commands to accommodate spaces in APP_NAME * fix: improve linux build commands to accommodate spaces in APP_NAME * fix: improve windows build commands to accommodate spaces in APP_NAME * docs: update `v3/UNRELEASED_CHANGELOG.md` * fix(docs): correct changelog * fix: remove quotes around GO_CACHE_MOUNT and REPLACE_MOUNTS --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>



Description
This PR improves the commands in Taskfile.yml files for all operation systems to accommodate spaces in variables such as
APP_NAME.Fixes # (issue)
Type of change
Please select the option that is relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using
wails doctor.If you checked Linux, please specify the distro and version.
Test Configuration
Please paste the output of
wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.Checklist:
website/src/pages/changelog.mdxwith details of this PRSummary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.