Skip to content

Commit

Permalink
Expand {sha} and {version} is user commit message (#1410)
Browse files Browse the repository at this point in the history
  • Loading branch information
abitrolly authored and waylan committed Feb 22, 2018
1 parent a793eed commit 0dce2b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/about/release-notes.md
Expand Up @@ -23,6 +23,7 @@ The current and past members of the MkDocs team.

## Development Version

* Expand {sha} and {version} in gh-deploy commit message (#1410).
* Compress `sitemap.xml` (#1130).
* Defer loading JS scripts (#1380).
* Add a title attribute to the search input (#1379).
Expand Down
4 changes: 2 additions & 2 deletions mkdocs/__main__.py
Expand Up @@ -82,8 +82,8 @@ def common_options(f):
reload_help = "Enable the live reloading in the development server (this is the default)"
no_reload_help = "Disable the live reloading in the development server."
dirty_reload_help = "Enable the live reloading in the development server, but only re-build files that have changed"
commit_message_help = ("A commit message to use when commiting to the "
"Github Pages remote branch")
commit_message_help = ("A commit message to use when committing to the "
"Github Pages remote branch. Commit {sha} and MkDocs {version} are available as expansions")
remote_branch_help = ("The remote branch to commit to for Github Pages. This "
"overrides the value specified in config")
remote_name_help = ("The remote name to commit to for Github Pages. This "
Expand Down
5 changes: 3 additions & 2 deletions mkdocs/commands/gh_deploy.py
Expand Up @@ -56,8 +56,9 @@ def gh_deploy(config, message=None, force=False):
'repository')

if message is None:
sha = _get_current_sha()
message = default_message.format(version=mkdocs.__version__, sha=sha)
message = default_message
sha = _get_current_sha()
message = message.format(version=mkdocs.__version__, sha=sha)

remote_branch = config['remote_branch']
remote_name = config['remote_name']
Expand Down

0 comments on commit 0dce2b2

Please sign in to comment.