gitman 3.3.3__tar.gz → 3.4b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitman-3.3.3 → gitman-3.4b2}/PKG-INFO +1 -1
- {gitman-3.3.3 → gitman-3.4b2}/gitman/commands.py +14 -32
- {gitman-3.3.3 → gitman-3.4b2}/gitman/models/config.py +4 -1
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_models_config.py +2 -2
- {gitman-3.3.3 → gitman-3.4b2}/pyproject.toml +1 -1
- {gitman-3.3.3 → gitman-3.4b2}/setup.py +1 -1
- {gitman-3.3.3 → gitman-3.4b2}/LICENSE.md +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/README.md +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/__init__.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/__main__.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/cli.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/common.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/decorators.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/exceptions.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/git.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/hook-gitman.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/models/__init__.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/models/group.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/models/source.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/plugin.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/settings.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/shell.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/__init__.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/conftest.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/gdm-custom.yml +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/gdm-default.yml +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/gitman.yml +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/subdir/gitman.yml +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/subdir/subsubdir/gitman.yml +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/subdir/subsubdir/skip/subsubsubsubdir/gitman.yml +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_cli.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_commands.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_common.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_git.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_models_group.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_models_source.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_plugin.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/test_shell.py +0 -0
- {gitman-3.3.3 → gitman-3.4b2}/gitman/tests/utils.py +0 -0
|
@@ -99,8 +99,9 @@ def install(
|
|
|
99
99
|
count = 0
|
|
100
100
|
common.newline()
|
|
101
101
|
|
|
102
|
-
for config in configs:
|
|
103
|
-
|
|
102
|
+
for index, config in enumerate(configs):
|
|
103
|
+
label = "nested dependencies" if index else "dependencies"
|
|
104
|
+
common.show(f"Installing {label}...", color="message", log=False)
|
|
104
105
|
common.newline()
|
|
105
106
|
|
|
106
107
|
_count = config.install_dependencies(
|
|
@@ -117,9 +118,10 @@ def install(
|
|
|
117
118
|
count += _count # type: ignore
|
|
118
119
|
|
|
119
120
|
if _count:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
)
|
|
121
|
+
label = "nested scripts" if index else "scripts"
|
|
122
|
+
common.show(f"Running {label}...", color="message", log=False)
|
|
123
|
+
common.newline()
|
|
124
|
+
config.run_scripts(*names, depth=depth, force=force, show_shell_stdout=True)
|
|
123
125
|
|
|
124
126
|
return _display_result("install", "Installed", count)
|
|
125
127
|
|
|
@@ -171,8 +173,9 @@ def update(
|
|
|
171
173
|
count = 0
|
|
172
174
|
common.newline()
|
|
173
175
|
|
|
174
|
-
for config in configs:
|
|
175
|
-
|
|
176
|
+
for index, config in enumerate(configs):
|
|
177
|
+
label = "nested dependencies" if index else "dependencies"
|
|
178
|
+
common.show(f"Updating {label}...", color="message", log=False)
|
|
176
179
|
common.newline()
|
|
177
180
|
_count = config.install_dependencies(
|
|
178
181
|
*names,
|
|
@@ -198,35 +201,14 @@ def update(
|
|
|
198
201
|
)
|
|
199
202
|
|
|
200
203
|
if _count:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
)
|
|
204
|
+
label = "nested scripts" if index else "scripts"
|
|
205
|
+
common.show(f"Running {label}...", color="message", log=False)
|
|
206
|
+
common.newline()
|
|
207
|
+
config.run_scripts(*names, depth=depth, force=force, show_shell_stdout=True)
|
|
204
208
|
|
|
205
209
|
return _display_result("update", "Updated", count)
|
|
206
210
|
|
|
207
211
|
|
|
208
|
-
def _run_scripts(
|
|
209
|
-
*names, depth=None, force=False, _config=None, show_shell_stdout=False
|
|
210
|
-
):
|
|
211
|
-
"""Run post-install scripts.
|
|
212
|
-
|
|
213
|
-
Optional arguments:
|
|
214
|
-
|
|
215
|
-
- `*names`: optional list of dependency directory names filter on
|
|
216
|
-
- `depth`: number of levels of dependencies to traverse
|
|
217
|
-
- `force`: indicates script errors can be ignored
|
|
218
|
-
- `show_shell_stdout`: allows to print realtime output from shell commands
|
|
219
|
-
|
|
220
|
-
"""
|
|
221
|
-
assert _config, "'_config' is required"
|
|
222
|
-
|
|
223
|
-
common.show("Running scripts...", color="message", log=False)
|
|
224
|
-
common.newline()
|
|
225
|
-
_config.run_scripts(
|
|
226
|
-
*names, depth=depth, force=force, show_shell_stdout=show_shell_stdout
|
|
227
|
-
)
|
|
228
|
-
|
|
229
|
-
|
|
230
212
|
@preserve_cwd
|
|
231
213
|
def display(*, root=None, depth=None, allow_dirty=True):
|
|
232
214
|
"""Display installed dependencies for a project.
|
|
@@ -378,7 +378,10 @@ class Config:
|
|
|
378
378
|
)
|
|
379
379
|
|
|
380
380
|
if not sources_filter:
|
|
381
|
-
|
|
381
|
+
if names:
|
|
382
|
+
log.warn(f"No dependencies match: {' '.join(names)}")
|
|
383
|
+
else:
|
|
384
|
+
sources_filter = [source.name for source in sources if source.name]
|
|
382
385
|
|
|
383
386
|
return list(set(sources_filter))
|
|
384
387
|
|
|
@@ -65,14 +65,14 @@ class TestConfig:
|
|
|
65
65
|
assert 0 == len(list(config.get_dependencies(depth=0)))
|
|
66
66
|
|
|
67
67
|
@pytest.mark.integration
|
|
68
|
-
def
|
|
68
|
+
def test_install_with_names(self):
|
|
69
69
|
"""Verify the dependency list can be filtered."""
|
|
70
70
|
config = Config(FILES)
|
|
71
71
|
|
|
72
72
|
count = config.install_dependencies("gitman_2", "gitman_3")
|
|
73
73
|
assert 2 == count
|
|
74
74
|
|
|
75
|
-
def
|
|
75
|
+
def test_install_with_names_unknown(self):
|
|
76
76
|
"""Verify zero dependencies are installed with unknown dependency."""
|
|
77
77
|
config = Config(FILES)
|
|
78
78
|
|
|
@@ -20,7 +20,7 @@ entry_points = \
|
|
|
20
20
|
|
|
21
21
|
setup_kwargs = {
|
|
22
22
|
'name': 'gitman',
|
|
23
|
-
'version': '3.
|
|
23
|
+
'version': '3.4b2',
|
|
24
24
|
'description': 'A language-agnostic dependency manager using Git.',
|
|
25
25
|
'long_description': '## Overview\n\nGitman is a language-agnostic dependency manager using Git. It aims to serve as a submodules replacement and provides advanced options for managing versions of nested Git repositories.\n\n[](https://asciinema.org/a/3DLos4HIU84P0AfFlZMYcgPus)\n\n[](https://travis-ci.com/jacebrowning/gitman)\n[](https://ci.appveyor.com/project/jacebrowning/gitman)\n[](https://coveralls.io/r/jacebrowning/gitman)\n[](https://scrutinizer-ci.com/g/jacebrowning/gitman/?branch=main)\n[](https://pypi.org/project/gitman)\n[](https://pypi.org/project/gitman)\n[](https://pypistats.org/packages/gitman)\n\n## Setup\n\n### Requirements\n\n- Python 3.8+\n- Git 2.8+ (with [stored credentials](http://gitman.readthedocs.io/en/latest/setup/git/))\n\n### Installation\n\nInstall this tool globally with [pipx](https://pipxproject.github.io/pipx/) (or pip):\n\n```sh\n$ pipx install gitman\n```\nor add it to your [Poetry](https://python-poetry.org/docs/) project:\n\n```sh\n$ poetry add gitman\n```\n\n### Configuration\n\nGenerate a sample config file:\n\n```sh\n$ gitman init\n```\n\nor manually create one (`gitman.yml` or `.gitman.yml`) in the root of your working tree:\n\n```yaml\nlocation: vendor/gitman\n\nsources:\n - repo: "https://github.com/kstenerud/iOS-Universal-Framework"\n name: framework\n rev: Mk5-end-of-life\n - repo: "https://github.com/jonreid/XcodeCoverage"\n name: coverage\n links:\n - target: Tools/XcodeCoverage\n - repo: "https://github.com/dxa4481/truffleHog"\n name: trufflehog\n rev: master\n scripts:\n - chmod a+x truffleHog/truffleHog.py\n - repo: "https://github.com/FortAwesome/Font-Awesome"\n name: fontawesome\n rev: master\n sparse_paths:\n - "webfonts/*"\n - repo: "https://github.com/google/material-design-icons"\n name: material-design-icons\n rev: master\n\ngroups:\n - name: code\n members:\n - framework\n - trufflehog\n - name: resources\n members:\n - fontawesome\n - material-design-icons\n\ndefault_group: code\n```\n\nIgnore the dependency storage location:\n\n```sh\n$ echo vendor/gitman >> .gitignore\n```\n\n## Usage\n\nSee the available commands:\n\n```sh\n$ gitman --help\n```\n\n### Updating Dependencies\n\nGet the latest versions of all dependencies:\n\n```sh\n$ gitman update\n```\n\nwhich will essentially:\n\n1. Create a working tree at `<root>`/`<location>`/`<name>`\n2. Fetch from `repo` and checkout the specified `rev`\n3. Symbolically link each `<location>`/`<name>` from `<root>`/`<link>` (if specified)\n4. Repeat for all nested working trees containing a config file\n5. Record the actual commit SHAs that were checked out (with `--lock` option)\n6. Run optional post-install scripts for each dependency\n\nwhere `rev` can be:\n\n- all or part of a commit SHA: `123def`\n- a tag: `v1.0`\n- a branch: `main`\n- a `rev-parse` date: `\'main@{2015-06-18 10:30:59}\'`\n\nAlternatively, get the latest versions of specific dependencies:\n\n```sh\n$ gitman update framework\n```\n\nor named groups:\n\n```sh\n$ gitman update resources\n```\n\n### Restoring Previous Versions\n\nDisplay the versions that are currently installed:\n\n```sh\n$ gitman list\n```\n\nReinstall these specific versions at a later time:\n\n```sh\n$ gitman install\n```\n\n### Deleting Dependencies\n\nRemove all installed dependencies:\n\n```sh\n$ gitman uninstall\n```\n\n## Resources\n\n- [Source code](https://github.com/jacebrowning/gitman)\n- [Issue tracker](https://github.com/jacebrowning/gitman/issues)\n- [Release history](https://github.com/jacebrowning/gitman/blob/main/CHANGELOG.md)\n',
|
|
26
26
|
'author': 'Jace Browning',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitman-3.3.3 → gitman-3.4b2}/gitman/tests/files/subdir/subsubdir/skip/subsubsubsubdir/gitman.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|