I hereby claim:
- I am jonoirwinrsa on github.
- I am jonoirwin (https://keybase.io/jonoirwin) on keybase.
- I have a public key whose fingerprint is 6952 65FA 7712 0F56 C2A8 AEB0 4338 B461 ED31 4BE5
To claim this, I am signing this object:
| { | |
| "Version": "2012-10-17", | |
| "Id": "PersonalizeS3BucketAccessPolicy", | |
| "Statement": [ | |
| { | |
| "Sid": "PersonalizeS3BucketAccessPolicy", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "Service": "personalize.amazonaws.com" | |
| }, |
| FROM node:lts-alpine | |
| # Install Ruby | |
| RUN apk update && apk upgrade && apk --update add \ | |
| git \ | |
| bash \ | |
| curl \ | |
| wget \ | |
| zip \ | |
| unzip \ |
| const { upload } = require('bugsnag-sourcemaps'); | |
| const glob = require('glob'); | |
| const fs = require('fs'); | |
| const appVersion = require('./package.json').version; | |
| const reportBuild = require('bugsnag-build-reporter'); | |
| /** | |
| * Find all of the map files in ./build | |
| */ | |
| function findSourceMaps(callback) { |
| const reportBuild = require('bugsnag-build-reporter'); | |
| /** | |
| * Notifies Bugsnag of the new release | |
| */ | |
| function notifyRelease() { | |
| reportBuild({ | |
| apiKey: process.env.REACT_APP_BUGSNAG_API_KEY, | |
| appVersion, | |
| releaseStage: process.env.REACT_APP_RELEASE_STAGE, |
| /** | |
| * Find, upload and delete Source Maps | |
| */ | |
| function processSourceMaps() { | |
| findSourceMaps((error, files) => | |
| Promise.all(files.map(uploadSourceMap)) | |
| .then(() => { | |
| deleteFiles(files); | |
| notifyRelease(); // Bonus Step | |
| }) |
| const fs = require('fs'); | |
| /** | |
| * Delete the .map files | |
| * We do this to protect our source | |
| * @param files - array of source map files | |
| */ | |
| function deleteFiles(files) { | |
| files.forEach(file => { | |
| const path = `${__dirname}/${file}`; |
| const { upload } = require('bugsnag-sourcemaps'); | |
| const appVersion = require('./package.json').version; | |
| /** | |
| * Uploads the source map with accompanying sources | |
| * @param sourceMap - single .map file | |
| * @returns {Promise<string>} - upload to Bugsnag | |
| */ | |
| function uploadSourceMap(sourceMap) { | |
| // Remove .map from the file to get the js filename |
| const glob = require('glob'); | |
| /** | |
| * Find all of the map files in ./build | |
| */ | |
| function findSourceMaps(callback) { | |
| return glob('build/**/*/*.map', callback); | |
| } |
| Description: > | |
| Script to create a SSL certificate, S3 bucket and Cloudfront distribution. | |
| ############################################################################### | |
| Parameters: | |
| ############################################################################### | |
| DomainName: | |
| Type: String | |
| Description: The domain name. |
I hereby claim:
To claim this, I am signing this object: