Skip to content

Commit

Permalink
fix: actually pass down makePublic option
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Oct 8, 2020
1 parent e144100 commit b3e3846
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ ember install ember-cli-deploy-gcloud-storage
- Place the following configuration into `config/deploy.js`

```javascript
ENV["gcloud-storage"] = {
ENV['gcloud-storage'] = {
credentials: {
private_key: "<your-private-key>",
client_email: "<your-client-email>",
private_key: '<your-private-key>',
client_email: '<your-client-email>',
},
projectId: "<your-gcloud-project-id>",
bucket: "<your-storage-bucket>",
projectId: '<your-gcloud-project-id>',
bucket: '<your-storage-bucket>',
};
```

Expand All @@ -47,6 +47,7 @@ ember deploy production
## Configuration

- `credentials` - GCP credentials object, `{ private_key, client_email }`, required (can be specified with GCP envs/config).
- `keyFilename` - Alternative configuration to the `credentials` option. Specify the path to the key file downloaded for service account.
- `projectId` - Your GCP project id, required (can be specified with GCP envs, `GCLOUD_PROJECT=<projectId> ember deploy`).
- `bucket` - A bucket in GCS to store your files, required.
- `bucketFolder` - A folder inside the bucket to place your files, optional.
Expand Down
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,21 @@ module.exports = {
var gzippedFiles = this.readConfig('gzippedFiles');
var filePattern = this.readConfig('filePattern');
var metadata = this.readConfig('metadata');
var makePublic = this.readConfig('makePublic');
var filesToUpload = distFiles.filter(
minimatch.filter(filePattern, { matchBase: true })
);

this.log('uploading..');

var config = {
bucket: bucket,
bucketFolder: bucketFolder,
bucket,
bucketFolder,
fileBase: context.distDir,
filePaths: filesToUpload,
gzippedFilePaths: gzippedFiles,
metadata: metadata,
metadata,
makePublic,
gcloud: {},
};

Expand All @@ -67,7 +69,7 @@ module.exports = {
self.log('uploaded ' + filesUploaded.length + ' files ok', {
verbose: true,
});
return { filesUploaded: filesUploaded };
return { filesUploaded };
})
.catch(this._errorMessage.bind(this));
},
Expand Down

0 comments on commit b3e3846

Please sign in to comment.