-
Notifications
You must be signed in to change notification settings - Fork 152
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
update
upgrades versionCode
and versionName
#96
Conversation
- Renamed `appVersion` to `appVersionName` on `TwaManifest`. - Added `appVersionCode` to `TwaManifest. - Updated the template project to use `appVersionName` and `appVersionCode` from the TWA Manifest. - Added new option `skipVersinUpgrade` to `update`, to regenerate project without updating versions. - Added new option `appVersionName` to set a specific version name when updating the project - `update` generates new versions by increasing `appVersionCode` by 1. When generating a new `appVersionName`, the value of `--appVersionName` is used if set. Otherwise, an attempt to generate it from the `appVersionCode` is made. If not possible, the user is prompted to input a version name.
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.
So, if I understand correctly, the model here is that developers will create their TWA with llama-pack and then occasionally run update to create a new one with any features we may have added to the template project?
What about a developer who wants to change their TWA? Such as using a better icon or fixing a typo in their app name?
I'm wondering if the versions that llama-pack
should have as a default should be something like 10, 20, 30, 40, which would allow developers to push a few updates and then the next time we add a feature, everything will play nicely.
src/cli/cmds/update.ts
Outdated
const previousAppVersionCode = twaManifest.appVersionCode; | ||
const appVersionCode = twaManifest.appVersionCode + 1; | ||
|
||
// If a version was passed ar parameter, use it. |
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.
nit: s/ar/as/
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.
fixed.
That's a good question. For developers who are modifying the project outside llama-pack, it becomes really hard for us to understand what has changed and update the project accordingly. Ideally, If customising externally, they should probably move to developing in Android Studio. |
Created #97 for a future merge command |
appVersion
toappVersionName
onTwaManifest
.appVersionCode
to `TwaManifest.appVersionName
andappVersionCode
from the TWA Manifest.skipVersinUpgrade
toupdate
, to regenerateproject without updating versions.
appVersionName
to set a specific version namewhen updating the project
update
generates new versions by increasingappVersionCode
by 1. When generating a new
appVersionName
, the value of--appVersionName
is used if set. Otherwise, an attempt togenerate it from the
appVersionCode
is made. If not possible,the user is prompted to input a version name.
Closes #74
Closes #3