Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ environment:
PYTHON_MINOR: 6
- PYTHON_MAJOR: 3
PYTHON_MINOR: 7
- PYTHON_MAJOR: 3
PYTHON_MINOR: 8

cache:
- .venv -> poetry.lock

init:
init:
- git config --global core.symlinks true

install:
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.8.2
7 changes: 0 additions & 7 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ build:
override:
- pylint-run --rcfile=.pylint.ini
- py-scrutinizer-run
nodes:
py35:
environment:
python: 3.5.1
py36:
environment:
python: 3.6
checks:
python:
code_rating: true
Expand Down
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
dist: xenial

language: python
python:
- 3.6
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
- 3.7
- 3.8

cache:
pip: true
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.8 (beta)

- Added support Python 3.8.

# 1.7 (2019-08-07)

- **BREAKING**: Renamed `-f` alias to `-F` (`-f` now implies `--force-interactive`).
Expand Down Expand Up @@ -173,8 +177,8 @@
# 0.1.2 (2014-02-27)

- Added `--force` argument to:
- overwrite uncommitted changes
- create symbolic links in place of directories
- overwrite uncommitted changes
- create symbolic links in place of directories
- Added live shell command output with `-vv` argument.

# 0.1 (2014-02-24)
Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ DEPENDENCIES := $(VIRTUAL_ENV)/.poetry-$(shell bin/checksum pyproject.toml poetr
install: $(DEPENDENCIES) .cache

$(DEPENDENCIES): poetry.lock
@ poetry config virtualenvs.in-project true || poetry config settings.virtualenvs.in-project true
@ poetry config virtualenvs.in-project true
poetry install
@ touch $@

ifndef CI
poetry.lock: pyproject.toml
poetry lock
@ touch $@
endif

.cache:
@ mkdir -p .cache
Expand All @@ -69,8 +71,8 @@ check: install format ## Run formaters, linters, and static analysis
ifdef CI
git diff --exit-code
endif
poetry run pylint $(PACKAGES) --rcfile=.pylint.ini
poetry run mypy $(PACKAGES) --config-file=.mypy.ini
poetry run pylint $(PACKAGES) --rcfile=.pylint.ini
poetry run pydocstyle $(PACKAGES) $(CONFIG)

# TESTS #######################################################################
Expand Down Expand Up @@ -129,9 +131,9 @@ $(MKDOCS_INDEX): docs/requirements.txt mkdocs.yml docs/*.md
@ cd docs/about && ln -sf ../../LICENSE.md license.md
poetry run mkdocs build --clean --strict

# Workaround: https://github.com/rtfd/readthedocs.org/issues/5090
docs/requirements.txt: poetry.lock
@ poetry run pip freeze -qqq | grep mkdocs > $@
@ poetry run pip freeze -qqq | grep mkdocs > $@
@ poetry run pip freeze -qqq | grep Pygments >> $@

.PHONY: uml
uml: install docs/*.png
Expand All @@ -140,8 +142,8 @@ docs/*.png: $(MODULES)
- mv -f classes_$(PACKAGE).png docs/classes.png
- mv -f packages_$(PACKAGE).png docs/packages.png

.PHONY: mkdocs-live
mkdocs-live: mkdocs
.PHONY: mkdocs-serve
mkdocs-serve: mkdocs
eval "sleep 3; bin/open http://127.0.0.1:8000" &
poetry run mkdocs serve

Expand Down
98 changes: 48 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ GitMan is a language-agnostic dependency manager using Git. It aims to serve as

### Requirements

* Python 3.6+
* Git 2.8+ (with [stored credentials](http://gitman.readthedocs.io/en/latest/setup/git/))
- Python 3.6+
- Git 2.8+ (with [stored credentials](http://gitman.readthedocs.io/en/latest/setup/git/))

### Installation

Install this tool globally:

```shell
```sh
$ pip install gitman
```

or add it to your [Poetry](https://poetry.eustace.io/) project:

```shell
```sh
$ poetry add gitman
```

### Configuration

Generate a sample config file:

```shell
```sh
$ gitman init
```

Expand All @@ -46,57 +46,57 @@ or manually create one (`gitman.yml` or `.gitman.yml`) in the root of your worki
location: vendor/gitman

sources:
- name: framework
repo: https://github.com/kstenerud/iOS-Universal-Framework
rev: Mk5-end-of-life
- name: coverage
repo: https://github.com/jonreid/XcodeCoverage
rev: master
link: Tools/XcodeCoverage
- name: trufflehog
repo: https://github.com/dxa4481/truffleHog
rev: master
scripts:
- chmod a+x truffleHog/truffleHog.py
- name: fontawesome
repo: https://github.com/FortAwesome/Font-Awesome
sparse_paths:
- webfonts/*
rev: master
- name: material-design-icons
repo: https://github.com/google/material-design-icons.git
rev: master
- name: framework
repo: https://github.com/kstenerud/iOS-Universal-Framework
rev: Mk5-end-of-life
- name: coverage
repo: https://github.com/jonreid/XcodeCoverage
rev: master
link: Tools/XcodeCoverage
- name: trufflehog
repo: https://github.com/dxa4481/truffleHog
rev: master
scripts:
- chmod a+x truffleHog/truffleHog.py
- name: fontawesome
repo: https://github.com/FortAwesome/Font-Awesome
sparse_paths:
- "webfonts/*"
rev: master
- name: material-design-icons
repo: https://github.com/google/material-design-icons.git
rev: master

groups:
- name: code
members:
- framework
- trufflehog
- name: resources
members:
- fontawesome
- material-design-icons
- name: code
members:
- framework
- trufflehog
- name: resources
members:
- fontawesome
- material-design-icons
```

Ignore the dependency storage location:

```shell
```sh
$ echo vendor/gitman >> .gitignore
```

## Usage

See the available commands:

```shell
```sh
$ gitman --help
```

### Updating Dependencies

Get the latest versions of all dependencies:

```shell
```sh
$ gitman update
```

Expand All @@ -111,45 +111,43 @@ which will essentially:

where `rev` can be:

* all or part of a commit SHA: `123def`
* a tag: `v1.0`
* a branch: `master`
* a `rev-parse` date: `'develop@{2015-06-18 10:30:59}'`

- all or part of a commit SHA: `123def`
- a tag: `v1.0`
- a branch: `master`
- a `rev-parse` date: `'develop@{2015-06-18 10:30:59}'`

Alternatively get the latest versions of certain dependencies or even dependency groups:

* Update a single repository
- Update a single repository

```shell
```sh
$ gitman update framework
```

* Update a dependency group
- Update a dependency group

```shell
```sh
$ gitman update resources
```


### Restoring Previous Versions

Display the specific revisions that are currently installed:

```shell
```sh
$ gitman list
```

Reinstall these specific versions at a later time:

```shell
```sh
$ gitman install
```

### Deleting Dependencies

Remove all installed dependencies:

```shell
```sh
$ gitman uninstall
```
13 changes: 8 additions & 5 deletions bin/checksum
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ import sys


def run(paths):
hash_md5 = hashlib.md5()
sha = hashlib.sha1()

for path in paths:
with open(path, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
hash_md5.update(chunk)
try:
with open(path, 'rb') as f:
for chunk in iter(lambda: f.read(4096), b''):
sha.update(chunk)
except IOError:
sha.update(path.encode())

print(hash_md5.hexdigest())
print(sha.hexdigest())


if __name__ == '__main__':
Expand Down
Loading