Skip to content

Commit

Permalink
Merge pull request #205 from metal3d/fix-keyname
Browse files Browse the repository at this point in the history
Add "key-name" argument to release Android package
  • Loading branch information
Bluebugs authored Aug 30, 2023
2 parents da6f9a0 + c2e1901 commit aac9d4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
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

0 comments on commit aac9d4e

Please sign in to comment.