How to use the chartpress.latest_tag_or_mod_commit function in chartpress

To help you get started, we’ve selected a few chartpress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyterhub / chartpress / tests / test_helpers.py View on Github external
def test_latest_tag_or_mod_commit(git_repo):
    open('tag-mod.txt', "w").close()
    git_repo.index.add("tag-mod.txt")
    tag_commit = git_repo.index.commit("tag commit")
    git_repo.create_tag("1.0.0", message="1.0.0")

    open('post-tag-mod.txt', "w").close()
    git_repo.index.add("post-tag-mod.txt")
    post_tag_commit = git_repo.index.commit("post tag commit")

    assert latest_tag_or_mod_commit("chartpress.yaml")  == tag_commit.hexsha[:7]
    assert latest_tag_or_mod_commit("tag-mod.txt")      == tag_commit.hexsha[:7]
    assert latest_tag_or_mod_commit("post-tag-mod.txt") == post_tag_commit.hexsha[:7]
github jupyterhub / chartpress / tests / test_helpers.py View on Github external
def test_latest_tag_or_mod_commit(git_repo):
    open('tag-mod.txt', "w").close()
    git_repo.index.add("tag-mod.txt")
    tag_commit = git_repo.index.commit("tag commit")
    git_repo.create_tag("1.0.0", message="1.0.0")

    open('post-tag-mod.txt', "w").close()
    git_repo.index.add("post-tag-mod.txt")
    post_tag_commit = git_repo.index.commit("post tag commit")

    assert latest_tag_or_mod_commit("chartpress.yaml")  == tag_commit.hexsha[:7]
    assert latest_tag_or_mod_commit("tag-mod.txt")      == tag_commit.hexsha[:7]
    assert latest_tag_or_mod_commit("post-tag-mod.txt") == post_tag_commit.hexsha[:7]
github jupyterhub / chartpress / tests / test_helpers.py View on Github external
def test_latest_tag_or_mod_commit(git_repo):
    open('tag-mod.txt', "w").close()
    git_repo.index.add("tag-mod.txt")
    tag_commit = git_repo.index.commit("tag commit")
    git_repo.create_tag("1.0.0", message="1.0.0")

    open('post-tag-mod.txt', "w").close()
    git_repo.index.add("post-tag-mod.txt")
    post_tag_commit = git_repo.index.commit("post tag commit")

    assert latest_tag_or_mod_commit("chartpress.yaml")  == tag_commit.hexsha[:7]
    assert latest_tag_or_mod_commit("tag-mod.txt")      == tag_commit.hexsha[:7]
    assert latest_tag_or_mod_commit("post-tag-mod.txt") == post_tag_commit.hexsha[:7]