Skip to content

Commit

Permalink
refactor: drop requirement of setting GCLOUD_PROJECT (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Jan 2, 2019
1 parent 1a75a53 commit 9853366
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions asset/snippets/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ async function exportAssets(dumpFilePath) {
});

// Your Google Cloud Platform project ID
const projectId = process.env.GCLOUD_PROJECT;
const projectId = await client.getProjectId();
console.log(projectId);
const projectResource = client.projectPath(projectId);

// var dumpFilePath = 'Dump file path, e.g.: gs://<my_bucket>/<my_asset_file>'
Expand Down Expand Up @@ -55,7 +56,7 @@ async function batchGetAssetsHistory(assetNames) {
});

// Your Google Cloud Platform project ID
const projectId = process.env.GCLOUD_PROJECT;
const projectId = await client.getProjectId();
const projectResource = client.projectPath(projectId);
// Your asset names, such as //storage.googleapis.com/[YOUR_BUCKET_NAME].
// var assetNames = ['ASSET_NAME1', 'ASSET_NAME2', ...];
Expand Down

0 comments on commit 9853366

Please sign in to comment.