Skip to content

Commit 6a959a8

Browse files
committed
feat: add --scoped-tag and open git release url
1 parent 4c33cf1 commit 6a959a8

10 files changed

Lines changed: 325 additions & 110 deletions

File tree

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,45 @@ yarn add @tomjs/release-cli -D
3232
# npm
3333
npm add @tomjs/release-cli -D
3434
```
35+
36+
## Usage
37+
38+
```bash
39+
$ rc --help
40+
41+
A CLI tool to automatically publish npm packages.
42+
43+
Usage
44+
$ rc [type] [options]
45+
46+
Type can be:
47+
patch | minor | major | prepatch | preminor | premajor | prerelease
48+
49+
Options
50+
--cwd <cwd> The current working directory (default: ".")
51+
--preid Specify the pre-release identifier, allowed values are "", "alpha", "beta", "rc".
52+
If type is "prerelease", "prepatch", "preminor", "premajor",
53+
the preid will be used as the pre-release identifier (default: "alpha").
54+
If type is "patch", "minor", "major", the preid will be ignored.
55+
--any-branch Allow publishing from any branch (default: false)
56+
--branch Name of the release branch (default: main | master)
57+
--tag <tag> Publish under a given dist-tag (default: "latest")
58+
--scoped-tag Use scoped package name as git tag (default: false)
59+
--no-log Skips generating changelog
60+
--log-full Generate a full changelog and replace the existing content (default: false)
61+
--no-log-commit Don't add git commit SHA and link to the changelog
62+
--no-log-compare Don't add git compare link to the changelog
63+
--git-url Specify the git web url. If not specified, the configuration of git or package.json will be read,
64+
such as "https://github.com/tomjs/release-cli"
65+
--git-commit-url Git commit url template, default: "{url}/commit/{sha}"
66+
--git-compare-url Git compare url template, default: "{url}/compare/{diff}"
67+
--strict Strict mode, will make some checks more strict (default: false)
68+
--no-publish Skips publishing
69+
--tag-one When publishing multiple packages, only one git tag and commit (default: false)
70+
--otp This is a one-time password from a two-factor authenticator
71+
--no-release-draft Skips opening a GitHub release draft
72+
--dry-run Don't actually release, just simulate the process
73+
--verbose Display verbose output
74+
-h, --help Display this message
75+
-v, --version Display version number
76+
```

README.zh_CN.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,45 @@ yarn add @tomjs/release-cli -D
3232
# npm
3333
npm add @tomjs/release-cli -D
3434
```
35+
36+
## 使用
37+
38+
```bash
39+
$ rc --help
40+
41+
A CLI tool to automatically publish npm packages.
42+
43+
Usage
44+
$ rc [type] [options]
45+
46+
Type can be:
47+
patch | minor | major | prepatch | preminor | premajor | prerelease
48+
49+
Options
50+
--cwd <cwd> The current working directory (default: ".")
51+
--preid Specify the pre-release identifier, allowed values are "", "alpha", "beta", "rc".
52+
If type is "prerelease", "prepatch", "preminor", "premajor",
53+
the preid will be used as the pre-release identifier (default: "alpha").
54+
If type is "patch", "minor", "major", the preid will be ignored.
55+
--any-branch Allow publishing from any branch (default: false)
56+
--branch Name of the release branch (default: main | master)
57+
--tag <tag> Publish under a given dist-tag (default: "latest")
58+
--scoped-tag Use scoped package name as git tag (default: false)
59+
--no-log Skips generating changelog
60+
--log-full Generate a full changelog and replace the existing content (default: false)
61+
--no-log-commit Don't add git commit SHA and link to the changelog
62+
--no-log-compare Don't add git compare link to the changelog
63+
--git-url Specify the git web url. If not specified, the configuration of git or package.json will be read,
64+
such as "https://github.com/tomjs/release-cli"
65+
--git-commit-url Git commit url template, default: "{url}/commit/{sha}"
66+
--git-compare-url Git compare url template, default: "{url}/compare/{diff}"
67+
--strict Strict mode, will make some checks more strict (default: false)
68+
--no-publish Skips publishing
69+
--tag-one When publishing multiple packages, only one git tag and commit (default: false)
70+
--otp This is a one-time password from a two-factor authenticator
71+
--no-release-draft Skips opening a GitHub release draft
72+
--dry-run Don't actually release, just simulate the process
73+
--verbose Display verbose output
74+
-h, --help Display this message
75+
-v, --version Display version number
76+
```

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,33 +54,34 @@
5454
"is-subdir": "^1.2.0",
5555
"log-symbols": "^6.0.0",
5656
"meow": "^13.2.0",
57+
"open": "^10.1.0",
5758
"ora": "^8.0.1",
5859
"publint": "^0.2.7",
59-
"semver": "^7.6.0",
60+
"semver": "^7.6.2",
6061
"strip-ansi": "^7.1.0"
6162
},
6263
"devDependencies": {
6364
"@commitlint/cli": "^19.3.0",
64-
"@dotenvx/dotenvx": "^0.37.1",
65+
"@dotenvx/dotenvx": "^0.38.0",
6566
"@tomjs/commitlint": "^3.0.0",
6667
"@tomjs/eslint": "^2.3.0",
6768
"@tomjs/prettier": "^1.3.0",
6869
"@tomjs/tsconfig": "^1.5.0",
6970
"@types/hosted-git-info": "^3.0.5",
7071
"@types/import-local": "^3.1.2",
7172
"@types/inquirer": "^9.0.7",
72-
"@types/node": "^18.19.31",
73+
"@types/node": "^18.19.33",
7374
"@types/semver": "^7.5.8",
7475
"cross-env": "^7.0.3",
7576
"eslint": "^8.57.0",
7677
"husky": "^9.0.11",
7778
"lint-staged": "^15.2.2",
7879
"npm-run-all": "^4.1.5",
7980
"prettier": "^3.2.5",
80-
"rimraf": "^5.0.5",
81+
"rimraf": "^5.0.7",
8182
"tsup": "^8.0.2",
82-
"tsx": "^4.9.3",
83-
"type-fest": "^4.18.1",
83+
"tsx": "^4.10.2",
84+
"type-fest": "^4.18.2",
8485
"typescript": "^5.4.5",
8586
"vitest": "^1.5.3"
8687
},

0 commit comments

Comments
 (0)