Skip to content

Commit

Permalink
WIP migrating actual code
Browse files Browse the repository at this point in the history
  • Loading branch information
tstibbs committed Jan 14, 2025
1 parent 5208fc9 commit c698006
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 11 additions & 13 deletions backend/tools/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ if (args.length < 1) {
const sourcesToUpload = args

async function getOutputs(stackName) {
let response = await cloudformation
.describeStacks({
StackName: stackName
})
.promise()
let response = await cloudformation.describeStacks({
StackName: stackName
})

assert.equal(response.Stacks.length, 1)
let outputs = Object.fromEntries(response.Stacks[0].Outputs.map(output => [output.OutputKey, output.OutputValue]))
return outputs
Expand All @@ -45,14 +44,13 @@ async function upload(prefix, fileName, body, contentType) {
key = fileName
}
console.log(`Uploading ${key}`)
let uploadResponse = await s3
.upload({
Bucket: bucketName,
Key: key,
Body: body,
ContentType: contentType
})
.promise()
let uploadResponse = await s3.upload({
Bucket: bucketName,
Key: key,
Body: body,
ContentType: contentType
})

assert.notEqual(uploadResponse.Location, null)
assert.notEqual(uploadResponse.Location, undefined)
}
Expand Down

0 comments on commit c698006

Please sign in to comment.