webpack-plugin-release-manager

1.0.1 • Public • Published

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'
  }
})

Package Sidebar

Install

npm i webpack-plugin-release-manager

Weekly Downloads

1

Version

1.0.1

License

ISC

Last publish

Collaborators

  • k41n