aboutsummaryrefslogtreecommitdiffstats
path: root/internal/build
diff options
context:
space:
mode:
authorAlexander van der Meij <alexandervdm@users.noreply.github.com>2019-07-23 20:06:44 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-07-23 20:06:44 +0800
commit57d9c93dcdf8341088abdf322d0f7a2787768ec6 (patch)
tree5e21dadae71943d62b8e0daced9ad899ec082312 /internal/build
parent4f56790efc0da36e3bf20e7194f864f84b72c7e6 (diff)
downloadgo-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.tar
go-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.tar.gz
go-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.tar.bz2
go-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.tar.lz
go-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.tar.xz
go-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.tar.zst
go-tangerine-57d9c93dcdf8341088abdf322d0f7a2787768ec6.zip
vendor, internal/build: fix OpenBSD by bumping Azure libs (#17966)
* bump azure-storage-blob-go dependency to 0.3.0 release * update azure-storage-blob-go module import path * fix multiple return values on azblob.NewSharedKeyCredential * vendor: bump Azure libs to latest from upstream
Diffstat (limited to 'internal/build')
-rw-r--r--internal/build/azure.go20
1 files changed, 16 insertions, 4 deletions
diff --git a/internal/build/azure.go b/internal/build/azure.go
index 086dff2c4..786284265 100644
--- a/internal/build/azure.go
+++ b/internal/build/azure.go
@@ -22,7 +22,7 @@ import (
"net/url"
"os"
- "github.com/Azure/azure-storage-blob-go/2018-03-28/azblob"
+ "github.com/Azure/azure-storage-blob-go/azblob"
)
// AzureBlobstoreConfig is an authentication and configuration struct containing
@@ -45,7 +45,11 @@ func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig)
return nil
}
// Create an authenticated client against the Azure cloud
- credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
+ credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
+ if err != nil {
+ return err
+ }
+
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
@@ -67,7 +71,11 @@ func AzureBlobstoreUpload(path string, name string, config AzureBlobstoreConfig)
// AzureBlobstoreList lists all the files contained within an azure blobstore.
func AzureBlobstoreList(config AzureBlobstoreConfig) ([]azblob.BlobItem, error) {
- credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
+ credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
+ if err != nil {
+ return nil, err
+ }
+
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))
@@ -95,7 +103,11 @@ func AzureBlobstoreDelete(config AzureBlobstoreConfig, blobs []azblob.BlobItem)
return nil
}
// Create an authenticated client against the Azure cloud
- credential := azblob.NewSharedKeyCredential(config.Account, config.Token)
+ credential, err := azblob.NewSharedKeyCredential(config.Account, config.Token)
+ if err != nil {
+ return err
+ }
+
pipeline := azblob.NewPipeline(credential, azblob.PipelineOptions{})
u, _ := url.Parse(fmt.Sprintf("https://%s.blob.core.windows.net", config.Account))