|
29 | 29 | cacheable = flag.Bool("cacheable", true, "object should be cacheable") |
30 | 30 | file = flag.String("file", "", "read object from `file` ('-' for stdin)") |
31 | 31 | verbose = flag.Bool("verbose", false, "verbose logging") |
32 | | - project = flag.String("project", "", "GCE Project. If blank, it's automatically inferred from the bucket name for the common Go buckets.") |
| 32 | + project = flag.String("project", "", "GCP Project. If blank, it's automatically inferred from the bucket name for the common Go buckets.") |
33 | 33 | doGzip = flag.Bool("gzip", false, "gzip the stored contents (not the upload's Content-Encoding); this forces the Content-Type to be application/octet-stream. To prevent misuse, the object name must also end in '.gz'") |
34 | 34 | extraEnv = flag.String("env", "", "comma-separated list of addition KEY=val environment pairs to include in build environment when building a target to upload") |
35 | 35 | ) |
@@ -60,7 +60,7 @@ func main() { |
60 | 60 |
|
61 | 61 | proj := *project |
62 | 62 | if proj == "" { |
63 | | - proj, _ = bucketProject[bucket] |
| 63 | + proj = bucketProject[bucket] |
64 | 64 | if proj == "" { |
65 | 65 | log.Fatalf("bucket %q doesn't have an associated project in upload.go", bucket) |
66 | 66 | } |
@@ -138,15 +138,12 @@ func main() { |
138 | 138 | } |
139 | 139 | } |
140 | 140 |
|
| 141 | +// bucketProject is a map from bucket name to its Google Cloud Platform project ID. |
141 | 142 | var bucketProject = map[string]string{ |
142 | | - "dev-gccgo-builder-data": "gccgo-dashboard-dev", |
143 | | - "dev-go-builder-data": "go-dashboard-dev", |
144 | | - "gccgo-builder-data": "gccgo-dashboard-builders", |
145 | | - "go-builder-data": "symbolic-datum-552", |
146 | | - "go-build-log": "symbolic-datum-552", |
147 | | - "http2-demo-server-tls": "symbolic-datum-552", |
148 | | - "gobuilder": "999119582588", // deprecated |
149 | | - "golang": "999119582588", |
| 143 | + "dev-go-builder-data": "go-dashboard-dev", |
| 144 | + "go-builder-data": "symbolic-datum-552", |
| 145 | + "go-build-log": "symbolic-datum-552", |
| 146 | + "golang": "999119582588", |
150 | 147 | } |
151 | 148 |
|
152 | 149 | // alreadyUploaded reports whether *file has already been uploaded and the correct contents |
|
0 commit comments