Skip to content

Commit

Permalink
chores(release): pre-release preparations.
Browse files Browse the repository at this point in the history
  • Loading branch information
butuzov committed Dec 19, 2019
1 parent 769958f commit 076d2f3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 3 deletions.
48 changes: 48 additions & 0 deletions docs/continuous-integration/azure-pipelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Azure Pipelines

Azure Pipelines are part of Azure DevOps tool, and quite flexible CI platform. It's quite complex and powerful, therefor we providing just a simple example specs in one job to check generated documentation.

<h3>Simple Azure Pipeline Process Example</h3>

```yaml
jobs:
- job: 'Builds'
pool:
vmImage: 'Ubuntu-16.04'

steps:

- checkout: self
fetchDepth: 1
displayName: "Repository Checkout"

- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
architecture: 'x64'
displayName: "Setup Environment"

- script: |
python -m pip install --upgrade pip
pip install https://github.com/butuzov/deadlinks/archive/develop.zip
pip install -r requirements-docs.txt
displayName: "deadlinks, mkdocs and theme"
continueOnError: false
- script: |
mkdocs serve -q &
deadlinks http://127.0.0.1:8000 -n10 -r3 --fiff --no-progress --no-colors
kill -9 $!
displayName: "checking external service"
continueOnError: false
- script: |
mkdocs build -d site
deadlinks internal --root=site -n10 -r3 --fiff --no-progress --no-colors
displayName: "checking static files"
continueOnError: false
```
<h4 id="additional-resources">Additional Resources</h4>
* &nbsp; [Azure Pipelines documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops)
1 change: 1 addition & 0 deletions docs/continuous-integration/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ If tool you using to create documentation has support for links checking, please

<h2>Continues Integration Providers</h2>

* [Azure Pipelines](azure-pipelines.md)
* [CircleCI](circleci.md)
* [tox](tox.md)
* [Travis CI](travis-ci.md)
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ def readme() -> str:
# ~~ Version Releases / Start ~~

# PyPi: only releases (x.y.z)
#
#
data = read_data()

branch = os.environ.get('DEADLINKS_BRANCH', None)
Expand All @@ -94,7 +92,9 @@ def readme() -> str:

VERSION = r'^\d{1,}.\d{1,}.\d{1,}$' # type: str

if tagged and not match(VERSION, tagged) and branch and commit:
if os.environ.get('DEADLINKS_VERSION', None) is not None:
data['app_version'] += os.environ.get('DEADLINKS_VERSION', None)
elif tagged and not match(VERSION, tagged) and branch and commit:
dev_version_file = Path(__file__).parent / "deadlinks" / "__develop__.py"
dev_version_str = ".{}.{}".format(branch, commit).rstrip("+")
with open(str(dev_version_file), "w") as f:
Expand Down

0 comments on commit 076d2f3

Please sign in to comment.