Skip to content

Commit

Permalink
Version 3.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adferrand committed Feb 20, 2022
1 parent 57f9860 commit a854903
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## master - CURRENT

## 3.18.0 - 20/02/2022
### Added
* Inject environment variables `DNSROBOCERT_CERTIFICATE_NAME`, `DNSROBOCERT_CERTIFICATE_PROFILE`
and `DNSROBOCERT_CERTIFICATE_DOMAINS` in hook scripts
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "dnsrobocert"
version = "3.17.1"
version = "3.18.0"
description = "A tool to manage your DNS-challenged TLS certificates"
license = "MIT"
keywords = [
Expand Down
12 changes: 7 additions & 5 deletions src/dnsrobocert/core/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,13 @@ def _autocmd(certificate: Dict[str, Any]):
def _deploy_hook(certificate: Dict[str, Any]):
deploy_hook = certificate.get("deploy_hook")
env = os.environ.copy()
env.update({
"DNSROBOCERT_CERTIFICATE_NAME": certificate.get("name", ""),
"DNSROBOCERT_CERTIFICATE_PROFILE": certificate.get("profile", ""),
"DNSROBOCERT_CERTIFICATE_DOMAINS": ",".join(certificate.get("domains", [])),
})
env.update(
{
"DNSROBOCERT_CERTIFICATE_NAME": certificate.get("name", ""),
"DNSROBOCERT_CERTIFICATE_PROFILE": certificate.get("profile", ""),
"DNSROBOCERT_CERTIFICATE_DOMAINS": ",".join(certificate.get("domains", [])),
}
)
if deploy_hook:
if os.name == "nt":
subprocess.check_call(["powershell.exe", "-Command", deploy_hook], env=env)
Expand Down

0 comments on commit a854903

Please sign in to comment.