-
Notifications
You must be signed in to change notification settings - Fork 10
feat: bundling the public key in the artifact for android #44
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
feat: bundling the public key in the artifact for android #44
Conversation
def base64EncodedKey = Base64.getEncoder().encode(publicKeyFile.readBytes()); | ||
content += 'patch_public_key: ' + new String(base64EncodedKey) + '\n'; | ||
} |
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.
I think the public key just ends up as a flutter asset? Or is the idea to include the content of the key in the shorebird.yaml itself?
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.
The later, to include the key (as base64) into the "final" shorebird.yaml
Discussed in person, we're going to change this to expect an environment variable to have the key that we then just set in this shorebird.yaml. e.g. essentially: patch_public_key: $SHOREBIRD_PATCH_KEY |
We will then also have to change |
@@ -28,7 +28,6 @@ import org.gradle.api.tasks.Optional | |||
import org.gradle.api.tasks.TaskAction | |||
import org.gradle.api.tasks.bundling.Jar | |||
import org.gradle.internal.os.OperatingSystem | |||
import org.gradle.util.VersionNumber |
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.
Was unused
Adds logic to bundle a public key in the binary. Which afterwards can be used in the updater to validate patch signatures.
In this first POC we discussed to make the flow very simple. If there is a
public.pem
file in the root of the flutter project. It will be added, encoded in base64 into the "internal"shorebird.yaml
.iOS change will follow.