@@ -26,7 +26,7 @@ Available commands are:
26
26
install [ -arch architecture ] [ -cc compiler ] [ packages... ] -- builds packages and executables
27
27
test [ -coverage ] [ packages... ] -- runs the tests
28
28
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
30
30
importkeys -- imports signing keys from env
31
31
debsrc [ -signer key-id ] [ -upload dest ] -- creates a debian source package
32
32
nsis -- creates a Windows NSIS installer
@@ -58,6 +58,7 @@ import (
58
58
"time"
59
59
60
60
"github.com/cespare/cp"
61
+ signifyPkg "github.com/ethereum/go-ethereum/crypto/signify"
61
62
"github.com/ethereum/go-ethereum/internal/build"
62
63
"github.com/ethereum/go-ethereum/params"
63
64
)
@@ -396,11 +397,12 @@ func downloadLinter(cachedir string) string {
396
397
// Release Packaging
397
398
func doArchive (cmdline []string ) {
398
399
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
404
406
)
405
407
flag .CommandLine .Parse (cmdline )
406
408
switch * atype {
@@ -427,7 +429,7 @@ func doArchive(cmdline []string) {
427
429
log .Fatal (err )
428
430
}
429
431
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 {
431
433
log .Fatal (err )
432
434
}
433
435
}
@@ -447,14 +449,20 @@ func archiveBasename(arch string, archiveVersion string) string {
447
449
return platform + "-" + archiveVersion
448
450
}
449
451
450
- func archiveUpload (archive string , blobstore string , signer string ) error {
452
+ func archiveUpload (archive string , blobstore string , signer string , signify string ) error {
451
453
// If signing was requested, generate the signature files
452
454
if signer != "" {
453
455
key := getenvBase64 (signer )
454
456
if err := build .PGPSignFile (archive , archive + ".asc" , string (key )); err != nil {
455
457
return err
456
458
}
457
459
}
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
+ }
458
466
// If uploading to Azure was requested, push the archive possibly with its signature
459
467
if blobstore != "" {
460
468
auth := build.AzureBlobstoreConfig {
@@ -470,6 +478,11 @@ func archiveUpload(archive string, blobstore string, signer string) error {
470
478
return err
471
479
}
472
480
}
481
+ if signify != "" {
482
+ if err := build .AzureBlobstoreUpload (archive + ".sig" , filepath .Base (archive + ".sig" ), auth ); err != nil {
483
+ return err
484
+ }
485
+ }
473
486
}
474
487
return nil
475
488
}
@@ -806,6 +819,7 @@ func doWindowsInstaller(cmdline []string) {
806
819
var (
807
820
arch = flag .String ("arch" , runtime .GOARCH , "Architecture for cross build packaging" )
808
821
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)` )
809
823
upload = flag .String ("upload" , "" , `Destination to upload the archives (usually "gethstore/builds")` )
810
824
workdir = flag .String ("workdir" , "" , `Output directory for packages (uses temp dir if unset)` )
811
825
)
@@ -867,7 +881,7 @@ func doWindowsInstaller(cmdline []string) {
867
881
filepath .Join (* workdir , "geth.nsi" ),
868
882
)
869
883
// Sign and publish installer.
870
- if err := archiveUpload (installer , * upload , * signer ); err != nil {
884
+ if err := archiveUpload (installer , * upload , * signer , * signify ); err != nil {
871
885
log .Fatal (err )
872
886
}
873
887
}
@@ -876,10 +890,11 @@ func doWindowsInstaller(cmdline []string) {
876
890
877
891
func doAndroidArchive (cmdline []string ) {
878
892
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")` )
883
898
)
884
899
flag .CommandLine .Parse (cmdline )
885
900
env := build .Env ()
@@ -908,7 +923,7 @@ func doAndroidArchive(cmdline []string) {
908
923
archive := "geth-" + archiveBasename ("android" , params .ArchiveVersion (env .Commit )) + ".aar"
909
924
os .Rename ("geth.aar" , archive )
910
925
911
- if err := archiveUpload (archive , * upload , * signer ); err != nil {
926
+ if err := archiveUpload (archive , * upload , * signer , * signify ); err != nil {
912
927
log .Fatal (err )
913
928
}
914
929
// Sign and upload all the artifacts to Maven Central
@@ -1001,10 +1016,11 @@ func newMavenMetadata(env build.Environment) mavenMetadata {
1001
1016
1002
1017
func doXCodeFramework (cmdline []string ) {
1003
1018
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")` )
1008
1024
)
1009
1025
flag .CommandLine .Parse (cmdline )
1010
1026
env := build .Env ()
@@ -1032,7 +1048,7 @@ func doXCodeFramework(cmdline []string) {
1032
1048
maybeSkipArchive (env )
1033
1049
1034
1050
// 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 {
1036
1052
log .Fatal (err )
1037
1053
}
1038
1054
// Prepare and upload a PodSpec to CocoaPods
0 commit comments