From 92646e4849b563a9959fc031a1ceb9301cb5800b Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Tue, 4 Feb 2020 02:14:47 +0300 Subject: [PATCH] Updated CI pipeline to automatically update application version, updated development workflow description in CONTRIBUTING.md --- CONTRIBUTING.md | 53 +++++++++++++++++++++++++-------------------- azure-pipelines.yml | 9 ++++++++ 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22fdded..5bec93e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,29 +5,30 @@ There are many ways in which you can contribute, beyond writing code. The goal o ## Table of Contents - [GUTSchedule Contribution Guidelines](#gutschedule-contribution-guidelines) - - [Table of Contents](#table-of-contents) - - [Asking Questions](#asking-questions) - - [Providing Feedback](#providing-feedback) - - [Reporting Issues](#reporting-issues) - - [Look For an Existing Issue](#look-for-an-existing-issue) - - [Writing Good Bug Reports and Feature Requests](#writing-good-bug-reports-and-feature-requests) - - [Final Checklist](#final-checklist) - - [Follow Your Issue](#follow-your-issue) - - [Contributing to codebase](#contributing-to-codebase) - - [Build and run project](#build-and-run-project) - - [Development workflow](#development-workflow) - - [Coding guidelines](#coding-guidelines) - - [Indentation](#indentation) - - [Names](#names) - - [Comments](#comments) - - [Strings](#strings) - - [Style](#style) - - [Finding an issue to work on](#finding-an-issue-to-work-on) - - [Contributing to translations](#contributing-to-translations) - - [Submitting pull requests](#submitting-pull-requests) - - [Spell check errors](#spell-check-errors) - - [Thank You!](#thank-you) - - [Attribution](#attribution) + - [Table of Contents](#table-of-contents) + - [Asking Questions](#asking-questions) + - [Providing Feedback](#providing-feedback) + - [Reporting Issues](#reporting-issues) + - [Look For an Existing Issue](#look-for-an-existing-issue) + - [Writing Good Bug Reports and Feature Requests](#writing-good-bug-reports-and-feature-requests) + - [Final Checklist](#final-checklist) + - [Follow Your Issue](#follow-your-issue) + - [Contributing to codebase](#contributing-to-codebase) + - [Build and run project](#build-and-run-project) + - [Development workflow](#development-workflow) + - [Release](#release) + - [Coding guidelines](#coding-guidelines) + - [Indentation](#indentation) + - [Names](#names) + - [Comments](#comments) + - [Strings](#strings) + - [Style](#style) + - [Finding an issue to work on](#finding-an-issue-to-work-on) + - [Contributing to translations](#contributing-to-translations) + - [Submitting pull requests](#submitting-pull-requests) + - [Spell check errors](#spell-check-errors) + - [Thank You!](#thank-you) + - [Attribution](#attribution) ## Asking Questions Have a question? Rather than opening an issue, please ask me directly on opensource@xfox111.net. @@ -101,7 +102,11 @@ This section represents how contributors should interact with codebase implement 3. Making changes to codebase 4. Updating [changelog.md](changelog.md) 5. Creating a pull request to `master` -6. Done! +6. Validating PR with CI build +7. Completing PR +8. Done +#### Release +Next stage is release. Release performs on every push to master (which makes functional changes to application source code). Release performs via Azure Pipelines and triggers manually by pipeline owner ([@xfox111](https://github.com/xfox111)). ### Coding guidelines #### Indentation diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e793eef..5ccaa4b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,6 +29,15 @@ steps: failBuildLevelSelector: 'Error' failBuildOnCodeIssues: false +- task: PowerShell@2 + displayName: 'Update version number' + inputs: + targetType: 'inline' + script: | + (Get-Content AndroidManifest.xml -encoding UTF8 | Out-String) -replace '(?<=\bandroid:versionCode=")[^"]*', $(Build.BuildId) | set-content AndroidManifest.xml -encoding UTF8 + (Get-Content AndroidManifest.xml -encoding UTF8 | Out-String) -replace '(?<=\bandroid:versionName=")[^"]*', $(Build.BuildNumber) | set-content AndroidManifest.xml -encoding UTF8 + workingDirectory: '$(Build.SourcesDirectory)\GUT.Schedule\GUT.Schedule\Properties' + - task: XamarinAndroid@1 displayName: 'Build Solution (AppBundle)' inputs: