Skip to content

Commit 84f9218

Browse files
authored
Docs: Support for git archive installs (#508)
Explains to how install gitlint using github archive URLs. Docs for #464
1 parent 3454141 commit 84f9218

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

docs/contributing/releases.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,22 @@ of a recently published version can still fail for a few minutes after a new ver
1616
is replicated to all download mirrors.
1717

1818
To install a dev build of gitlint:
19-
```sh
19+
```{.sh .copy}
2020
# Find latest dev build on https://pypi.org/project/gitlint/#history
2121
pip install gitlint=="0.19.0.dev68"
2222
```
23+
24+
### Git archive installs
25+
You can also install directly from GitHub source Git archive URLs.
26+
This can even be done for unmerged commits (pending PRs). It will work as long as you have a commit hash.
27+
28+
```{.sh .copy}
29+
# Set commit hash to install
30+
export COMMIT_HASH="345414171baea56c5b2b8290f17a2a13a685274c"
31+
32+
# Install using pinned dependencies
33+
pip install "gitlint-core [trusted-deps] @ https://github.com/jorisroovers/gitlint/archive/$COMMIT_HASH.tar.gz#subdirectory=gitlint-core"
34+
35+
# Install using looser dependencies
36+
pip install "https://github.com/jorisroovers/gitlint/archive/$COMMIT_HASH.tar.gz#subdirectory=gitlint-core"
37+
```

docs/installation.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,20 @@ To install gitlint with looser dependency requirements, only install gitlint-cor
1010
```{.sh .copy}
1111
pip install gitlint-core
1212
```
13-
??? "Uninstalling gitlint"
13+
14+
??? info "Installing from GitHub source Git archive URLs"
15+
```{.sh .copy}
16+
# Set version to install
17+
export GITLINT_VERSION="v0.20.0"
18+
19+
# Install using pinned dependencies
20+
pip install "gitlint-core [trusted-deps] @ https://github.com/jorisroovers/gitlint/archive/$GITLINT_VERSION.tar.gz#subdirectory=gitlint-core"
21+
22+
# Install using looser dependencies
23+
pip install "https://github.com/jorisroovers/gitlint/archive/$GITLINT_VERSION.tar.gz#subdirectory=gitlint-core"
24+
```
25+
26+
??? info "Uninstalling gitlint"
1427
To fully uninstall gitlint, you need to remove both `gitlint` and `gitlint-core`:
1528
```{.sh .copy}
1629
pip uninstall gitlint gitlint-core

0 commit comments

Comments
 (0)