2.2.2 • Published 1 year ago

@0x-jerry/x-release v2.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

X-Release

A tool that helps you to create a new release quickly.

Install

pnpm i @0x-jerry/x-release -D
# or
pnpm i @0x-jerry/x-release -g

Usage

Usage:
  $ x-release [new-version]

Commands:
  [new-version]  the tasks to run.

Example:

- x-release --patch
- x-release 0.0.1
- x-release 0.1.1 --publish false


For more info, run any command with the `--help` flag:
  $ x-release --help

Options:
  --patch                auto-increment patch version number
  --minor                auto-increment minor version number
  --major                auto-increment major version number
  --prepatch             auto-increment prepatch version number
  --preminor             auto-increment preminor version number
  --premajor             auto-increment premajor version number
  --prerelease           auto-increment prerelease version number
  --publish              run npm publish, default is true
  --tag <tag-tpl>        new tag format, default is: "v${version}"
  --commit <commit-tpl>  the commit message template, default is: "chore: release v${version}"
  -h, --help             Display this message
  -v, --version          Display version number

Configuration

Config file: release.conf.ts

Example config file:

import { defineConfig } from '@0x-jerry/x-release'

export default defineConfig({
  /**
   * run npm publish, default true
   */
  publish: true,
  /**
   * tag template
   */
  tag: '${prefix}v${version}',
  /**
   * commit template
   */
  commit: 'chore: release ${prefix}v${version}',
  /**
   * run tasks after bump version
   */
  tasks: [
    'npm test', // run npm test
    async (ctx) => {
      console.log('new version is:', ctx.nextVersion)

      await ctx.run(`echo "custom script, all tasks are finished!"`)
    },
  ],
})

Package.json release

{
  "release": {
    "publish": true,
    "tag": "${prefix}v${version}",
    "commit": "chore: release ${prefix}v${version}",
    "tasks": [
      "npm run test",
      "echo 'run custom script after bump version'",
      "echo 'this should be the last script'"
    ]
  }
}
2.2.2

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.4.0

2 years ago

0.3.9

2 years ago

0.3.8

2 years ago

0.3.4-0

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago