@@ -26,7 +26,7 @@ Available commands are:
2626 install [ -arch architecture ] [ -cc compiler ] [ packages... ] -- builds packages and executables
2727 test [ -coverage ] [ packages... ] -- runs the tests
2828 lint -- runs certain pre-selected linters
29- archive [ -arch architecture ] [ -type zip|tar ] [ -signer key-envvar ] [ -upload dest ] -- archives build artifacts
29+ archive [ -arch architecture ] [ -type zip|tar ] [ -signer key-envvar ] [ -signify key-envvar ] [ - upload dest ] -- archives build artifacts
3030 importkeys -- imports signing keys from env
3131 debsrc [ -signer key-id ] [ -upload dest ] -- creates a debian source package
3232 nsis -- creates a Windows NSIS installer
@@ -58,6 +58,7 @@ import (
5858 "time"
5959
6060 "github.com/cespare/cp"
61+ signifyPkg "github.com/ethereum/go-ethereum/crypto/signify"
6162 "github.com/ethereum/go-ethereum/internal/build"
6263 "github.com/ethereum/go-ethereum/params"
6364)
@@ -396,11 +397,12 @@ func downloadLinter(cachedir string) string {
396397// Release Packaging
397398func doArchive (cmdline []string ) {
398399 var (
399- arch = flag .String ("arch" , runtime .GOARCH , "Architecture cross packaging" )
400- atype = flag .String ("type" , "zip" , "Type of archive to write (zip|tar)" )
401- signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. LINUX_SIGNING_KEY)` )
402- upload = flag .String ("upload" , "" , `Destination to upload the archives (usually "gethstore/builds")` )
403- ext string
400+ arch = flag .String ("arch" , runtime .GOARCH , "Architecture cross packaging" )
401+ atype = flag .String ("type" , "zip" , "Type of archive to write (zip|tar)" )
402+ signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. LINUX_SIGNING_KEY)` )
403+ signify = flag .String ("signify" , "" , `Environment variable holding the signify key (e.g. LINUX_SIGNIFY_KEY)` )
404+ upload = flag .String ("upload" , "" , `Destination to upload the archives (usually "gethstore/builds")` )
405+ ext string
404406 )
405407 flag .CommandLine .Parse (cmdline )
406408 switch * atype {
@@ -427,7 +429,7 @@ func doArchive(cmdline []string) {
427429 log .Fatal (err )
428430 }
429431 for _ , archive := range []string {geth , alltools } {
430- if err := archiveUpload (archive , * upload , * signer ); err != nil {
432+ if err := archiveUpload (archive , * upload , * signer , * signify ); err != nil {
431433 log .Fatal (err )
432434 }
433435 }
@@ -447,14 +449,20 @@ func archiveBasename(arch string, archiveVersion string) string {
447449 return platform + "-" + archiveVersion
448450}
449451
450- func archiveUpload (archive string , blobstore string , signer string ) error {
452+ func archiveUpload (archive string , blobstore string , signer string , signify string ) error {
451453 // If signing was requested, generate the signature files
452454 if signer != "" {
453455 key := getenvBase64 (signer )
454456 if err := build .PGPSignFile (archive , archive + ".asc" , string (key )); err != nil {
455457 return err
456458 }
457459 }
460+ if signify != "" {
461+ key := getenvBase64 (string (signify ))
462+ if err := signifyPkg .SignifySignFile (archive , archive + ".sig" , string (key ), "verify with geth.pub" , fmt .Sprintf ("%d" , time .Now ().UTC ().Unix ())); err != nil {
463+ return err
464+ }
465+ }
458466 // If uploading to Azure was requested, push the archive possibly with its signature
459467 if blobstore != "" {
460468 auth := build.AzureBlobstoreConfig {
@@ -470,6 +478,11 @@ func archiveUpload(archive string, blobstore string, signer string) error {
470478 return err
471479 }
472480 }
481+ if signify != "" {
482+ if err := build .AzureBlobstoreUpload (archive + ".sig" , filepath .Base (archive + ".sig" ), auth ); err != nil {
483+ return err
484+ }
485+ }
473486 }
474487 return nil
475488}
@@ -806,6 +819,7 @@ func doWindowsInstaller(cmdline []string) {
806819 var (
807820 arch = flag .String ("arch" , runtime .GOARCH , "Architecture for cross build packaging" )
808821 signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. WINDOWS_SIGNING_KEY)` )
822+ signify = flag .String ("signify key" , "" , `Environment variable holding the signify signing key (e.g. WINDOWS_SIGNIFY_KEY)` )
809823 upload = flag .String ("upload" , "" , `Destination to upload the archives (usually "gethstore/builds")` )
810824 workdir = flag .String ("workdir" , "" , `Output directory for packages (uses temp dir if unset)` )
811825 )
@@ -867,7 +881,7 @@ func doWindowsInstaller(cmdline []string) {
867881 filepath .Join (* workdir , "geth.nsi" ),
868882 )
869883 // Sign and publish installer.
870- if err := archiveUpload (installer , * upload , * signer ); err != nil {
884+ if err := archiveUpload (installer , * upload , * signer , * signify ); err != nil {
871885 log .Fatal (err )
872886 }
873887}
@@ -876,10 +890,11 @@ func doWindowsInstaller(cmdline []string) {
876890
877891func doAndroidArchive (cmdline []string ) {
878892 var (
879- local = flag .Bool ("local" , false , `Flag whether we're only doing a local build (skip Maven artifacts)` )
880- signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. ANDROID_SIGNING_KEY)` )
881- deploy = flag .String ("deploy" , "" , `Destination to deploy the archive (usually "https://oss.sonatype.org")` )
882- upload = flag .String ("upload" , "" , `Destination to upload the archive (usually "gethstore/builds")` )
893+ local = flag .Bool ("local" , false , `Flag whether we're only doing a local build (skip Maven artifacts)` )
894+ signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. ANDROID_SIGNING_KEY)` )
895+ signify = flag .String ("signify" , "" , `Environment variable holding the signify signing key (e.g. ANDROID_SIGNIFY_KEY)` )
896+ deploy = flag .String ("deploy" , "" , `Destination to deploy the archive (usually "https://oss.sonatype.org")` )
897+ upload = flag .String ("upload" , "" , `Destination to upload the archive (usually "gethstore/builds")` )
883898 )
884899 flag .CommandLine .Parse (cmdline )
885900 env := build .Env ()
@@ -908,7 +923,7 @@ func doAndroidArchive(cmdline []string) {
908923 archive := "geth-" + archiveBasename ("android" , params .ArchiveVersion (env .Commit )) + ".aar"
909924 os .Rename ("geth.aar" , archive )
910925
911- if err := archiveUpload (archive , * upload , * signer ); err != nil {
926+ if err := archiveUpload (archive , * upload , * signer , * signify ); err != nil {
912927 log .Fatal (err )
913928 }
914929 // Sign and upload all the artifacts to Maven Central
@@ -1001,10 +1016,11 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
10011016
10021017func doXCodeFramework (cmdline []string ) {
10031018 var (
1004- local = flag .Bool ("local" , false , `Flag whether we're only doing a local build (skip Maven artifacts)` )
1005- signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. IOS_SIGNING_KEY)` )
1006- deploy = flag .String ("deploy" , "" , `Destination to deploy the archive (usually "trunk")` )
1007- upload = flag .String ("upload" , "" , `Destination to upload the archives (usually "gethstore/builds")` )
1019+ local = flag .Bool ("local" , false , `Flag whether we're only doing a local build (skip Maven artifacts)` )
1020+ signer = flag .String ("signer" , "" , `Environment variable holding the signing key (e.g. IOS_SIGNING_KEY)` )
1021+ signify = flag .String ("signify" , "" , `Environment variable holding the signify signing key (e.g. IOS_SIGNIFY_KEY)` )
1022+ deploy = flag .String ("deploy" , "" , `Destination to deploy the archive (usually "trunk")` )
1023+ upload = flag .String ("upload" , "" , `Destination to upload the archives (usually "gethstore/builds")` )
10081024 )
10091025 flag .CommandLine .Parse (cmdline )
10101026 env := build .Env ()
@@ -1032,7 +1048,7 @@ func doXCodeFramework(cmdline []string) {
10321048 maybeSkipArchive (env )
10331049
10341050 // Sign and upload the framework to Azure
1035- if err := archiveUpload (archive + ".tar.gz" , * upload , * signer ); err != nil {
1051+ if err := archiveUpload (archive + ".tar.gz" , * upload , * signer , * signify ); err != nil {
10361052 log .Fatal (err )
10371053 }
10381054 // Prepare and upload a PodSpec to CocoaPods
0 commit comments