|
15 | 15 | // `BucketProperty`: Name of returned property that will contain the bucket name
|
16 | 16 | // `KeyProperty`: Name of returned property that will contain the object key
|
17 | 17 | // `VersionProperty`: (optional) Name of returned property that will contain the object version
|
| 18 | +// `Extension`: (optional) Extension appended to the end of the Object Key in S3 |
18 | 19 | package pkg
|
19 | 20 |
|
20 | 21 | import (
|
@@ -111,7 +112,7 @@ func zipPath(root string) (string, error) {
|
111 | 112 |
|
112 | 113 | // Upload a file or directory to S3.
|
113 | 114 | // If path is a directory, it will be zipped first.
|
114 |
| -func upload(root, path string, force bool) (*s3Path, error) { |
| 115 | +func upload(root, path string, force bool, extension string) (*s3Path, error) { |
115 | 116 | if !filepath.IsAbs(path) {
|
116 | 117 | path = filepath.Join(root, path)
|
117 | 118 | if abs, err := filepath.Abs(path); err == nil {
|
@@ -152,7 +153,7 @@ func upload(root, path string, force bool) (*s3Path, error) {
|
152 | 153 | }
|
153 | 154 |
|
154 | 155 | bucket := s3.RainBucket(false)
|
155 |
| - key, err := s3.Upload(bucket, content) |
| 156 | + key, err := s3.Upload(bucket, content, extension) |
156 | 157 |
|
157 | 158 | uploads[artifactName] = &s3Path{
|
158 | 159 | bucket: bucket,
|
|
0 commit comments