1
0
mirror of https://github.com/oskar456/dzonegit.git synced 2024-05-11 05:55:41 +00:00

3 Commits
v0.6 ... v0.7

Author SHA1 Message Date
Ondřej Caletka
023906177a version 0.7 2018-08-20 16:37:49 +02:00
Ondřej Caletka
e79bb901f3 $UNIXTIME doc update 2018-08-20 16:37:08 +02:00
Ondřej Caletka
f07c84aa32 Fix no reload on very first push to the repository 2018-08-20 16:33:00 +02:00
4 changed files with 8 additions and 9 deletions

View File

@@ -59,24 +59,22 @@ Support for $UNIXTIME directive
If you want to use ``$UNIXTIME`` in your zone files instead of serial number,
you have to install a `smudge` filter on the server, that will replace the
directive with current unix time on checkout. First, set up the filter in
the Git configuration:
directive with current unix time on every checkout. First, set up the filter
in the Git configuration:
.. code-block:: shell
$ git config --global filter.dzonegit.smudge $(which dzonegit-smudge-serial)
$ git config --global filter.dzonegit.clean cat
Then, apply the filter on all zone files using ``.gitattributes`` file inside
the repository:
Then, apply the filter on all zone files using either ``.git/info/attributes``
or directly ``.gitattributes`` file inside the repository:
.. code-block::
*.zone filter=dzonegit
Configuration options
---------------------

View File

@@ -479,7 +479,8 @@ def post_receive(stdin=sys.stdin):
if refname != "refs/heads/master":
continue
if against == "0000000000000000000000000000000000000000":
against = get_head() # Empty commit
# Empty commit
against = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"
should_reconfig = [
f for f in get_altered_files(against, "ACDRU", revision)
if f.suffix == ".zone"

View File

@@ -5,7 +5,7 @@ readme = Path(__file__).with_name("README.rst").read_text()
setup(
name="dzonegit",
version="0.6",
version="0.7",
description="Git hooks to manage a repository of DNS zones",
long_description=readme,
long_description_content_type="text/x-rst",

View File

@@ -328,7 +328,7 @@ def test_post_receive(git_dir):
git_dir.chdir()
head = dzonegit.get_head()
revisions = "{} {} refs/heads/master\n".format(
"4b825dc642cb6eb9a060e54bf8d69288fbee4904",
"0000000000000000000000000000000000000000",
head,
)
stdin = StringIO(revisions)