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

Add "key-name" argument to release Android package #205

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/command/android.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (cmd *android) Parse(args []string) error {
flagSet.StringVar(&flags.Keystore, "keystore", "", "The location of .keystore file containing signing information")
flagSet.StringVar(&flags.KeystorePass, "keystore-pass", "", "Password for the .keystore file")
flagSet.StringVar(&flags.KeyPass, "key-pass", "", "Password for the signer's private key, which is needed if the private key is password-protected")
flagSet.StringVar(&flags.KeyName, "key-name", "", "Name of the key to use for signing")

flagSet.Usage = cmd.Usage
flagSet.Parse(args)
Expand Down Expand Up @@ -147,6 +148,7 @@ type androidFlags struct {
Keystore string //Keystore represents the location of .keystore file containing signing information
KeystorePass string //Password for the .keystore file
KeyPass string //Password for the signer's private key, which is needed if the private key is password-protected
KeyName string //Name of the key to use for signing

// TargetArch represents a list of target architecture to build on separated by comma
TargetArch *targetArchFlag
Expand Down Expand Up @@ -196,6 +198,7 @@ func (cmd *android) setupContainerImages(flags *androidFlags, args []string) err
cmd.defaultContext.Keystore = volume.JoinPathContainer(cmd.defaultContext.Volume.WorkDirContainer(), flags.Keystore)
cmd.defaultContext.KeystorePass = flags.KeystorePass
cmd.defaultContext.KeyPass = flags.KeyPass
cmd.defaultContext.KeyName = flags.KeyName

cmd.Images = append(cmd.Images, image)
}
Expand Down
3 changes: 3 additions & 0 deletions internal/command/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ func fyneRelease(ctx Context, image containerImage) error {
if ctx.KeyPass != "" {
args = append(args, "-keyPass", ctx.KeyPass)
}
if ctx.KeyName != "" {
args = append(args, "-keyName", ctx.KeyName)
}
case iosOS:
if ctx.Certificate != "" {
args = append(args, "-certificate", ctx.Certificate)
Expand Down
1 change: 1 addition & 0 deletions internal/command/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ type Context struct {
Keystore string //Keystore represents the location of .keystore file containing signing information [Android]
KeystorePass string //KeystorePass represents the password for the .keystore file [Android]
KeyPass string //KeyPass represents the assword for the signer's private key, which is needed if the private key is password-protected [Android]
KeyName string //KeyName represents the name of the key to sign the build [Android]
Password string //Password represents the password for the certificate used to sign the build [Windows]
Profile string //Profile represents the name of the provisioning profile for this release build [iOS]
}
Expand Down
Loading