Skip to content

Commit

Permalink
fixes #12, update s3 config step
Browse files Browse the repository at this point in the history
  • Loading branch information
Dabit committed Nov 11, 2019
1 parent 3f8a7d9 commit e68862b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions updateS3config.js
Expand Up @@ -7,12 +7,13 @@ function configureBucket() {
if (err) {
throw err
}
const fileInfo = JSON.stringify(data)
const fileInfo = JSON.stringify(data)
const id = uuid()
const bucketName = `jamstack-cms-${id}`
const updatedInfo = fileInfo.replace("jamstack-cms", bucketName)
const infoSplit = fileInfo.split(',')
infoSplit[0] = `"{\\n \\"bucketName\\": \\"${bucketName}\\"`
const updatedInfo = infoSplit.join(',')
const newJson = JSON.parse(updatedInfo)

fs.writeFile('./amplify/backend/storage/jamstackcms/parameters.json', newJson, 'utf8', function(err) {
if (err) {
throw err
Expand Down

0 comments on commit e68862b

Please sign in to comment.