1.0.1 • Published 7 years ago

webpack-plugin-release-manager v1.0.1

Weekly downloads
72
License
ISC
Repository
github
Last release
7 years ago

Webpack plugin for release management

Requirements

  1. Ability to upload files to S3 (done)
  2. For given file regexps it should be able to create copies with names given in options (done)
  3. It should be able to send notifications to given URLs with given method and parameters from options
  4. It should be able to parse release notes from README.md and submit them to hooks

Install and run

  1. Install package yarn add webpack-plugin-release-manager
  2. Configure it in your webpack config:
new ReleaseManager({
  hooks : [
    {
      url:    'https://hooks.slack.com/services/TXXXXXXX/BXXXXXXXX/xxxxxxxxxxxxx',
      method: 'POST',
      body: {
        text: "New release of awesome app: \n${releaseNotes}"
      }
    }
  ],
  s3: {
    accessKeyId: s3Config.key,
    secretAccessKey: s3Config.secret,
    region: s3Config.region,
    bucket: s3Config.bucket,
    basePath: 'staging/',
    copy: [
      {
        test: /bundle-stateful-[a-f0-9]{20}\.js$/,
        uploadAs: 'bundle-stateful-stable.js'
      },
      {
        test: /bundle-stateful-[a-f0-9]{20}\.js.gz$/,
        uploadAs: 'bundle-stateful-stable.js.gz'
      },
    ]
  },
  releaseNotes: {
    file: './RELEASE-NOTES.md',
    separator: /==[^=]*/g,
    order: 'downward'
  }
})