mirror of
https://github.com/oskar456/dzonegit.git
synced 2024-05-11 05:55:41 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
023906177a | ||
|
|
e79bb901f3 | ||
|
|
f07c84aa32 |
10
README.rst
10
README.rst
@@ -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
|
||||
---------------------
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
2
setup.py
2
setup.py
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user