Skip to content
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

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

andreban
Copy link
Member

@andreban andreban commented Feb 3, 2020

  • 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.

Closes #74
Closes #3

- 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.
@andreban andreban requested a review from PEConn February 3, 2020 15:43
Copy link
Collaborator

@PEConn PEConn left a 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.

const previousAppVersionCode = twaManifest.appVersionCode;
const appVersionCode = twaManifest.appVersionCode + 1;

// If a version was passed ar parameter, use it.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/ar/as/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@andreban
Copy link
Member Author

andreban commented Feb 3, 2020

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, twa-manifest.json would be the point that developers interact with the customise the project.

If customising externally, they should probably move to developing in Android Studio.

@andreban andreban added this to the 1.0.0 milestone Feb 3, 2020
@andreban
Copy link
Member Author

andreban commented Feb 4, 2020

Created #97 for a future merge command

@andreban andreban merged commit f19c76e into GoogleChromeLabs:master Feb 4, 2020
@andreban andreban deleted the updatable-builds branch February 13, 2020 08:14
@andreban andreban added the enhancement New feature or request label Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle updating output application versions Updatable Projects
2 participants