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

plugins: pmOS: allow passing in codename #2839

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

amartinz
Copy link
Member

Fallback to default config name, if not set.

This is for example needed for Fairphone 4 (FP4 vs fp4).

/cc @z3ntu

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 83.61% // Head: 83.61% // No change to project coverage 👍

Coverage data is based on head (5c8f959) compared to base (c2a183a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2839   +/-   ##
=======================================
  Coverage   83.61%   83.61%           
=======================================
  Files          31       31           
  Lines        1050     1050           
=======================================
  Hits          878      878           
  Misses        172      172           
Impacted Files Coverage Δ
src/core/plugins/postmarketos/plugin.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@amartinz
Copy link
Member Author

Actually this way user gets a box presented with the codename in it and can modify it.
need to rethink this, sorry.

@z3ntu
Copy link
Contributor

z3ntu commented Sep 16, 2022

I'd do it like this (if it works)

  - name: "postmarketOS"
    codename: "fairphone-fp4"
    compatible_installer: ">=0.9.7-beta"

And this might be available in this.props.os.codename then?

@amartinz
Copy link
Member Author

yes, i think that would be better.

To document my initial thoughts for the future, in case i forget.

#2841

Which allows you to add additional settings for plugins very easily, like:

  - name: "postmarketOS"
    compatible_installer: ">=0.9.7-beta"
    options:
      - var: "codename"
        name: "Codename"
        type: "hidden"
        value: "axolotl"
      - var: "something_important"
        name: "Token or whatever?"
        type: "readonly"
        value: "shjafhjsagfjhasdf"

values would be obtainable like you see in this PR
codename is hidden and not shown at the dialog prompt.
something_important will be shown to user but not editable.

offers more flexibility for plugins but also makes it harder to validate.

but this is also way more verbose and not validated by the schema.

Fallback to default config name, if not set.

This is for example needed for Fairphone 4 (FP4 vs fairphone-fp4).

Change-Id: I81b96ad3a33e531e08c2409dff0807f7fe234408
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
@amartinz
Copy link
Member Author

codename: "fairphone-fp4"

This should now work, i have specified above within the axolotl config and it offerend me different options (edge only, while axolotl has edge and v22.06).

@z3ntu
Copy link
Contributor

z3ntu commented Sep 19, 2022

Seems to work great with ubports/installer-configs#203, thank you!

@amartinz amartinz merged commit 1baa2ee into ubports:master Sep 19, 2022
@amartinz amartinz deleted the pmos-codename branch September 19, 2022 11:29
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.

3 participants