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

Allow version suffix #201

Merged
merged 2 commits into from
Dec 19, 2022
Merged

Allow version suffix #201

merged 2 commits into from
Dec 19, 2022

Conversation

wuan
Copy link
Contributor

@wuan wuan commented Nov 25, 2022

This PR should allow using version like 1.0.2-fdroid in order to separate (future) versions built with different flavours.

In this context we should also solve the version name, which is v1.0.1 for example, but F-Droid usually uses 1.0.1.

The related F-Droid configuration is as follows:

...
  - versionName: 1.0.2-fdroid
    versionCode: 304
...
AutoUpdateMode: Version +-fdroid %v
UpdateCheckMode: Tags
...


Code Review Checklist

  • Description accurately reflects what changes are being made.
  • Description explains why the changes are being made (or references an issue containing one).
  • The PR appropriately sized.
  • New code has enough tests.
  • New code has enough documentation to answer "how do I use it?" and "what does it do?".
  • Existing documentation is up-to-date, if impacted.

blob ?? const String.fromEnvironment("version", defaultValue: "main");
return 'https://github.com/LeastAuthority/destiny/blob/$finalBlob/$path';
final targetBlob = blobOrDefault.split("-").first;
Copy link
Contributor

Choose a reason for hiding this comment

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

To understand..

  1. create tag for release: 1.0.3-fdroid in github
  2. this trigger CI, where we set version: name:
"Set version string for release"
        run: echo DESTINY_VERSION=${{ github.ref_name }} >> $GITHUB_ENV
        if: ${{ github.ref_type == 'tag' }}
  1. CI generates build with link:
    https://github.com/LeastAuthority/destiny/blob/1.0.3/TERMS.md
    instead of https://github.com/LeastAuthority/destiny/blob/1.0.3-fdroid/TERMS.md
    because according logic, we will split string via separator - and take only first part 1.0.3

However in github valid tag is 1.0.3-froid and it means file is available only
https://github.com/LeastAuthority/destiny/blob/1.0.3-fdroid/TERMS.md, not at https://github.com/LeastAuthority/destiny/blob/1.0.3/TERMS.md

In destiny application, when user clicks on Terms link we provide link to exact file of that version, that Terms version would correlate with app version.

Or maybe I misunderstand something..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The format of the tag is not affected by this change. It would just allow using a version name 1.0.3-fdroid and still. be able to use the per version Terms URL.

Copy link
Contributor

Choose a reason for hiding this comment

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

But we are ok as long as we don't create tag 1.0.3-fdroid in github tag for releases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A F-Droid release will be triggered with any tag in the format 1.0.3. That -fdroid just will be appended during the build itself.

@donpui donpui marked this pull request as ready for review December 16, 2022 09:02
Copy link
Contributor

@donpui donpui left a comment

Choose a reason for hiding this comment

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

ok

@donpui donpui merged commit f407a31 into LeastAuthority:main Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants