Expand {sha} and {version} is user commit message (#1410)

This commit is contained in:
Anatoli Babenia
2018-02-22 17:31:19 +03:00
committed by Waylan Limberg
parent a793eede8b
commit 0dce2b2b9e
3 changed files with 6 additions and 4 deletions

View File

@@ -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).

View File

@@ -82,8 +82,8 @@ site_dir_help = "The directory to output the result of the documentation build."
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 "

View File

@@ -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']