From 076d2f3502bbf93b15b48c9791068f7a72475eef Mon Sep 17 00:00:00 2001 From: Oleg Butuzov Date: Thu, 19 Dec 2019 13:12:30 +0200 Subject: [PATCH] chores(release): pre-release preparations. --- .../continuous-integration/azure-pipelines.md | 48 +++++++++++++++++++ docs/continuous-integration/readme.md | 1 + setup.py | 6 +-- 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 docs/continuous-integration/azure-pipelines.md diff --git a/docs/continuous-integration/azure-pipelines.md b/docs/continuous-integration/azure-pipelines.md new file mode 100644 index 0000000..ba60e0f --- /dev/null +++ b/docs/continuous-integration/azure-pipelines.md @@ -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. + +

Simple Azure Pipeline Process Example

+ +```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 +``` + +

Additional Resources

+ +*   [Azure Pipelines documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops) diff --git a/docs/continuous-integration/readme.md b/docs/continuous-integration/readme.md index 4fed065..48f650b 100644 --- a/docs/continuous-integration/readme.md +++ b/docs/continuous-integration/readme.md @@ -16,6 +16,7 @@ If tool you using to create documentation has support for links checking, please

Continues Integration Providers

+* [Azure Pipelines](azure-pipelines.md) * [CircleCI](circleci.md) * [tox](tox.md) * [Travis CI](travis-ci.md) diff --git a/setup.py b/setup.py index 728ecb0..147ef7a 100755 --- a/setup.py +++ b/setup.py @@ -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) @@ -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: