-
Notifications
You must be signed in to change notification settings - Fork 14
Workaround: Fix Android version not being set in CI/CD builds #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,6 +126,22 @@ jobs: | |
| echo "password=$ANDROID_KEY_PASSWORD" >> keystore.properties | ||
| echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties | ||
|
|
||
| - name: Generate tauri.properties (Workaround for Tauri 2.9.x bug) | ||
| run: | | ||
| # Workaround for Tauri 2.9.x not generating tauri.properties correctly | ||
| # See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER | ||
| VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json) | ||
| VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json) | ||
|
|
||
| mkdir -p frontend/src-tauri/gen/android/app | ||
| cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF | ||
| // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
| tauri.android.versionName=$VERSION | ||
| tauri.android.versionCode=$VERSION_CODE | ||
| EOF | ||
|
|
||
| echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE" | ||
|
Comment on lines
+129
to
+143
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Java properties file comment syntax. Java .properties files use Apply this diff to fix the comment syntax: mkdir -p frontend/src-tauri/gen/android/app
cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
- // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
tauri.android.versionName=$VERSION
tauri.android.versionCode=$VERSION_CODE
EOFAlso, replace the placeholder issue reference on line 132 with the actual Tauri issue number once available. 🤖 Prompt for AI Agents |
||
|
|
||
| - name: Build Tauri Android App (Signed Release) | ||
| working-directory: ./frontend | ||
| run: | | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -222,6 +222,22 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "password=$ANDROID_KEY_PASSWORD" >> keystore.properties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Generate tauri.properties (Workaround for Tauri 2.9.x bug) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Workaround for Tauri 2.9.x not generating tauri.properties correctly | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p frontend/src-tauri/gen/android/app | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. syntax: Java Properties files use
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: .github/workflows/release.yml
Line: 234:234
Comment:
**syntax:** Java Properties files use `#` for comments, not `//`. Should be:
```suggestion
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tauri.android.versionName=$VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tauri.android.versionCode=$VERSION_CODE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+225
to
+239
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix Java properties file comment syntax (same issue as android-build.yml). Java .properties files use Apply this diff to fix the comment syntax: mkdir -p frontend/src-tauri/gen/android/app
cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF
- // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
tauri.android.versionName=$VERSION
tauri.android.versionCode=$VERSION_CODE
EOFAlso, replace the placeholder issue reference on line 228 with the actual Tauri issue number. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - name: Build Tauri Android App (Signed Release) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| working-directory: ./frontend | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Java Properties files use
#for comments, not//. Should be:Prompt To Fix With AI