[go: nahoru, domu]

Skip to content

Commit

Permalink
Added --remote option (#191)
Browse files Browse the repository at this point in the history
* Added --remote option

* Explicated new feature behavior in --help
  • Loading branch information
colinvh0 committed Jun 10, 2024
1 parent 1fbbb59 commit 30c6b0a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/README_standalone.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ and that you want to push changes to the `origin` remote.
If instead, your files are not in a git repository, or if you want to push to another repository,
you can provide the repository URL in the `repo` option.
#### --remote <a name="remote"></a>
- **optional**
- Default: `origin`
- Example: `npx angular-cli-ghpages --remote=github`
By default, **gh-pages** assumes that the current working directory is a git repository,
and that you want to push changes to the `origin` remote.
If you want to push to another remote, you can provide the remote name in the `remote` option.
#### --message <a name="message"></a>
- **optional**
Expand Down
7 changes: 6 additions & 1 deletion src/angular-cli-ghpages
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ commander
)
.option(
'-r, --repo <repo>',
'Provide the repository URL. If no value is provided, the `origin` remote of the current working directory is used.',
'Provide the repository URL. If no value is provided, a remote of the current working directory is used (defaults to `origin`; see --remote for details).',
defaults.repo
)
.option(
'-R, --remote <remote>',
'Provide the remote name. If no value is provided, `origin` is used. Has no function if --repo is set.',
defaults.remote
)
.option(
'-m, --message <message>',
'The commit message, must be wrapped in quotes.',
Expand Down
6 changes: 5 additions & 1 deletion src/deploy/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@
"default": false,
"description": "Skip build process during deployment."
},
"remote": {
"type": "string",
"description": "Provide the remote name. If no value is provided, `origin` is used. Has no function if --repo is set."
},
"repo": {
"type": "string",
"description": "Provide the repository URL. If no value is provided, the `origin` remote of the current working directory is used."
"description": "Provide the repository URL. If no value is provided, a remote of the current working directory is used (defaults to `origin`; see --remote for details)."
},
"message": {
"type": "string",
Expand Down

0 comments on commit 30c6b0a

Please sign in to comment.