Skip to content

Commit

Permalink
internal/relui/sign: add binary artifact signing modes
Browse files Browse the repository at this point in the history
For golang/vscode-go#3186

Change-Id: I684e222cc018b18ad0c173522dfd70cb3b34e0ca
Reviewed-on: https://go-review.googlesource.com/c/build/+/571575
Reviewed-by: Dmitri Shuralyov <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Hyang-Ah Hana Kim <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Carlos Amedee <[email protected]>
  • Loading branch information
hyangah authored and gopherbot committed Apr 5, 2024
1 parent a8b77d5 commit 914cd3b
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 65 deletions.
115 changes: 63 additions & 52 deletions internal/relui/protos/relui.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions internal/relui/protos/relui.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ message SignArtifactRequest {

BUILD_TYPE_MACOS_CONSTRUCT_INSTALLER_ONLY = 4;
BUILD_TYPE_WINDOWS_CONSTRUCT_INSTALLER_ONLY = 5;

// Sign individual binary application artifacts.
// The signing server expects zipped application bundles and signs the files in them.
BUILD_TYPE_MACOS_BINARY = 6;
BUILD_TYPE_WINDOWS_BINARY = 7;
}
BuildType build_type = 1;

Expand Down
14 changes: 1 addition & 13 deletions internal/relui/protos/relui_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions internal/relui/sign/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ const (

BuildMacOSConstructInstallerOnly
BuildWindowsConstructInstallerOnly

BuildMacOSBinary
BuildWindowsBinary
)

// proto is the corresponding protobuf definition for the signing request build type.
Expand All @@ -81,6 +84,10 @@ func (bt BuildType) proto() protos.SignArtifactRequest_BuildType {
return protos.SignArtifactRequest_BUILD_TYPE_MACOS_CONSTRUCT_INSTALLER_ONLY
case BuildWindowsConstructInstallerOnly:
return protos.SignArtifactRequest_BUILD_TYPE_WINDOWS_CONSTRUCT_INSTALLER_ONLY
case BuildMacOSBinary:
return protos.SignArtifactRequest_BUILD_TYPE_MACOS_BINARY
case BuildWindowsBinary:
return protos.SignArtifactRequest_BUILD_TYPE_WINDOWS_BINARY
default:
return protos.SignArtifactRequest_BUILD_TYPE_UNSPECIFIED
}
Expand All @@ -98,6 +105,10 @@ func (bt BuildType) String() string {
return "macOS (construct installer only)"
case BuildWindowsConstructInstallerOnly:
return "Windows (construct installer only)"
case BuildMacOSBinary:
return "macOS (binary)"
case BuildWindowsBinary:
return "Windows (binary)"
default:
return "unspecified"
}
Expand Down

0 comments on commit 914cd3b

Please sign in to comment.