How to use gitman - 10 common examples

To help you get started, we’ve selected a few gitman 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 jacebrowning / gitman / tests / test_api.py View on Github external
rev: example-branch
          link:
          scripts:
          -
        - name: gitman_3
          type: git
          repo: https://github.com/jacebrowning/gitman-demo
          rev: 7bd138fe7359561a8c2ff9d195dff238794ccc04
          link:
          scripts:
          -
        """
        )
        config.datafile.load()

        expect(gitman.install(depth=1)) == True

        expect(len(os.listdir(config.location))) == 3
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_contains_only_the_sparse_paths(config):
            expect(gitman.install(depth=1, force=True)) == True
            dir_listing = os.listdir(os.path.join(config.location, "gitman_1"))
            expect(dir_listing).contains('src')
            expect(len(dir_listing) == 1)
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_creates_missing_directories(config):
        shell.rm(config.location)

        expect(gitman.install('gitman_1', depth=1)) == True

        expect(os.listdir(config.location)) == ['gitman_1']
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_deletes_dependencies_when_they_exist(config):
            gitman.install('gitman_1', depth=1)
            expect(os.path.isdir(config.location)) == True

            expect(gitman.uninstall(keep_location=True)) == True

            path = os.path.join(config.location, 'gitman_1')
            expect(os.path.exists(path)) == False

            expect(os.path.exists(config.location)) == True

            gitman.uninstall()
github jacebrowning / gitman / tests / test_api.py View on Github external
def script_failures_can_be_ignored(config_with_scripts):
            expect(gitman.install(force=True)) == True
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_deletes_the_log_file(config):
            gitman.install('gitman_1', depth=1)
            gitman.list()
            expect(os.path.exists(config.log_path)) == True

            gitman.uninstall(keep_location=True)
            expect(os.path.exists(config.log_path)) == False

            gitman.uninstall()
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_should_create_links(config_with_link):
            expect(gitman.install(depth=1)) == True

            expect(os.listdir()).contains('my_link')
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_detects_failures_in_scripts(config_with_scripts):
            with pytest.raises(RuntimeError):
                expect(gitman.install())
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_deletes_the_log_file(config):
        gitman.install('gitman_1', depth=1)
        gitman.list()
        expect(os.path.exists(config.log_path)) == True

        gitman.uninstall()
        expect(os.path.exists(config.log_path)) == False
github jacebrowning / gitman / tests / test_api.py View on Github external
def it_deletes_dependencies_when_they_exist(config):
        gitman.install('gitman_1', depth=1)
        expect(os.path.isdir(config.location)) == True

        expect(gitman.uninstall()) == True

        expect(os.path.exists(config.location)) == False